Option masquage bannière en petit écran

This commit is contained in:
SylvainLelievre 2021-10-24 09:57:25 +02:00
parent d0923188e6
commit 67fa9b0f2a
5 changed files with 33 additions and 6 deletions

View File

@ -529,6 +529,11 @@ nav #burgerText {
margin: 15px 0 0 10px;
}
nav #burgerLogo {
float: left;
margin: 5px 0 0 5px;
}
nav ul {
padding: 0;
margin: 0;
@ -1715,3 +1720,10 @@ th.col12 {
.helpDisplayButton {
cursor: pointer;
}
/* Bannière masquable en petit écran*/
@media screen and (max-width: 768px) {
.smallDisplayNone{
display : none;
}
}

View File

@ -57,7 +57,7 @@
<?php endif; ?>
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<!-- Bannière dans le fond du site -->
<header>
<header <?php if($this->getData(['theme', 'header', 'smallDisplayHidden']) === true): ?>class="smallDisplayNone"<?php endif;?>>
<?php //$this->showi18n();?>
<?php
if ($this->getData(['theme','header','linkHomePage'])){
@ -115,7 +115,9 @@
<?php
if ($this->getData(['theme','header','linkHomePage'])){
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
<header <?php if($this->getData(['theme', 'header', 'position']) === 'hide'): ?>class="displayNone"<?php endif; ?>>
<header <?php if($this->getData(['theme', 'header', 'position']) === 'hide'): ?>class="displayNone"<?php endif;
if($this->getData(['theme', 'header', 'smallDisplayHidden']) === true): ?>class="smallDisplayNone"<?php endif;
?>>
<div id="headerContainer" class="container">
<?php if(
$this->getData(['theme', 'header', 'textHide']) === false

View File

@ -440,7 +440,8 @@ class theme extends common {
'textHide' => $this->getInput('themeHeaderTextHide', helper::FILTER_BOOLEAN),
'textTransform' => $this->getInput('themeHeaderTextTransform'),
'linkHomePage' => $this->getInput('themeHeaderlinkHomePage',helper::FILTER_BOOLEAN),
'imageContainer' => $this->getInput('themeHeaderImageContainer')
'imageContainer' => $this->getInput('themeHeaderImageContainer'),
'smallDisplayHidden' => $this->getInput('themeHeaderSmallDisplayHidden', helper::FILTER_BOOLEAN)
]]);
// Modification de la position du menu selon la position de la bannière
if ( $this->getData(['theme','header','position']) == 'site' )

View File

@ -213,4 +213,12 @@ $("#themeHeaderPosition").on("change", function() {
}
}).trigger("change");
// Affiche / Cache l'option bannière masquée en écran réduit
$("#themeHeaderPosition").on("change", function() {
if($(this).val() === 'hide') {
$("#themeHeaderSmallDisplay").slideUp();
}
else {
$("#themeHeaderSmallDisplay").slideDown();
}
}).trigger("change");

View File

@ -130,7 +130,11 @@
'checked' => $this->getData(['theme', 'header', 'margin'])
]); ?>
</div>
<div id="themeHeaderSmallDisplay" class="displayNone">
<?php echo template::checkbox('themeHeaderSmallDisplayHidden', true, 'Masquer la bannière en écran réduit', [
'checked' => $this->getData(['theme', 'header', 'smallDisplayHidden'])
]); ?>
</div>
</div>
</div>
</div>