diff --git a/CHANGES.md b/CHANGES.md index 05363257..cf402123 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,10 @@ # Changelog ## Version 11.2.00 -- Modifications : - - Disposition des options de configuration du site. +- Modifications : + Thème : + - Disposition des options de configuration du site. + - Bannière : le contenu peut être personnalisé à l'aide d'un éditeur. La bannière au-dessus du site peut s'étendre sur la largeur de la page. - Pages : il est désormais possible de donner un nom de page court qui sera utilisé dans le menu du site, dans les abrres latérales et dans les sélecteurs de page (éditeur / lien). En revanche le nom de la page affiché en haut de celle-ci est inchangé. Dans la plupart des cas le titre court sera identique au titre. - Les écrans d'aide renvoient vers le site doc.zwiicms.fr - Mise en évidence du statut des pages dans la liste de la barre d'administration. Rouge italique : page orpheline ; Orange gras page inactive. diff --git a/core/core.php b/core/core.php index 3da8feba..ea373aa3 100644 --- a/core/core.php +++ b/core/core.php @@ -2256,7 +2256,11 @@ class core extends common { $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']) . '}'; } if ($this->getData(['theme','header','feature']) === 'feature' ) { - $css .= 'header{height:' . $this->getData(['theme', 'header', 'height']) . ';}'; ; + // Hauteur de la taille du contenu perso + if ($this->getData(['theme', 'header', 'height']) !== 'none') { + $css .= 'header{height:' . $this->getData(['theme', 'header', 'height']) . ';}'; + } + } // Menu $colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor'])); diff --git a/core/layout/main.php b/core/layout/main.php index 67d8664a..c1a81f32 100644 --- a/core/layout/main.php +++ b/core/layout/main.php @@ -60,11 +60,11 @@ getData(['theme', 'header', 'position']) === 'body'): ?> getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ' '; - $headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : ' '; + $headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : ''; + $headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : ''; $headerClass .= $this->getData(['theme', 'header', 'container']) === 'none' ? '' : 'container'; ?> -
+
> getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '' : ''; ?> getData(['theme','header','feature']) === 'wallpaper' ): ?> 'Vollkorn' ]; public static $containers = [ - 'container' => 'Du site', - 'none' => 'De la page' + 'container' => 'Limitée au site', + 'none' => 'Etendue sur la page' ]; public static $footerblocks = [ 1 => [ @@ -125,12 +125,12 @@ class theme extends common { '2.4vmax' => 'Très grande (240%)' ]; public static $headerHeights = [ - 'none' => 'Hauteur de l\'image sélectionnée', + 'none' => 'Libre', // texte dynamique cf header.js.php '100px' => 'Très petite (100px) ', '150px' => 'Petite (150px)', '200px' => 'Moyenne (200px)', '300px' => 'Grande (300px)', - '400px' => 'Très grande (400px)' + '400px' => 'Très grande (400px)', ]; public static $headerPositions = [ 'body' => 'Au dessus du site', diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index a71c463f..806b9202 100644 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -26,10 +26,18 @@ $("input, select").on("change", function() { // Contenu perso if ($("#themeHeaderFeature").val() == "feature") { - css = "header{height:" + $("#themeHeaderHeight").val() + ";background-position:top; background-repeat: no-repeat;;line-height:1.15;background-color:unset;;background-image:unset;text-align:unset}"; + var headerHeight = $("#themeHeaderHeight").val(); + if (headerHeight === 'none') { + css = "header{height:unset; background-position:top; background-repeat: no-repeat;;line-height:1.15;background-color:unset;;background-image:unset;text-align:unset}"; + } else { + css = "header{height:" + $("#themeHeaderHeight").val() + ";background-position:top; background-repeat: no-repeat;;line-height:1.15;background-color:unset;;background-image:unset;text-align:unset}"; + } + $("#featureContent").appendTo("header").show(); $("#themeHeaderTitle").hide(); + // Modifier le texte du sélecteur de hauteur + $("#themeHeaderHeight option:eq(0)").text("Hauteur du contenu personnalisé"); } // Couleurs, image, alignement et hauteur de la bannière