Aperçu du menu + marges

This commit is contained in:
fredtempez 2021-11-12 12:59:58 +01:00
parent 6fe1ecb294
commit c9679ec4c5
3 changed files with 38 additions and 4 deletions

View File

@ -498,6 +498,11 @@ header .container {
height: 100%; height: 100%;
} }
/* Marges au cotneu de la bannière personnalisée */
header:not(.container) #featureContent {
margin: 0 10px;
}
/* Element du header /* Element du header
#themeHeaderImage { #themeHeaderImage {

View File

@ -51,7 +51,15 @@
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?> <?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?> <?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div> <?php echo template::ico('menu',null,null,'2em'); ?></div>
<div id="menu" <?php echo $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"'; ?> > <!-- fin du menu burger -->
<?php
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
$menuClass = ($this->getData(['theme', 'menu', 'position']) === 'body-first' ||
$this->getData(['theme', 'menu', 'position']) === 'body-second' ) &&
$this->getData(['theme', 'menu', 'container']) === 'none' // étendue sur la page
? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?> >
<?php $this->showMenu(); ?> <?php $this->showMenu(); ?>
</div> <!--fin menu --> </div> <!--fin menu -->
</nav> </nav>
@ -89,11 +97,21 @@
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?> <?php if($this->getData(['theme', 'menu', 'position']) === 'body-second'): ?>
<nav> <nav>
<!-- Menu burger -->
<div id="toggle"> <div id="toggle">
<?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?> <?php echo $this->getData(['theme','menu','burgerContent']) === 'title' ? '<div class="notranslate" id="burgerText">' . $this->getData(['locale', 'title']) . '</div>' : '' ;?>
<?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?> <?php echo $this->getData(['theme','menu','burgerContent']) === 'logo' ? '<div class="notranslate" id="burgerLogo"><img src="'.helper::baseUrl(false).self::FILE_DIR.'source/'. $this->getData(['theme', 'menu', 'burgerLogo']) .'"></div>' : '' ;?>
<?php echo template::ico('menu',null,null,'2em'); ?></div> <?php echo template::ico('menu',null,null,'2em'); ?></div>
<div id="menu" class="container"><?php $this->showMenu(); ?></div> <!-- fin du menu burger -->
<?php
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
$menuClass = ($this->getData(['theme', 'menu', 'position']) === 'body-first' ||
$this->getData(['theme', 'menu', 'position']) === 'body-second' ) &&
$this->getData(['theme', 'menu', 'container']) === 'none' // étendue sur la page
? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?> >
<?php $this->showMenu(); ?></div>
</nav> </nav>
<?php endif; ?> <?php endif; ?>
@ -119,7 +137,11 @@
): ?> ): ?>
<!-- Bannière dans le site --> <!-- Bannière dans le site -->
<?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?> <?php echo ( $this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
<header class="<?php echo $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ($this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay' : ''); ?>"> <?php
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"';?>>
<?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?> <?php if ($this->getData(['theme','header','feature']) === 'wallpaper' ): ?>
<?php if( <?php if(
$this->getData(['theme', 'header', 'textHide']) === false $this->getData(['theme', 'header', 'textHide']) === false

View File

@ -121,6 +121,14 @@ $("input, select").on("change", function() {
$("nav").show().prependTo("#site"); $("nav").show().prependTo("#site");
break; break;
} }
// Largeur étendue
if ($("#themeMenuContainer").val() === 'none') {
$("#menu").removeClass();
} else {
$("#menu").addClass("container");
}
// Ajout du css au DOM // Ajout du css au DOM
$("#themePreview").remove(); $("#themePreview").remove();
$("<style>") $("<style>")
@ -177,7 +185,6 @@ $("#themeMenuActiveColorAuto").on("change", function() {
// Affiche / Cache la sélection du logo pour le menu burger // Affiche / Cache la sélection du logo pour le menu burger
$("#themeMenuBurgerContent").on("change", function() { $("#themeMenuBurgerContent").on("change", function() {
console.log( $(this).val());
if($(this).val() === 'logo') { if($(this).val() === 'logo') {
$("#themeMenuBurgerLogoId").slideDown(); $("#themeMenuBurgerLogoId").slideDown();
} }