From 9e184e2f57882647296494e40b165e4e5c88496f Mon Sep 17 00:00:00 2001 From: "bruno@cubedesigners.com" Date: Wed, 22 Jan 2014 08:26:26 +0000 Subject: [PATCH] --- .../forms/CMS/Sub/Agence/Persons.php | 19 +++ .../forms/CMS/Sub/Agence/Pictos.php | 15 ++ .../forms/CMS/Sub/Home/Agence/Bloc.php | 24 +++ .../forms/CMS/Sub/Home/Agence/Blocs.php | 16 ++ .../forms/CMS/Sub/Home/Expertises.php | 19 +++ .../forms/CMS/Sub/Home/Expertises/Bloc.php | 24 +++ .../forms/CMS/Sub/Home/Expertises/Blocs.php | 16 ++ .../forms/CMS/Sub/Home/Slideshow.php | 14 ++ .../forms/CMS/Sub/Home/Slideshow/Slide.php | 24 +++ .../forms/CMS/Sub/Home/Slideshow/Slides.php | 16 ++ .../application/views/helpers/AgencyBlocs.php | 39 +++++ .../views/helpers/AgencyPictos.php | 41 +++++ .../application/views/helpers/HomeBlocs.php | 38 +++++ .../views/helpers/HomeSlideshow.php | 41 +++++ .../views/scripts/templates/agence.phtml | 27 ++++ images/next.png | Bin 0 -> 269 bytes images/picto_footer_mail.svg | 17 ++ images/prev.png | Bin 0 -> 251 bytes js/home.js | 138 +++++++++++++++++ less/agence.less | 146 ++++++++++++++++++ 20 files changed, 674 insertions(+) create mode 100644 framework/application/forms/CMS/Sub/Agence/Persons.php create mode 100644 framework/application/forms/CMS/Sub/Agence/Pictos.php create mode 100644 framework/application/forms/CMS/Sub/Home/Agence/Bloc.php create mode 100644 framework/application/forms/CMS/Sub/Home/Agence/Blocs.php create mode 100644 framework/application/forms/CMS/Sub/Home/Expertises.php create mode 100644 framework/application/forms/CMS/Sub/Home/Expertises/Bloc.php create mode 100644 framework/application/forms/CMS/Sub/Home/Expertises/Blocs.php create mode 100644 framework/application/forms/CMS/Sub/Home/Slideshow.php create mode 100644 framework/application/forms/CMS/Sub/Home/Slideshow/Slide.php create mode 100644 framework/application/forms/CMS/Sub/Home/Slideshow/Slides.php create mode 100644 framework/application/views/helpers/AgencyBlocs.php create mode 100644 framework/application/views/helpers/AgencyPictos.php create mode 100644 framework/application/views/helpers/HomeBlocs.php create mode 100644 framework/application/views/helpers/HomeSlideshow.php create mode 100644 framework/application/views/scripts/templates/agence.phtml create mode 100644 images/next.png create mode 100644 images/picto_footer_mail.svg create mode 100644 images/prev.png create mode 100644 js/home.js create mode 100644 less/agence.less diff --git a/framework/application/forms/CMS/Sub/Agence/Persons.php b/framework/application/forms/CMS/Sub/Agence/Persons.php new file mode 100644 index 0000000..8fd47fb --- /dev/null +++ b/framework/application/forms/CMS/Sub/Agence/Persons.php @@ -0,0 +1,19 @@ +setLabel('Titre'); + $this->addElement($titre); + + $blocs = new Cubedesigners_Form_CMS_Sub_Agence_Persons_Blocs('blocs'); + $blocs->setLegend('Personnes'); + $this->addSubForm($blocs, 'blocs'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Agence/Pictos.php b/framework/application/forms/CMS/Sub/Agence/Pictos.php new file mode 100644 index 0000000..15b5d64 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Agence/Pictos.php @@ -0,0 +1,15 @@ +setLegend('Pictos'); + $this->addSubForm($blocs, 'blocs'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Agence/Bloc.php b/framework/application/forms/CMS/Sub/Home/Agence/Bloc.php new file mode 100644 index 0000000..39c0f0e --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Agence/Bloc.php @@ -0,0 +1,24 @@ +setLabel('Titre du bloc'); + $this->addElement($titre); + + $texte = new CubeIT_Form_Element_Markitup_Basic('texte'); + $texte->setLabel('Texte'); + $this->addElement($texte); + + $picto = new CubeIT_Form_Element_File_Image('picto'); + $picto->setLabel('Pictogramme'); + $picto->setMaxItems(1); + $this->addElement($picto); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Agence/Blocs.php b/framework/application/forms/CMS/Sub/Home/Agence/Blocs.php new file mode 100644 index 0000000..a908f90 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Agence/Blocs.php @@ -0,0 +1,16 @@ +setBaseSubForm($bloc); + $this->setBaseLegend('Edition du bloc « $titre »'); + $this->setNewLegend('Nouveau bloc'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Expertises.php b/framework/application/forms/CMS/Sub/Home/Expertises.php new file mode 100644 index 0000000..3a9820e --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Expertises.php @@ -0,0 +1,19 @@ +setLabel('Titre'); + $this->addElement($titre); + + $blocs = new Cubedesigners_Form_CMS_Sub_Home_Expertises_Blocs('blocs'); + $blocs->setLegend('Sous-blocs'); + $this->addSubForm($blocs, 'blocs'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Expertises/Bloc.php b/framework/application/forms/CMS/Sub/Home/Expertises/Bloc.php new file mode 100644 index 0000000..3b36dfb --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Expertises/Bloc.php @@ -0,0 +1,24 @@ +setLabel('Titre du bloc'); + $this->addElement($titre); + + $texte = new CubeIT_Form_Element_Markitup_Basic('texte'); + $texte->setLabel('Texte'); + $this->addElement($texte); + + $picto = new CubeIT_Form_Element_File_Image('picto'); + $picto->setLabel('Pictogramme'); + $picto->setMaxItems(1); + $this->addElement($picto); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Expertises/Blocs.php b/framework/application/forms/CMS/Sub/Home/Expertises/Blocs.php new file mode 100644 index 0000000..49265e3 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Expertises/Blocs.php @@ -0,0 +1,16 @@ +setBaseSubForm($bloc); + $this->setBaseLegend('Edition du bloc « $titre »'); + $this->setNewLegend('Nouveau bloc'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Slideshow.php b/framework/application/forms/CMS/Sub/Home/Slideshow.php new file mode 100644 index 0000000..4157a77 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Slideshow.php @@ -0,0 +1,14 @@ +setLegend('Slides'); + $this->addSubForm($slides, 'slides'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Slideshow/Slide.php b/framework/application/forms/CMS/Sub/Home/Slideshow/Slide.php new file mode 100644 index 0000000..7417b5b --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Slideshow/Slide.php @@ -0,0 +1,24 @@ +setLabel('Image'); + $image->setMaxItems(1); + $this->addElement($image); + + $legend = new Zend_Form_Element_Text('legende'); + $legend->setLabel('Legende'); + $this->addElement($legend); + + $link = new CubeIT_Form_Element_Link('lien'); + $link->labelEnabled(false); + $this->addSubForm($link, 'lien'); + } + +} + +?> diff --git a/framework/application/forms/CMS/Sub/Home/Slideshow/Slides.php b/framework/application/forms/CMS/Sub/Home/Slideshow/Slides.php new file mode 100644 index 0000000..7f6b355 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Home/Slideshow/Slides.php @@ -0,0 +1,16 @@ +setBaseSubForm($slide); + $this->setBaseLegend('Edition du slide « $legende »'); + $this->setNewLegend('Nouveau slide'); + } + +} + +?> diff --git a/framework/application/views/helpers/AgencyBlocs.php b/framework/application/views/helpers/AgencyBlocs.php new file mode 100644 index 0000000..46ef2a2 --- /dev/null +++ b/framework/application/views/helpers/AgencyBlocs.php @@ -0,0 +1,39 @@ +'; + + $i = 0; + + foreach ($blocs as $id => $bloc) { + + if (($i % 2) == 0 && $i != 0) { + $res.='
'; + } + + //$image = $this->view->imageProcess($bloc['picto'], $bloc['titre'], 120, 120); + //$image = $this->view->imageCms($bloc['photo'], $bloc['photo'], 120, 120); + $image = $this->view->imageProcess()->imageProcessGetUrl($bloc['photo'], $bloc['titre'], 120, 120); + + + $res.='
'; + $res.=''; + $res.='

' . $this->view->markupDotclear($bloc['titre']) . '

'; + $res.='' . $this->view->markupDotclear($bloc['texte']) . ''; + $res.='
'; + + $i++; + } + + $res .= ''; + return $res; + } + +} + +?> diff --git a/framework/application/views/helpers/AgencyPictos.php b/framework/application/views/helpers/AgencyPictos.php new file mode 100644 index 0000000..915953c --- /dev/null +++ b/framework/application/views/helpers/AgencyPictos.php @@ -0,0 +1,41 @@ +'; + + $i = 0; + + foreach ($blocs as $id => $bloc) { + + if (($i % 3) == 0 && $i != 0) { + $res.='
'; + } + + $image = $this->view->imageCms($bloc['picto'], '', 70, 70, array()); + // $image = $this->view->imageProcess($bloc['picto'], $bloc['picto'], 70, 70, array(), 'C', 'C', 'M', false, 'auto', null, 92, 'files'); + //$image = $this->view->imageProcess()->imageProcessGetUrl($bloc['picto'], $bloc['titre'], 120, 120); + + + $res.='
'; + //$res.=''; + $res.=$image; + $res.= $this->view->markupDotclear($bloc['texte']); + //$res.='

' . $this->view->markupDotclear($bloc['titre']) . '

'; + //$res.='

' . $this->view->markupDotclear($bloc['soustitre']) . '

'; + $res.='
'; + + $i++; + } + + $res .= ''; + return $res; + } + +} + +?> diff --git a/framework/application/views/helpers/HomeBlocs.php b/framework/application/views/helpers/HomeBlocs.php new file mode 100644 index 0000000..54e1fb2 --- /dev/null +++ b/framework/application/views/helpers/HomeBlocs.php @@ -0,0 +1,38 @@ +'; + + $i = 0; + + foreach ($blocs as $id => $bloc) { + + if (($i % 2) == 0 && $i != 0) { + $res.='
'; + } + + //$image = $this->view->imageProcess($bloc['picto'], $bloc['titre'], 120, 120); + + $image = $this->view->imageCms($bloc['picto'], $bloc['titre'], 120, 120); + + $res.='
'; + $res.= $image; + $res.= '

' . $this->view->markupDotclear($bloc['titre']) . '

'; + $res.= '' . $this->view->markupDotclear($bloc['texte']) . ''; + $res.='
'; + + $i++; + } + + $res .= ''; + return $res; + } + +} + +?> diff --git a/framework/application/views/helpers/HomeSlideshow.php b/framework/application/views/helpers/HomeSlideshow.php new file mode 100644 index 0000000..9777527 --- /dev/null +++ b/framework/application/views/helpers/HomeSlideshow.php @@ -0,0 +1,41 @@ +'; + + foreach ($slides as $id => $slide) { + + $l = ''; + + if (!empty($slide["lien"]["page"])) { + $page = $this->view->navigation()->getContainer()->findOneById($this->view->localeDefault() . '/' . $slide["lien"]["page"]); + $l = $page->getHref(); + } + + if (!empty($slide["lien"]["url"]) && empty($l)) { + $l = $slide["lien"]["url"]; + } + + + $image = $this->view->imageProcess()->imageProcessGetUrl($slide['image'], $slide['legende'], 980, 400); + $res.='
'; + } + + + $res .= ''; + $res .= ''; + $res .= ''; + $res .= '
'; + + return $res; + } + +} + +?> diff --git a/framework/application/views/scripts/templates/agence.phtml b/framework/application/views/scripts/templates/agence.phtml new file mode 100644 index 0000000..646c151 --- /dev/null +++ b/framework/application/views/scripts/templates/agence.phtml @@ -0,0 +1,27 @@ +headScript()->addScriptAndStyle('agence'); +?> + +
markupDotclear($this->titre); ?>
+
+
markupDotclear($this->colonnegauche); ?>
+
markupDotclear($this->colonnedroite); ?>
+
+ +
+
+ agencyPictos($this->pictos); ?> +
+
+ +
imageProcess($this->photo, '', 1200, 545); ?>
+ +
+
+ +

equipe['titre']); ?>

+ + agencyBlocs($this->equipe); ?> + +
+
\ No newline at end of file diff --git a/images/next.png b/images/next.png new file mode 100644 index 0000000000000000000000000000000000000000..228516a0f47df1dfcbb68ccd9d390168550c4e94 GIT binary patch literal 269 zcmV+o0rLKdP)f8#p+6 z1HnO@Met&dT@?h!4n2e5>goZUoC^H{36zrLJ%9K}0{@qgq;}3#}ZfFs=GpK|Ha$#PD}mQzBpJQvjRR4|pJu(Ot<@PfCc?9;#p*5N1Bi~ + + + + + + + + + + + + + + + diff --git a/images/prev.png b/images/prev.png new file mode 100644 index 0000000000000000000000000000000000000000..37acecfb70c9ee9f4e6441a7b8082f91f2df1132 GIT binary patch literal 251 zcmeAS@N?(olHy`uVBq!ia0vp^JU}eQ!3HG1Sky`ZDajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_d9MRPq}978H@B~6(&Eloj4h54hAn3Cvr=0aA1-9{4^{4f>R z4y0~KcIX>VTqL1#!lf%IMyf#T*fPfTNhQ22qRQC{UWPu-d?6q8ow^dG%osl^E2K4N zr70|7TyjIqYdPabA15gZkBcobUM`tV{p?M%HXJpH^WAYt$j|pjkan1FOOcGv<-`@s v;*UJBn6b>-VbAOvHoTXXFdnIAWa44iJ=ezKkAi3h(4h>Tu6{1-oD!M0){ + + var image=new Image(); + image.src=currentSlide.attr('data-image'); + + if(image.complete){ + currentSlide.html(""); + } + + $(image).load(function(){ + currentSlide.html(""); + }); + + var legend = currentSlide.attr('data-legend'); + $('#slide-legend').html(legend); + + $('.slide:first').fadeIn(); + } + + initLinks(); + checkPages(); + +} + +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(""); + } + + $(image).load(function(){ + $(slide).html(""); + }); + + i++; + }); +} + +function initLinks() { + + $('.next').click(function(){ + if( currentSlideId < nbSlides-1 && !isAnim) + { + isAnim = true; + $('#slide-legend').fadeOut(); + + $(currentSlide).fadeOut(animDuration,function(){ + + currentSlideId++; + + currentSlide = $('#slide-'+currentSlideId); + + var legende = currentSlide.attr('data-legend'); + $('#slide-legend').html(legende); + + $('#slide-'+currentSlideId).fadeIn(); + $('#slide-legend').fadeIn(); + + isAnim = false; + + checkPages(); + + }); + } + + return false; + }); + + $('.prev').click(function(){ + if( currentSlideId > 0 && !isAnim ) + { + isAnim = true; + $('#slide-legend').fadeOut(); + + $(currentSlide).fadeOut(animDuration,function(){ + + currentSlideId--; + + currentSlide = $('#slide-'+currentSlideId); + + var legende = currentSlide.attr('data-legend'); + $('#slide-legend').html(legende); + + $('#slide-'+currentSlideId).fadeIn(); + $('#slide-legend').fadeIn(); + + isAnim = false; + + checkPages(); + }); + } + + return false; + }); + +} + +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"); + } + +} \ No newline at end of file diff --git a/less/agence.less b/less/agence.less new file mode 100644 index 0000000..e1c905c --- /dev/null +++ b/less/agence.less @@ -0,0 +1,146 @@ +/* Agence Title */ +.agency-title { + min-width: 980px; + max-width: 980px; + margin: 0 auto; + padding: 50px 0 50px 0; +} + +.agency-title h1 { + text-align: left; + font-weight: normal; + font-size: 56px; +} + +.agency-title h2 { + text-align: left; + font-weight: normal; + font-size: 22px; +} + +/* Agence description */ +.agency-description { + min-width: 980px; + max-width: 980px; + margin: 0 auto; + overflow: hidden; + padding: 0 0 50px 0; +} + +.agency-description .col { + float:left; + //width:50%; + margin-right: 20px; + width: 47%; +} + +.agency-description .col .dotclear { + width:95%; +} + +/* Agence pictos */ +.agency-pictos .bloc-holder { + min-width: 980px; + max-width: 980px; + width:100%; + margin: 0 auto; + padding: 0 0 50px 0; + overflow:hidden; +} + +.agency-pictos .bloc-holder h2 { + font-weight: normal; + font-size:32px; +} + +.agency-pictos .bloc-holder .sousbloc { + float:left; + //width:50%; + width:30%; + margin-right: 20px; +} +.agency-pictos .bloc-holder .blocs .spacer { + clear:left; + padding:25px 0; +} + +.agency-pictos .bloc-holder .dotclear { + height:70px; + display: table-cell; + vertical-align: middle; +} + +.agency-pictos .bloc-holder .sousbloc img { + float:left; + padding-right: 20px; +} + + + +/* Agence photo */ +.agency-photo { + overflow:hidden; + text-align: center; +} + +.agency-photo img { + vertical-align: bottom; +} + +/* Agence equipe */ +.agency-persons { + background-color:#3885e0; + color:#fff; +} + +.agency-persons .bloc-holder { + min-width: 980px; + max-width: 980px; + width:100%; + margin: 0 auto; + padding: 50px 0; + overflow:hidden; +} + +.agency-persons .bloc-holder h1 { + font-family: 'roboto_condensedlight'; + font-weight: normal; + font-size:56px; +} + +.agency-persons .bloc-holder h2{ + font-family: 'roboto_condensedlight'; + font-weight: normal; + font-size:32px; + padding: 0 0 20px 0; +} + +.agency-persons .bloc-holder .blocs { + padding: 40px 0; +} + +.agency-persons .bloc-holder .blocs .spacer { + clear:left; + padding:25px 0; +} + +.agency-persons .bloc-holder .sousbloc { + float:left; + //width:50%; + width:47%; + margin-right: 20px; +} + +.agency-persons .bloc-holder .sousbloc .texte { + width: 60%; + float:left; +} + +.agency-persons .bloc-holder .sousbloc .photo { + width:120px; + height:120px; + float:left; + margin: 10px 50px 0 0; + border-radius: 60px; +} + -- 2.39.5