From: vincent@cubedesigners.com Date: Fri, 21 Nov 2014 13:52:04 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=226fa377dda1803bcfa497bad34d1e69d5107582;p=cubedesigners-v7.git --- diff --git a/framework/application/layouts/scripts/layout.phtml b/framework/application/layouts/scripts/layout.phtml index a4c278a..710784e 100644 --- a/framework/application/layouts/scripts/layout.phtml +++ b/framework/application/layouts/scripts/layout.phtml @@ -1,21 +1,22 @@ - array('families' => array('roboto_condensedlight'), 'urls' => array('/css/fonts/robotocondensed-light.css?nocache=1'))); -$fonts = array('google' => array('families' => array('Roboto+Condensed:400,300,700:latin'))); -$this->headScript()->addGSAP(); -$this->headScript()->addWebFont($fonts); - -if ($this->acl()->isAllowed('edition')) { - $this->headScript()->addCommonsAdmin(); -} -$this->headScript()->addIEConditionnals(); -$this->headScript()->appendFile('/js/common.js'); -$this->headLink()->appendStylesheet('/less/common.less', 'all'); - -$this->headMeta()->setViewport(1080); - -profile(__FILE__, __LINE__, 'Before rendering body'); -$res = $this->htmlPage($this->render('common/body.phtml')); -profile(__FILE__, __LINE__, 'Body rendered'); -echo $res; -endProfile(); + array('families' => array('roboto_condensedlight'), 'urls' => array('/css/fonts/robotocondensed-light.css?nocache=1'))); +$fonts = array('google' => array('families' => array('Roboto+Condensed:400,300,700:latin'))); +$this->headScript()->addGSAP(); +$this->headScript()->addWebFont($fonts); +$this->headScript()->addFastclick(); + +if ($this->acl()->isAllowed('edition')) { + $this->headScript()->addCommonsAdmin(); +} +$this->headScript()->addIEConditionnals(); +$this->headScript()->appendFile('/js/common.js'); +$this->headLink()->appendStylesheet('/less/common.less', 'all'); + +$this->headMeta()->setViewport(1080); + +profile(__FILE__, __LINE__, 'Before rendering body'); +$res = $this->htmlPage($this->render('common/body.phtml')); +profile(__FILE__, __LINE__, 'Body rendered'); +echo $res; +endProfile(); diff --git a/framework/application/views/helpers/CategoriesList.php b/framework/application/views/helpers/CategoriesList.php index 8ad7142..e3f5e60 100644 --- a/framework/application/views/helpers/CategoriesList.php +++ b/framework/application/views/helpers/CategoriesList.php @@ -26,7 +26,7 @@ class Cubedesigners_View_Helper_CategoriesList extends Zend_View_Helper_Abstract $db = Zend_Db_Table::getDefaultAdapter(); $s = $db->select()->from('categories') - ->order('name ASC'); + ->order('id ASC'); $q = $s->query(); @@ -37,8 +37,6 @@ class Cubedesigners_View_Helper_CategoriesList extends Zend_View_Helper_Abstract } } $res.=$this->view->tags($tags, array('data-perline' => $itemsPerLine, 'data-list' => '#' . $listId)); - - return $res; } diff --git a/framework/application/views/helpers/HomeSlideshow.php b/framework/application/views/helpers/HomeSlideshow.php index 4f4b97f..43d1bdc 100644 --- a/framework/application/views/helpers/HomeSlideshow.php +++ b/framework/application/views/helpers/HomeSlideshow.php @@ -51,5 +51,3 @@ class Cubedesigners_View_Helper_HomeSlideshow extends CubeIT_View_Helper_Abstrac } } - -?> diff --git a/framework/application/views/helpers/Tags.php b/framework/application/views/helpers/Tags.php index d6c3e1c..0c48af6 100644 --- a/framework/application/views/helpers/Tags.php +++ b/framework/application/views/helpers/Tags.php @@ -17,8 +17,6 @@ class Cubedesigners_View_Helper_Tags extends CubeIT_View_Helper_ListUnordered { foreach ($tags as $id => $name) { $items[] = array('content' => $name, 'data-id' => $id); } - fb($items); - fb($attrs); return $this->listUnordered($items, $attrs); } diff --git a/framework/application/views/scripts/templates/agence.phtml b/framework/application/views/scripts/templates/agence.phtml index 7fbd109..e849aef 100644 --- a/framework/application/views/scripts/templates/agence.phtml +++ b/framework/application/views/scripts/templates/agence.phtml @@ -1,5 +1,6 @@ headScript()->addScriptAndStyle('agence'); +$this->headScript()->addScriptAndStyle('slideshow'); echo $this->twocols(); ?> @@ -13,7 +14,7 @@ echo $this->twocols();
-
imageSlideshowContinuous($this->photo, 545); ?>
+
imageSlideshowContinuous($this->photo, 650, array(), array('arrowspermanent' => 1)); ?>
diff --git a/js/carrousel.js b/js/carrousel.js deleted file mode 100644 index b070873..0000000 --- a/js/carrousel.js +++ /dev/null @@ -1,11 +0,0 @@ -registerLoader(loadCarrousel); - -function loadCarrousel() { - $(window).on('cubeitresize', function () { - var ww = $(window).width(); - var m = (ww - 1600) / 2; - $(".slideshow .imgholder").css({marginLeft: m}); - $(".slideshow .arrows").css({left: 960 + ((ww - 960) / 2) - 77 - 10}); - }); -} - diff --git a/js/casestudies.js b/js/casestudies.js index e269a2a..be4a455 100644 --- a/js/casestudies.js +++ b/js/casestudies.js @@ -1,56 +1,54 @@ -TO_LOAD_ONCE[TO_LOAD_ONCE.length]='load_casestudies();'; - -var showIds = new Array(); - -function load_casestudies() { - - initTagsLink(); -} - -function initTagsLink() { - - $(".tag").click(function() { - - - $(this).toggleClass('active'); - - if( $(this).hasClass('active') ) { - if( $(this).attr("data-id") != 0) { - showIds.push( $(this).attr("data-id") ); - }else{ - showIds = new Array(); - $(".tag").removeClass('active'); - } - } else { - var index = $.inArray( $(this).attr("data-id"), showIds ); - showIds.splice(index, 1); - } - - if( showIds.length > 0 ) { - $(".tag:first").removeClass('active'); - }else{ - $(".tag:first").addClass('active'); - } - - displayStudies(); - }); - -} - -function displayStudies() { - - if( showIds.length ) { - $('#casestudies-list .bloc').each(function(){ - var categories = $(this).attr("data-categories"); - if( $.inArray( categories, showIds ) == -1 ) { - $(this).fadeOut( 500, function() {}); - }else{ - $(this).fadeIn( 500, function() {}); - } - }); - }else{ - $( '#casestudies-list .bloc' ).fadeIn( 500, function() {}); - } - -} - +TO_LOAD_ONCE[TO_LOAD_ONCE.length] = 'load_casestudies();'; + +var showIds = new Array(); + +function load_casestudies() { + initTagsLink(); +} + +function initTagsLink() { + $(".tag").click(function () { + $(this).toggleClass('active'); + + if ($(this).hasClass('active')) { + if ($(this).attr("data-id") != 0) { + showIds.push($(this).attr("data-id")); + } else { + showIds = new Array(); + $(".tag").removeClass('active'); + } + } else { + var index = $.inArray($(this).attr("data-id"), showIds); + showIds.splice(index, 1); + } + + if (showIds.length > 0) { + $(".tag:first").removeClass('active'); + } else { + $(".tag:first").addClass('active'); + } + + displayStudies(); + }); + +} + +function displayStudies() { + + if (showIds.length) { + $('#casestudies-list .bloc').each(function () { + var categories = $(this).attr("data-categories"); + if ($.inArray(categories, showIds) == -1) { + $(this).fadeOut(500, function () { + }); + } else { + $(this).fadeIn(500, function () { + }); + } + }); + } else { + $('#casestudies-list .bloc').fadeIn(500, function () { + }); + } +} + diff --git a/js/slideshow.js b/js/slideshow.js new file mode 100644 index 0000000..7785807 --- /dev/null +++ b/js/slideshow.js @@ -0,0 +1,13 @@ +registerLoader(loadCarrousel); + +function loadCarrousel() { + $(window).on('cubeitresize', function () { + var s = $(".slideshow,.slideshowcontinuous"); + fb(s); + var ww = $(window).width(); + var m = (ww - 1600) / 2; + $(s).find(".imgholder").css({marginLeft: m}); + $(s).find(".arrows").css({left: 960 + ((ww - 960) / 2) - 77 - 10}); + }); +} + diff --git a/js/taglist.js b/js/taglist.js index 9d24339..95091a5 100644 --- a/js/taglist.js +++ b/js/taglist.js @@ -10,13 +10,11 @@ init: function () { var $this = this; this.element.on('click', "li[data-id]", function () { - fb(this); if ($(this).hasClass('active')) { return false; } var id = $(this).data('id'); - $this.filter(id); $(this).siblings().removeClass('active'); diff --git a/less/carrousel.less b/less/carrousel.less deleted file mode 100644 index 2fdabd0..0000000 --- a/less/carrousel.less +++ /dev/null @@ -1,89 +0,0 @@ - -/* Home Slideshow */ -#home-slideshow { - height:572px; - overflow:visible; - .slides-holder { - height:572px; - overflow:visible; - - .slides { - height:572px; - position:relative; - width:100%; - overflow:visible; - - .slide { - position:absolute; - display:none; - background-repeat: repeat-x; - background-position: 0 100%; - width:100%; - height:572px; - overflow:visible; - .masque{ - width:100%; - position: relative; - overflow:hidden; - .imgholder{ - width:1600px; - height:572px; - position: relative; - margin:0 auto; - overflow:visible; - - img,canvas{ - - } - } - } - } - a { - margin:0; - padding: 0; - } - - - .arrows{ - position:absolute; - bottom:48px; - display:block; - width:77px; - height:38px; - white-space:nowrap; - z-index:3; - a { - background-color: transparent; - width: 37px; - height: 38px; - top:auto !important; - display:inline-block; - position:static; - border-radius:3px; - - //padding: 0 0 25px; - &:hover { - background-color: #3885e0; - } - - &.prev { - background-image: url('../images/slideshow/arrows.png'); - background-position: 10px 8px; - margin-right: 10px; - } - - &.next { - background-image: url('../images/slideshow/arrows.png'); - background-position: -26px 8px; - } - } - } - } - } -} -#slide-legend { - padding: 25px 0 0 0; - margin-right: 30px; - font-size: 18px; - float:right; -} diff --git a/less/common.less b/less/common.less index 74243e1..bf8d6e9 100644 --- a/less/common.less +++ b/less/common.less @@ -52,6 +52,7 @@ a.but { margin:15px 0 0 0; font-weight:400; font-size:16px; + text-decoration:none !important; &:hover,&.active { background-color: #84ae1e !important; color:#fff !important; diff --git a/less/slideshow.less b/less/slideshow.less new file mode 100644 index 0000000..ee4abf1 --- /dev/null +++ b/less/slideshow.less @@ -0,0 +1,111 @@ +/* Home Slideshow */ +#home-slideshow { + height:572px; + overflow:visible; + .slides-holder { + height:572px; + overflow:visible; + + .slides { + .slideshowmixin(); + } + } +} + +.slideshowcontinuous{ + + .slideshowmixin(); + .arrows{ + a{ + background-color:rgba(56,133,224,0.25); + background-color:rgba(0,0,0,0.25); + } + } + .slide{ + background-repeat: no-repeat; + background-size:cover; + background-position:50% 50% !important; + } + +} + +#slide-legend { + padding: 25px 0 0 0; + margin-right: 30px; + font-size: 18px; + float:right; +} + +.slideshowmixin(){ + + height:572px; + position:relative; + width:100%; + overflow:visible; + + .slide { + position:absolute; + display:none; + background-repeat: repeat-x; + background-position: 0 100%; + width:100%; + height:572px; + overflow:visible; + .masque{ + width:100%; + position: relative; + overflow:hidden; + .imgholder{ + width:1600px; + height:572px; + position: relative; + margin:0 auto; + overflow:visible; + + img,canvas{ + + } + } + } + } + a { + margin:0; + padding: 0; + } + + + .arrows{ + position:absolute; + bottom:48px; + display:block; + width:77px; + height:38px; + white-space:nowrap; + z-index:3; + a { + background-color: transparent; + width: 37px; + height: 38px; + top:auto !important; + display:inline-block; + position:static; + border-radius:3px; + + //padding: 0 0 25px; + &:hover { + background-color: #3885e0; + } + + &.prev { + background-image: url('../images/slideshow/arrows.png'); + background-position: 10px 8px; + margin-right: 10px; + } + + &.next { + background-image: url('../images/slideshow/arrows.png'); + background-position: -26px 8px; + } + } + } +} \ No newline at end of file