$legende->setLabel('Legende du visuel');
$this->addElementLocalized($legende, $isCompactTrad);
+ $header_style = new Zend_Form_Element_Select('header_style');
+ $header_style->setLabel(__('Header style (detail page)'));
+ $header_style->setMultiOptions(['dark' => 'Dark text / light background', 'light' => 'Light text / dark background']);
+ $this->addElement($header_style);
+
$color = new CubeIT_Form_Element_Color('couleur');
$color->setLabel('Code couleur de la zone de contenu');
$this->addElement($color);
$this->setTitleColumn('titre');
}
-}
\ No newline at end of file
+}
protected $visuel;
protected $visuel_detail;
protected $legende;
+ protected $header_style;
protected $couleur;
protected $blocs;
protected $categories;
$casestudies->addColumn('visuel', 'string', array('length' => 128));
$casestudies->addColumn('visuel_detail', 'string', array('length' => 128));
$casestudies->addColumn('legende', 'text');
+ $casestudies->addColumn('header_style', 'text');
$casestudies->addColumn('couleur', 'text');
$casestudies->addColumn('blocs', 'text');
$casestudies->addColumn('categories', 'text');
public function CasestudiesDetail($studie) {
- $visuel_detail = $this->view->imageProcess($studie->visuel_detail, $studie->titre, 980, 400, array('class' => 'responsive'));
+ if ($studie->header_style == 'light') {
+ $this->bodyClass .= 'header-light';
+ }
+
+ $header_image = CubeIT_View_Helper_ImageCms::getPath($studie->visuel_detail);
$res = '<div class="case">';
- $res.='<div class="content">';
- $res.='<h1>' . $studie->titre . '</h1>';
- $res.='<h2>' . $studie->description . '</h2>';
+ $res.='<div class="casestudies-detail-header" style="background-image:url('. $header_image .')">';
+ $res.='<h1 class="casestudies-detail-title">' . $studie->titre . '</h1>';
+ $res.='<h2>' . $studie->legende . '</h2>';
$res.='</div>';
- $res .= '<div class="casestudies-detail-visuel">';
- $res .= '<div class="visuel-holder content">';
- $res .= '<div class="visuel">' . $visuel_detail . '</div>';
-
- $res .= '<div class="legende">' . $studie->legende . '</div>';
-
- if ($studie->url != '') {
- $res .= '<a class="but" href="' . $studie->url . '">' . __("Voir le site") . '</a>';
- }
-
- $res .= '</div>';
- $res .= '</div>';
+// $res .= '<div class="casestudies-detail-visuel">';
+// $res .= '<div class="visuel-holder content">';
+// $res .= '<div class="visuel">' . $visuel_detail . '</div>';
+//
+// $res .= '<div class="legende">' . $studie->legende . '</div>';
+//
+// if ($studie->url != '') {
+// $res .= '<a class="but" href="' . $studie->url . '">' . __("Voir le site") . '</a>';
+// }
+//
+// $res .= '</div>';
+// $res .= '</div>';
$style = '';
if ($studie->couleur != '') {
return $res;
}
-}
\ No newline at end of file
+}
--- /dev/null
+<?php
+
+echo '<body class="'. $this->bodyClass .'">' . "\n";
+echo $this->bannerCookies();
+echo $this->render('admin/mockup.phtml');
+echo $this->render('admin/nav.phtml');
+echo $this->render('common/content.phtml');
+echo $this->render('ajax/loader.phtml');
+echo "\n" . '</body>' . "\n";
</div>
<?php echo $this->CasestudiesList($this->datas, $this->studie); ?>
-</div>
\ No newline at end of file
+</div>
<?php
$this->headScript()->addScriptAndStyle('home');
+$this->bodyClass .= ' header-light'; // Switch header to light mode (or should this be in the slideshow block?)
$this->beforeMain = $this->homeSlideshow($this->slideshow);
echo $this->liste($this->agence, false, array('id' => 'agency', 'class' => 'white'));
\r
function load_header() {\r
\r
- // Todo: Implement way of setting if header is light or dark (maybe from body class or class on header element?) and use that to set header text color (white/black) in order to color logo and links for starting point. Home page will be light along with selected case study pages and possibly others...\r
- var headerColor = ($("#home-slideshow").length == 1) ? '#fff' : '#000'; // ## TEMPORARY\r
-\r
+ var headerColor = ($('body').hasClass('header-light')) ? '#fff' : '#000';\r
\r
var h = $('header');\r
// Background-color & height - starts transparent and then fades in\r
@import "00-constants";
+#headerPlaceholder {
+ display: none; // No placeholder so that header sits over the top of content
+}
+
.case {
- margin: 50px 0 0 0;
h1 {
font-size: 32px;
}
margin: 0 0 15px 0;
}
+ .casestudies-detail-header {
+ height: 100vh;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ background-size: cover;
+ background-position: center;
+
+ .header-light & {
+ color: #fff; // When there's a light header, text should also be white
+ }
+
+ h1 {
+ font-size: 92px;
+ margin-bottom: 0.1em;
+ }
+
+ h2 {
+ font-size: 18px;
+ }
+ }
+
/* Case studies detail visuel */
.casestudies-detail-visuel {
padding-bottom: 50px;
.casestudies-list {
padding-top: 60px;
-}
\ No newline at end of file
+}