From 6180b903c9f0302634d29c439daabce812172a68 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 1 Nov 2020 08:51:23 +0100 Subject: [PATCH] =?UTF-8?q?Alignement=20du=20menu=20centr=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 2 +- core/layout/common.css | 13 +++++++++---- core/module/theme/view/menu/menu.js.php | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/core/core.php b/core/core.php index b9b031ea..63ddfaa8 100644 --- a/core/core.php +++ b/core/core.php @@ -1597,7 +1597,7 @@ class core extends common { } $css .= 'nav #burgerText{color:' . $colors['text'] . '}'; $css .= 'nav .navLevel1 a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}'; - $css .= '#menuLeft{float:' . $this->getData(['theme', 'menu', 'textAlign']) . '}'; + $css .= '#menu{text-align:' . $this->getData(['theme', 'menu', 'textAlign']) . '}'; if($this->getData(['theme', 'menu', 'margin'])) { if( $this->getData(['theme', 'menu', 'position']) === 'site-first' diff --git a/core/layout/common.css b/core/layout/common.css index 18ceda2e..9ea30bbb 100755 --- a/core/layout/common.css +++ b/core/layout/common.css @@ -522,20 +522,25 @@ nav a:hover { text-decoration: none; } -nav #menuLeft { + +/* Barre de menu */ + +#menuLeft { display: inline-flex; - /*float: left;*/ } -nav #menuRight { - display: inline-flex; + +#menuRight { + display: inline-flex ; float: right; } + /* fin barre de menu */ nav::after { content: " "; clear: both; display: flex; } + nav::before { content: " "; clear: left; diff --git a/core/module/theme/view/menu/menu.js.php b/core/module/theme/view/menu/menu.js.php index 02b257fb..ab3848a5 100644 --- a/core/module/theme/view/menu/menu.js.php +++ b/core/module/theme/view/menu/menu.js.php @@ -54,7 +54,7 @@ $("input, select").on("change", function() { // Taille, hauteur, épaisseur et capitalisation de caractères du menu css += "#toggle span,#menu a{padding:" + $("#themeMenuHeight").val() + ";font-family:'" + menuFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeMenuFontWeight").val() + ";font-size:" + $("#themeMenuFontSize").val() + ";text-transform:" + $("#themeMenuTextTransform").val() + "}"; // Alignement du menu - css += "#menuLeft{float:" + $("#themeMenuTextAlign").val() + "}"; + css += "#menu{text-align:" + $("#themeMenuTextAlign").val() + "}"; // Marge if($("#themeMenuMargin").is(":checked")) { if(