From 877d49d55a4a7650b3aa2b7a8c67b8af17c1ef40 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 14 Jan 2025 16:56:16 +0100 Subject: [PATCH] wait #7235 @0.5 --- .../application/views/helpers/AgencyBlocs.php | 3 +- .../views/scripts/templates/agence.phtml | 1 + js/agence.js | 9 + less/agence.less | 296 ++++++++++-------- less/link-arrow.less | 1 + 5 files changed, 177 insertions(+), 133 deletions(-) create mode 100644 js/agence.js diff --git a/framework/application/views/helpers/AgencyBlocs.php b/framework/application/views/helpers/AgencyBlocs.php index 9f71c74..7da9764 100644 --- a/framework/application/views/helpers/AgencyBlocs.php +++ b/framework/application/views/helpers/AgencyBlocs.php @@ -23,7 +23,8 @@ class Cubedesigners_View_Helper_AgencyBlocs extends Zend_View_Helper_Abstract { $res.='
'; $res.='

' . $bloc['titre'] . '

'; $res.='' . $bloc['poste'] . ''; - $res.= $this->view->markupDotclear($bloc['texte'], array('class' => 'texte')); + $res.= ''. $this->view->linkArrow('Biography').''; + $res.='
'.$bloc['texte'].'
'; $res.='
'; $i++; diff --git a/framework/application/views/scripts/templates/agence.phtml b/framework/application/views/scripts/templates/agence.phtml index 75c481f..f9f48ec 100644 --- a/framework/application/views/scripts/templates/agence.phtml +++ b/framework/application/views/scripts/templates/agence.phtml @@ -1,6 +1,7 @@ headScript()->addScriptAndStyle('agence'); $this->headScript()->addScriptAndStyle('slideshow'); +$this->headScript()->addFeatherlight(); echo $this->intro(); ?>
diff --git a/js/agence.js b/js/agence.js new file mode 100644 index 0000000..9de89e9 --- /dev/null +++ b/js/agence.js @@ -0,0 +1,9 @@ +TO_LOAD_ONCE[TO_LOAD_ONCE.length] = 'load_agence();'; + +function load_agence() { + + $('a.biography-open').click(function () { + $.featherlight('

'+$(this).prevAll('h3').html()+'

'+$(this).prevAll('span').html()+'

'+$(this).nextAll('.biography').html()+'

') + return false; + }); +} \ No newline at end of file diff --git a/less/agence.less b/less/agence.less index cd239b1..a4dbe4e 100644 --- a/less/agence.less +++ b/less/agence.less @@ -1,146 +1,178 @@ @import "00-constants"; -@twocols : ~"screen and (max-width: 955px)"; -@onecol : ~"screen and (max-width: 700px)"; +@twocols: ~"screen and (max-width: 955px)"; +@onecol: ~"screen and (max-width: 700px)"; .agency-pictos { - /* Agence pictos */ - background-color: @blue; - color:#fff; - .bloc-holder { - overflow: hidden; - - } - - .bloc-holder h2 { - font-weight: 300; - font-size: 32px; - margin-bottom: 0 !important; - } - - article { - display: inline-block; - vertical-align: top; - width: 50%; - padding-right: 20px; - margin: 25px 0; - text-align: left; - - @media @twocols { - width: 50%; - - &:nth-child(even) { - padding-left: 20px; - padding-right: 0; - } - } - @media @onecol { - width: 100%; - padding: 0 !important; // Override nth-child (Vincent's brilliant idea :)) - } - } - - .sousbloc { - &:extend(.media); - } - - .spacer { - display: none; - } - - .dotclear { - - &:extend(.media--body); - - height: 70px; - display: table-cell; - vertical-align: middle; - } - - .sousbloc img { - &:extend(.media--item); - margin-right: 20px; - } + /* Agence pictos */ + background-color: @blue; + color: #fff; + + .bloc-holder { + overflow: hidden; + + } + + .bloc-holder h2 { + font-weight: 300; + font-size: 32px; + margin-bottom: 0 !important; + } + + article { + display: inline-block; + vertical-align: top; + width: 50%; + padding-right: 20px; + margin: 25px 0; + text-align: left; + + @media @twocols { + width: 50%; + + &:nth-child(even) { + padding-left: 20px; + padding-right: 0; + } + } + @media @onecol { + width: 100%; + padding: 0 !important; // Override nth-child (Vincent's brilliant idea :)) + } + } + + .sousbloc { + &:extend(.media); + } + + .spacer { + display: none; + } + + .dotclear { + + &:extend(.media--body); + + height: 70px; + display: table-cell; + vertical-align: middle; + } + + .sousbloc img { + &:extend(.media--item); + margin-right: 20px; + } } /* Agence photo */ .agency-photo { - overflow: hidden; - text-align: center; + overflow: hidden; + text-align: center; - img { - vertical-align: bottom; - } + img { + vertical-align: bottom; + } } /* Agence equipe */ .agency-persons { - background-color: #fff; - color: @black; - .bloc-holder { - overflow: hidden; - } - - h2 { - font-size: 30px; - } - - h3 { - font-size: 30px; - } - - .blocs { - padding: 15px 0 0 0; - } - - .spacer { - display: none; - } - - .poste{ - display: block; - font-size: 20px; - font-weight: 600; - padding-bottom: 10px; - } - - .sousbloc { - - &:extend(.media); - - display: inline-block; - vertical-align: top; - width: 50%; - min-width: 480px; - margin: 25px 0; - - &:nth-child(odd) { - .pr-3vw; - } - &:nth-child(even) { - .pl-3vw; - } - - - @media screen and (max-width: 1200px) { - width: 100%; - padding: 0 !important; - } - } - - .photo { - - &:extend(.media--item); - - width: 120px; - height: 120px; - float: left; - margin: 10px 25px 0 0; - border-radius: 60px; - } - - .details { - &:extend(.media--body); - text-align: left; - } + background-color: #fff; + color: @black; + + .bloc-holder { + overflow: hidden; + } + + h2 { + font-size: 30px; + } + + h3 { + font-size: 30px; + } + + .blocs { + padding: 15px 0 0 0; + } + + .spacer { + display: none; + } + + .poste { + display: block; + font-size: 20px; + font-weight: 600; + padding-bottom: 10px; + } + + .biography { + display: none; + } + + .sousbloc { + + &:extend(.media); + + display: inline-block; + vertical-align: top; + width: 50%; + min-width: 480px; + margin: 25px 0; + + &:nth-child(odd) { + .pr-3vw; + } + + &:nth-child(even) { + .pl-3vw; + } + + + @media screen and (max-width: 1200px) { + width: 100%; + padding: 0 !important; + } + } + + .photo { + + &:extend(.media--item); + + width: 120px; + height: 120px; + float: left; + margin: 0 25px 0 0; + border-radius: 60px; + } + + .details { + &:extend(.media--body); + text-align: left; + } } + +.featherlight-content { + max-width: 800px; + background-color: @blue !important; + padding: 45px !important; + color: #fff; + font-size: 20px; + + h3 { + font-size: 30px; + } + + h4 { + font-size: 20px; + margin-bottom: 20px; + } + + .featherlight-close-icon{ + color:#fff; + background:none; + font-size:25px; + width:40px; + line-height:40px; + } +} \ No newline at end of file diff --git a/less/link-arrow.less b/less/link-arrow.less index 529238c..6b47daa 100644 --- a/less/link-arrow.less +++ b/less/link-arrow.less @@ -192,6 +192,7 @@ > .text { margin: 0 @text-arrow-space 0 0; line-height: 1; + overflow: visible !important; } > .the-arrow { -- 2.39.5