From 12e21a3067df4158ac792791c4a263c34d5a20c0 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 15 Nov 2021 09:01:08 +0100 Subject: [PATCH] noms de variables + bug overflow --- core/core.php | 5 ++--- core/module/theme/theme.php | 8 ++++---- core/module/theme/view/header/header.js.php | 10 +++------- core/module/theme/view/header/header.php | 2 +- core/module/theme/view/menu/menu.js.php | 2 +- core/module/theme/view/menu/menu.php | 2 +- 6 files changed, 12 insertions(+), 17 deletions(-) diff --git a/core/core.php b/core/core.php index ea373aa3..354f7572 100644 --- a/core/core.php +++ b/core/core.php @@ -2257,11 +2257,10 @@ class core extends common { } if ($this->getData(['theme','header','feature']) === 'feature' ) { // Hauteur de la taille du contenu perso - if ($this->getData(['theme', 'header', 'height']) !== 'none') { - $css .= 'header{height:' . $this->getData(['theme', 'header', 'height']) . ';}'; - } + $css .= 'header #featureContent{height:' . $this->getData(['theme', 'header', 'height']) . '; }'; } + // Menu $colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor'])); $css .= 'nav,nav.navMain a{background-color:' . $colors['normal'] . '}'; diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index e91a82da..4fab30d5 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -69,7 +69,7 @@ class theme extends common { 'Ubuntu' => 'Ubuntu', 'Vollkorn' => 'Vollkorn' ]; - public static $containerWidths = [ + public static $containerWides = [ 'container' => 'Limitée au site', 'none' => 'Etendue sur la page' ]; @@ -125,7 +125,7 @@ class theme extends common { '2.4vmax' => 'Très grande (240%)' ]; public static $headerHeights = [ - 'none' => 'Libre', // texte dynamique cf header.js.php + 'unset' => 'Libre', // texte dynamique cf header.js.php '100px' => 'Très petite (100px) ', '150px' => 'Petite (150px)', '200px' => 'Moyenne (200px)', @@ -443,7 +443,7 @@ class theme extends common { 'fontSize' => $this->getInput('themeHeaderFontSize'), 'fontWeight' => $this->getInput('themeHeaderFontWeight'), 'height' => $this->getInput('themeHeaderHeight'), - 'width' => $this->getInput('themeHeaderWidth'), + 'wide' => $this->getInput('themeHeaderWide'), 'image' => $this->getInput('themeHeaderImage'), 'imagePosition' => $this->getInput('themeHeaderImagePosition'), 'imageRepeat' => $this->getInput('themeHeaderImageRepeat'), @@ -516,7 +516,7 @@ class theme extends common { 'fontSize' => $this->getInput('themeMenuFontSize'), 'fontWeight' => $this->getInput('themeMenuFontWeight'), 'height' => $this->getInput('themeMenuHeight'), - 'width' => $this->getInput('themeMenuWidth'), + 'wide' => $this->getInput('themeMenuWide'), 'loginLink' => $this->getInput('themeMenuLoginLink', helper::FILTER_BOOLEAN), 'margin' => $this->getInput('themeMenuMargin', helper::FILTER_BOOLEAN), 'position' => $this->getInput('themeMenuPosition'), diff --git a/core/module/theme/view/header/header.js.php b/core/module/theme/view/header/header.js.php index 3202464a..f8a45869 100644 --- a/core/module/theme/view/header/header.js.php +++ b/core/module/theme/view/header/header.js.php @@ -26,12 +26,8 @@ $("input, select").on("change", function() { // Contenu perso if ($("#themeHeaderFeature").val() == "feature") { - 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() + "; overflow:hidden;background-position:top; background-repeat: no-repeat;;line-height:1.15;background-color:unset;;background-image:unset;text-align:unset}"; - } + + css = "header{height:" + $("#themeHeaderHeight").val() + "; overflow:hidden;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(); @@ -175,7 +171,7 @@ $("input, select").on("change", function() { } // Largeur du header - switch ($("#themeHeaderWidth").val()) { + switch ($("#themeHeaderWide").val()) { case "container": $("header").addClass("container"); break; diff --git a/core/module/theme/view/header/header.php b/core/module/theme/view/header/header.php index a0756b04..50159083 100644 --- a/core/module/theme/view/header/header.php +++ b/core/module/theme/view/header/header.php @@ -63,7 +63,7 @@
- 'Largeur', 'selected' => $this->getData(['theme', 'header', 'width']) ]); ?> diff --git a/core/module/theme/view/menu/menu.js.php b/core/module/theme/view/menu/menu.js.php index 8a26f19d..55335702 100644 --- a/core/module/theme/view/menu/menu.js.php +++ b/core/module/theme/view/menu/menu.js.php @@ -123,7 +123,7 @@ $("input, select").on("change", function() { } // Largeur étendue - if ($("#themeMenuWidth").val() === 'none') { + if ($("#themeMenuWide").val() === 'none') { $("#menu").removeClass(); } else { $("#menu").addClass("container"); diff --git a/core/module/theme/view/menu/menu.php b/core/module/theme/view/menu/menu.php index cb8d26e6..4225cecd 100644 --- a/core/module/theme/view/menu/menu.php +++ b/core/module/theme/view/menu/menu.php @@ -41,7 +41,7 @@ ?>
- 'Largeur', 'selected' => $this->getData(['theme', 'menu', 'width']) ]); ?>