]> _ Git - cubedesigners-v7.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 5 Sep 2014 17:17:48 +0000 (17:17 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 5 Sep 2014 17:17:48 +0000 (17:17 +0000)
framework/application/views/scripts/common/header.phtml
images/logo.svg
js/common.coffee [new file with mode: 0644]
js/common.js
js/contact.js
js/home.js
js/test.coffee [new file with mode: 0644]
js/test.js [new file with mode: 0644]
less/header.less

index e946e4b04f378fb368bfab52c175f3030057a9ba..698b263fdeb5862806197da5d419ffaf9fe81e85 100644 (file)
@@ -12,8 +12,8 @@ if (!is_null($homepage)) {
 
                <?php
                /* LOGO */
-               if (!is_null($home)) {
-                       echo $this->link($this->image('images/logo.svg', '', 318, 132), $home, array('class' => 'logo'));
+               if (null !== 'home') {
+                       echo $this->link($this->image('/images/logo.svg', '', 318, 132), $home, array('class' => 'logo'));
                        echo '<span class="sublogo"><h1>Cubedesigners</h1><h2>Agence de création sur mesure</h2></span>';
                }
 
index 4baf79cfdd933dd0d7efe316c0b60c13b97309e9..6e4725851fb3124f4863baff22179f6681174ffa 100644 (file)
@@ -3,6 +3,11 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">\r
 <svg version="1.0" id="GroupLogo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\r
         width="317.94px" height="132px" viewBox="0 0 317.94 132" enable-background="new 0 0 317.94 132" xml:space="preserve" class="svglogo">\r
+<style>\r
+svg:hover #Background{\r
+       fill:#84AE1E;\r
+}\r
+</style>\r
 <path id="Background" fill-rule="evenodd" clip-rule="evenodd" fill="#3885E0" d="M17.715,123.41\r
        c0.464,3.398,2.586,6.161,5.437,7.59h12.988l272.152-36.653c5.473-0.748,9.303-5.789,8.556-11.261L305.639,1H0.999L17.715,123.41z"\r
        />\r
diff --git a/js/common.coffee b/js/common.coffee
new file mode 100644 (file)
index 0000000..c00a107
--- /dev/null
@@ -0,0 +1,4 @@
+load_commons = ->
+       
+
+registerLoader load_commons
\ No newline at end of file
index 3e1f4c28273cea77850932ce6dad79e6ae0de30e..187f13ed245c8edb686f039ff5a9ec28fb5978cc 100644 (file)
@@ -1,13 +1,6 @@
-//global radomized color pallette\r
-var colors = ["#6F216C", "#F34B0D", "#C50102", "#5DA537", "#F1D81B"];\r
-\r
-//turn an icon a random color\r
-$(function() {\r
-    $("#header").hover(function() {\r
-    var color = colors[Math.floor(Math.random()*5)];\r
-    $(this).css('fill',color);       \r
-    },\r
-    function() {\r
-       $(this).css('fill','black');\r
-       })\r
-});\r
+// Generated by CoffeeScript 1.8.0
+var load_commons;
+
+load_commons = function() {};
+
+registerLoader(load_commons);
index dc1bb6f3a0f75ed5e60848468aa9a2e83cad3145..a3998c072f8b34476df17633a1f4e000102b8602 100644 (file)
-var markers=[];
+var markers = [];
 
 var mapStyles =
-    [
-        {
-        stylers: [
-          { 
-              saturation: -100
-          }
-        ]
-      },
-      {
-            featureType: "poi",
-            elementType: "labels",
-            stylers: [
-            {
-                    visibility: "off"
-            }
-            ]
-      },
-    { 
-            featureType: "road",
-            elementType: "labels.text.fill",
-            stylers: [
-            {
-                    color: "#000000"
-            }
-            ]
-    },
-    { 
-            featureType: "landscape.natural",
-            stylers: [
-            {
-                    color: "#f0eff0"
-            }
-            ]
-    }
-    ];
-
-function initMaps(){
-    
-       var mapSettings=Application.map1;
-       var centre=mapSettings.centre;
-       var coder=new google.maps.Geocoder();
+               [
+                       {
+                               stylers: [
+                                       {
+                                               saturation: -100
+                                       }
+                               ]
+                       },
+                       {
+                               featureType: "poi",
+                               elementType: "labels",
+                               stylers: [
+                                       {
+                                               visibility: "off"
+                                       }
+                               ]
+                       },
+                       {
+                               featureType: "road",
+                               elementType: "labels.text.fill",
+                               stylers: [
+                                       {
+                                               color: "#000000"
+                                       }
+                               ]
+                       },
+                       {
+                               featureType: "landscape.natural",
+                               stylers: [
+                                       {
+                                               color: "#f0eff0"
+                                       }
+                               ]
+                       }
+               ];
+
+function initMaps() {
+
+       var mapSettings = Application.map1;
+       var centre = mapSettings.centre;
+       var coder = new google.maps.Geocoder();
        coder.geocode({
-               address:centre.adresse+' - '+centre.ville,
-               region:centre.pays
-       },function(res){
-               var result=res[0];
-               var center=result.geometry.location;
-               
+               address: centre.adresse + ' - ' + centre.ville,
+               region: centre.pays
+       }, function(res) {
+               var result = res[0];
+               var center = result.geometry.location;
+
                var mapOptions = {
-                       zoom:parseInt(mapSettings.zoom),
+                       zoom: parseInt(mapSettings.zoom),
                        center: center,
                        mapTypeControlOptions: {
                                mapTypeIds: [google.maps.MapTypeId.ROADMAP]
                        },
-                       styles:mapStyles,
+                       styles: mapStyles,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                };
 
                var map = new google.maps.Map(document.getElementById('map1'),
-                       mapOptions);
-                       
+                               mapOptions);
+
                Application.markers1.unshift(Application.coordonnees1);
-               
-               for(var i=0;i<Application.markers1.length;i++){
-                       m=Application.markers1[i];
-                       
-                       addMarker(m,map);
+
+               for (var i = 0; i < Application.markers1.length; i++) {
+                       m = Application.markers1[i];
+
+                       addMarker(m, map);
                }
-       });     
-        
-        
-       var mapSettings2=Application.map2;
-       var centre2=mapSettings2.centre;
-       var coder2=new google.maps.Geocoder();
+       });
+
+
+       var mapSettings2 = Application.map2;
+       var centre2 = mapSettings2.centre;
+       var coder2 = new google.maps.Geocoder();
        coder2.geocode({
-               address:centre2.adresse+' - '+centre2.ville,
-               region:centre2.pays
-       },function(res){
-               var result=res[0];
-               var center=result.geometry.location;
-               
+               address: centre2.adresse + ' - ' + centre2.ville,
+               region: centre2.pays
+       }, function(res) {
+               var result = res[0];
+               var center = result.geometry.location;
+
                var mapOptions = {
-                       zoom:parseInt(mapSettings2.zoom),
+                       zoom: parseInt(mapSettings2.zoom),
                        center: center,
                        mapTypeControlOptions: {
                                mapTypeIds: [google.maps.MapTypeId.ROADMAP]
                        },
-                       styles:mapStyles,
+                       styles: mapStyles,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                };
 
                var map = new google.maps.Map(document.getElementById('map2'),
-                       mapOptions);
-               
-                Application.markers2.unshift(Application.coordonnees2);
-               
-               for(var i=0;i<Application.markers2.length;i++){
-                       m=Application.markers2[i];
-                       
-                       addMarker(m,map);
+                               mapOptions);
+
+               Application.markers2.unshift(Application.coordonnees2);
+
+               for (var i = 0; i < Application.markers2.length; i++) {
+                       m = Application.markers2[i];
+
+                       addMarker(m, map);
                }
-       });     
+       });
 }
 
 google.maps.event.addDomListener(window, 'load', initMaps);
 
 
-function addMarker(m,map){
-    
-       var coder=new google.maps.Geocoder();
+function addMarker(m, map) {
+
+       var coder = new google.maps.Geocoder();
        coder.geocode({
-               address:m.adresse+' - '+m.ville,
-               region:m.pays
-       },function(res){
-               var result=res[0];
-               var pos=result.geometry.location;
-                       
+               address: m.adresse + ' - ' + m.ville,
+               region: m.pays
+       }, function(res) {
+               var result = res[0];
+               var pos = result.geometry.location;
+
                var marker = new google.maps.Marker({
-                       icon: '/'+m.icon[0],
+                       icon: '/' + m.icon[0],
                        position: pos,
                        map: map
                });
-                       
-               var content=makeInfoContent(m);
-               marker.infos=new google.maps.InfoWindow({
-                       content:content
+
+               var content = makeInfoContent(m);
+               marker.infos = new google.maps.InfoWindow({
+                       content: content
                });
                window.markers.push(marker);
                google.maps.event.addListener(marker, 'click', function() {
-                       for(var i=0;i<window.markers.length;i++){
-                               var ma=window.markers[i];
+                       for (var i = 0; i < window.markers.length; i++) {
+                               var ma = window.markers[i];
                                ma.infos.close();
                        }
-                       this.infos.open(map,this);
+                       this.infos.open(map, this);
                });
        });
 }
 
-function makeInfoContent(c){
-       var res='';
-       if(c.nom!=''){
-               res+='<strong>'+c.nom+'</strong><br />';        
+function makeInfoContent(c) {
+       var res = '';
+       if (c.nom != '') {
+               res += '<strong>' + c.nom + '</strong><br />';
        }
-       if(c.adresse!=''){
-               res+=c.adresse+'<br />';
+       if (c.adresse != '') {
+               res += c.adresse + '<br />';
        }
-       if(c.code_postal){
-               res+=c.code_postal+' ';
+       if (c.code_postal) {
+               res += c.code_postal + ' ';
        }
-       if(c.ville!=''){
-               res+=c.ville+'<br />';
+       if (c.ville != '') {
+               res += c.ville + '<br />';
        }
        return res;
-       
+
 }
\ No newline at end of file
index 5ca3ce1460c21f3c10266f236d231f0243c0b4e9..291ad7fdb8ef46e75cab7fef243f6df430490559 100644 (file)
@@ -1,4 +1,4 @@
-TO_LOAD_ONCE[TO_LOAD_ONCE.length]='load_home();';
+TO_LOAD_ONCE[TO_LOAD_ONCE.length] = 'load_home();';
 
 var nbSlides;
 var currentSlide;
@@ -11,172 +11,158 @@ var time;
 
 function load_home() {
        slideShow();
-        preloadSlides();
-        
-        $(".logo")
-        
-    .mouseenter(function() {
-                var img = $(this).children("img");
-               //fb( $(img));
-               //$(this).children().css('fill',"#6F216C"); 
-               $('path, polygon, circle', this).attr('fill', '#ccc');
-                $(this).children().find("Background").attr("fill", "#ccc");
-               })
-               
-    .mouseleave(function() {
-              $(this).children().css('fill','black');
-    });
+       preloadSlides();
 }
 
 function slideShow() {
-    nbSlides = $('.slide').length;
-  
-    currentSlideId = 0;
-
-    currentSlide=$('.slide:first');
-    
-    if(currentSlide.length>0){
-           
-            var image=new Image();
-            image.src=currentSlide.attr('data-image');
-           
-            if(image.complete){
-                    currentSlide.html("<a href='" + $(currentSlide).attr('data-link') + "'><img src='" + currentSlide.attr('data-image') + "' /></a>");
-            }
-            
-            $(image).load(function(){
-                   currentSlide.html("<a href='" + $(currentSlide).attr('data-link') + "'><img src='" + currentSlide.attr('data-image') + "' /></a>");
-            });
-           
-           var legend = currentSlide.attr('data-legend');
-           $('#slide-legend').html(legend);
-           
-           $('.slide:first').fadeIn();
-           
-           if(autoSlide) {
-               time = currentSlide.attr('data-time');
-               switchTimer = window.setTimeout( nextSlide, time);
-           }
-           
-    }
-    
-    initLinks();
-    //checkPages();
-    
-    
-    
+       nbSlides = $('.slide').length;
+
+       currentSlideId = 0;
+
+       currentSlide = $('.slide:first');
+
+       if (currentSlide.length > 0) {
+
+               var image = new Image();
+               image.src = currentSlide.attr('data-image');
+
+               if (image.complete) {
+                       currentSlide.html("<a href='" + $(currentSlide).attr('data-link') + "'><img src='" + currentSlide.attr('data-image') + "' /></a>");
+               }
+
+               $(image).load(function() {
+                       currentSlide.html("<a href='" + $(currentSlide).attr('data-link') + "'><img src='" + currentSlide.attr('data-image') + "' /></a>");
+               });
+
+               var legend = currentSlide.attr('data-legend');
+               $('#slide-legend').html(legend);
+
+               $('.slide:first').fadeIn();
+
+               if (autoSlide) {
+                       time = currentSlide.attr('data-time');
+                       switchTimer = window.setTimeout(nextSlide, time);
+               }
+
+       }
+
+       initLinks();
+       //checkPages();
+
+
+
 }
 
 function nextSlide() {
-    
-    if( autoSlide ) {
-        if( currentSlideId < nbSlides-1 && !isAnim)
-        {
-            currentSlideId++;
-        }else{
-            currentSlideId=0;
-        }
-        animSlide();
-    }
-    
+
+       if (autoSlide) {
+               if (currentSlideId < nbSlides - 1 && !isAnim)
+               {
+                       currentSlideId++;
+               } else {
+                       currentSlideId = 0;
+               }
+               animSlide();
+       }
+
 }
 
 function preloadSlides() {
-    
-    var i=0;
-    
-    $('.slide[data-image]').each(function(){
-            var slide=this;
-            var image=new Image();
-            image.src=$(this).attr('data-image');
-           
-            if(image.complete){
-                    $(this).html("<a href='" + $(this).attr('data-link') + "'><img src='" + $(this).attr('data-image') + "' /></a>");
-            }
-            
-            $(image).load(function(){
-                    $(slide).html("<a href='" + $(slide).attr('data-link') + "'><img src='" + $(slide).attr('data-image') + "' /></a>");
-            });
-            
-            i++;
-    });
+
+       var i = 0;
+
+       $('.slide[data-image]').each(function() {
+               var slide = this;
+               var image = new Image();
+               image.src = $(this).attr('data-image');
+
+               if (image.complete) {
+                       $(this).html("<a href='" + $(this).attr('data-link') + "'><img src='" + $(this).attr('data-image') + "' /></a>");
+               }
+
+               $(image).load(function() {
+                       $(slide).html("<a href='" + $(slide).attr('data-link') + "'><img src='" + $(slide).attr('data-image') + "' /></a>");
+               });
+
+               i++;
+       });
 }
 
 function initLinks() {
-    
-    $('.next').click(function(){
-        
-        autoSlide = false;
-        
-        if( currentSlideId < nbSlides-1 && !isAnim)
-        {
-            currentSlideId++;
-        }else{
-            currentSlideId=0;
-        }
-        
-        animSlide();
-        
-        return false;
-    });
-    
-    $('.prev').click(function(){
-        
-        autoSlide = false;
-        
-        if( currentSlideId > 0 && !isAnim )
-        {
-           currentSlideId--;
-        }else{
-            currentSlideId = nbSlides-1;
-        }
-        
-         animSlide();
-        
-        return false;
-    });
-    
+
+       $('.next').click(function() {
+
+               autoSlide = false;
+
+               if (currentSlideId < nbSlides - 1 && !isAnim)
+               {
+                       currentSlideId++;
+               } else {
+                       currentSlideId = 0;
+               }
+
+               animSlide();
+
+               return false;
+       });
+
+       $('.prev').click(function() {
+
+               autoSlide = false;
+
+               if (currentSlideId > 0 && !isAnim)
+               {
+                       currentSlideId--;
+               } else {
+                       currentSlideId = nbSlides - 1;
+               }
+
+               animSlide();
+
+               return false;
+       });
+
 }
 
 function animSlide() {
-    isAnim = true;
-    $('#slide-legend').fadeOut();
+       isAnim = true;
+       $('#slide-legend').fadeOut();
+
+       $(currentSlide).fadeOut(animDuration, function() {
 
-    $(currentSlide).fadeOut(animDuration,function(){
+               currentSlide = $('#slide-' + currentSlideId);
 
-            currentSlide = $('#slide-'+currentSlideId);
+               var legende = currentSlide.attr('data-legend');
 
-            var legende = currentSlide.attr('data-legend');
-            
-            $('#slide-legend').html(legende);
+               $('#slide-legend').html(legende);
 
-            $('#slide-'+currentSlideId).fadeIn();
-            
-            $('#slide-legend').fadeIn();
+               $('#slide-' + currentSlideId).fadeIn();
 
-            isAnim = false;
-            
-             if( autoSlide ) {
-                time = $('#slide-'+currentSlideId).attr('data-time');
-                fb(time);
-                switchTimer = window.setTimeout( nextSlide, time);
-            }
-    
+               $('#slide-legend').fadeIn();
 
-     });
+               isAnim = false;
+
+               if (autoSlide) {
+                       time = $('#slide-' + currentSlideId).attr('data-time');
+                       fb(time);
+                       switchTimer = window.setTimeout(nextSlide, time);
+               }
+
+
+       });
 }
 
 function checkPages() {
-    if( currentSlideId >= nbSlides-1) {
-        $('.next').css("visibility","hidden");
-    }
-    if( currentSlideId == 0 ) {
-        if( nbSlides-1 > 0) {
-          $('.next').css("visibility","visible");  
-        }
-         $('.prev').css("visibility","hidden");
-    }else{
-         $('.prev').css("visibility","visible");
-    }
-    
+       if (currentSlideId >= nbSlides - 1) {
+               $('.next').css("visibility", "hidden");
+       }
+       if (currentSlideId == 0) {
+               if (nbSlides - 1 > 0) {
+                       $('.next').css("visibility", "visible");
+               }
+               $('.prev').css("visibility", "hidden");
+       } else {
+               $('.prev').css("visibility", "visible");
+       }
+
 }
\ No newline at end of file
diff --git a/js/test.coffee b/js/test.coffee
new file mode 100644 (file)
index 0000000..e6bb9bc
--- /dev/null
@@ -0,0 +1,28 @@
+$ ->
+       yearsOld = max: 10, ida: 9, tim: 11
+
+       ages = for child, age of yearsOld
+               "#{child} is #{age}"
+
+       range = (x)=>x+parseFloat "5.5"
+
+       interval = setInterval =>
+               parseFloat 5.5
+               , 1000
+
+
+class Animal
+       constructor: ()->
+               @papates=2
+
+class Nutria extends Animal
+       constructor:()->
+               @papates=4
+       $(".pate").click ()=>
+               fb @papates
+
+
+((w,d) ->
+       $ ->
+               parseFloat '5.5'
+)(window,document)
\ No newline at end of file
diff --git a/js/test.js b/js/test.js
new file mode 100644 (file)
index 0000000..72751d7
--- /dev/null
@@ -0,0 +1,62 @@
+// Generated by CoffeeScript 1.8.0
+var Animal, Nutria,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+$(function() {
+  var age, ages, child, interval, range, yearsOld;
+  yearsOld = {
+    max: 10,
+    ida: 9,
+    tim: 11
+  };
+  ages = (function() {
+    var _results;
+    _results = [];
+    for (child in yearsOld) {
+      age = yearsOld[child];
+      _results.push("" + child + " is " + age);
+    }
+    return _results;
+  })();
+  range = (function(_this) {
+    return function(x) {
+      return x + parseFloat("5.5");
+    };
+  })(this);
+  return interval = setInterval((function(_this) {
+    return function() {
+      return parseFloat(5.5, 1000);
+    };
+  })(this));
+});
+
+Animal = (function() {
+  function Animal() {
+    this.papates = 2;
+  }
+
+  return Animal;
+
+})();
+
+Nutria = (function(_super) {
+  __extends(Nutria, _super);
+
+  function Nutria() {
+    this.papates = 4;
+  }
+
+  $(".pate").click(function() {
+    return fb(Nutria.papates);
+  });
+
+  return Nutria;
+
+})(Animal);
+
+(function(w, d) {
+  return $(function() {
+    return parseFloat('5.5');
+  });
+})(window, document);
index d43d5d8556b6da287cd719308fabdbdf3d7affe8..48999c75c4871dee3169214973d7a3f7cf3ad5ff 100644 (file)
                position:absolute;
                top:-1px;
                left:-34px;
+
+               &:hover{
+                       .svg{
+                               cursor:pointer;
+                               svg{
+                                       #Background{
+                                               fill:#ff0000 !important;
+                                       }
+                               }
+                       }
+               }
     }
 
     .sublogo {