forked from ZwiiCMS-Team/ZwiiCMS
Merge branch 'responsive' of https://github.com/fredtempez/ZwiiCMS
This commit is contained in:
commit
661a1fbe83
@ -1038,6 +1038,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
|
||||
|
@ -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;
|
||||
|
@ -118,6 +118,14 @@
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user