From 4f59173cbc5d364f48c9eb917040e26b8f18d39b Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 23 Nov 2018 12:00:18 +0100 Subject: [PATCH] =?UTF-8?q?v8.4.9a=20:=20banni=C3=A8re=20responsive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 19 +++++++++++++++++++ core/layout/common.css | 6 ++++++ core/layout/main.php | 10 +++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/core/core.php b/core/core.php index c9e355a0..81af2b05 100644 --- a/core/core.php +++ b/core/core.php @@ -1039,6 +1039,25 @@ class core extends common { if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) { $css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}'; } + + if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) { + switch($themeHeaderPosition = $this->getData(['theme', 'header', 'position'])) { + case'body': + + $css .= '/*@media (max-width: 767px) {header{height:' . $this->getData(['theme', 'header', 'height'])/2 . 'px;line-height:' . $this->getData(['theme', 'header', 'height'])/2 . 'px;}}*/'; + + $css .= '/*header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}*/'; + break; + default: + + $css .= '@media (max-width: 767px) {header{height:' . $this->getData(['theme', 'header', 'height'])/2 . 'px;line-height:' . $this->getData(['theme', 'header', 'height'])/2 . 'px;}}'; + + $css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}'; + break; + } + } + + $colors = helper::colorVariants($this->getData(['theme', 'header', 'textColor'])); $css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'header', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}'; // Menu diff --git a/core/layout/common.css b/core/layout/common.css index 1f7d7d19..3a84ab88 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -311,6 +311,12 @@ header .container { height: 100%; } + /* Bannière image reponsive */ +.responsive-banner img { + display:block; + width:100%; +} + /* Menu */ body > nav { margin: 0 -10px; diff --git a/core/layout/main.php b/core/layout/main.php index 9c5363d2..393d09b9 100755 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -117,7 +117,15 @@ $this->getData(['theme', 'menu', 'position']) === 'hide' AND $this->getUrl(0) === 'theme' ) - ): ?> + ): ?> + + + getData(['theme', 'header', 'position']) == 'body') { + $themeHeaderImage = $this->getData(['theme', 'header', 'image']); + echo '
Accueil
'; + } ?> + +