v8.4.9a : bannière responsive

This commit is contained in:
fredtempez 2018-11-23 12:00:18 +01:00
parent 04e0857cc4
commit 4f59173cbc
3 changed files with 34 additions and 1 deletions

View File

@ -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

View File

@ -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;

View File

@ -117,7 +117,15 @@
$this->getData(['theme', 'menu', 'position']) === 'hide'
AND $this->getUrl(0) === 'theme'
)
): ?>
): ?>
<!-- modif bannière full responsive dans body-->
<?php if($this->getData(['theme', 'header', 'position']) == 'body') {
$themeHeaderImage = $this->getData(['theme', 'header', 'image']);
echo '<div class="responsive-banner"><a href="'.helper::baseUrl(false).'" title="Retour à l\'accueil"><img src="'.helper::baseUrl(false).'site/file/source/'.$themeHeaderImage.'" alt="Accueil"></a></div>';
} ?>
<!-- Fin modif -->
<!-- Menu dans le site après la bannière -->
<nav <?php if($this->getData(['theme', 'menu', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<div id="toggle"><?php echo template::ico('menu'); ?></div>