forked from ZwiiCMS-Team/ZwiiCMS
Couleur du sous-menu
This commit is contained in:
parent
9a2274a716
commit
72d3bb772f
@ -8,8 +8,13 @@
|
||||
- Thème administration : modification de l'appel du code CSS permettant une mise à jour du thème sans vider le cache.
|
||||
- Thème du menu : alignement inopérant ; arrière-plan semi-transparent non uniforme.
|
||||
- Amélioration :
|
||||
- Thème menu : couleurs du sous menu.
|
||||
- Mise en page du corps des mails de notification.
|
||||
- Paramètres de localisation.
|
||||
- Modification :
|
||||
- Changement de noms de classe :
|
||||
- navLevel1 devient navMain
|
||||
- navLevel2 devient navSub
|
||||
- Mise à jour :
|
||||
- TinyMCE 4.9.11
|
||||
|
||||
|
@ -392,12 +392,12 @@ $(document).ready(function(){
|
||||
* Affiche le sous-menu quand il est sticky
|
||||
*/
|
||||
$("nav").mouseenter(function(){
|
||||
$("#navfixedlogout .navLevel2").css({ 'pointer-events' : 'auto' });
|
||||
$("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'auto' });
|
||||
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'auto' });
|
||||
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'auto' });
|
||||
});
|
||||
$("nav").mouseleave(function(){
|
||||
$("#navfixedlogout .navLevel2").css({ 'pointer-events' : 'none' });
|
||||
$("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'none' });
|
||||
$("#navfixedlogout .navSub").css({ 'pointer-events' : 'none' });
|
||||
$("#navfixedconnected .navSub").css({ 'pointer-events' : 'none' });
|
||||
});
|
||||
|
||||
/**
|
||||
|
@ -1438,6 +1438,12 @@ class common {
|
||||
$this->setData(['config', 'captchaStrong', false]);
|
||||
$this->setData(['core', 'dataVersion', 10303]);
|
||||
}
|
||||
// Version 10.3.04
|
||||
if ($this->getData(['core', 'dataVersion']) < 10304) {
|
||||
// Couleur des sous menus
|
||||
$this->setData(['theme', 'menu', 'backgroundColorSub', $this->getData(['theme', 'menu', 'backgroundColor']) ]);
|
||||
$this->setData(['core', 'dataVersion', 10304]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1584,7 +1590,7 @@ 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']) . '}';
|
||||
// Menu
|
||||
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor']));
|
||||
$css .= 'nav,nav .navLevel2 a{background-color:' . $colors['normal'] . '}';
|
||||
$css .= 'nav,nav.navMain a{background-color:' . $colors['normal'] . '}';
|
||||
$css .= 'nav a,#toggle span,nav a:hover{color:' . $this->getData(['theme', 'menu', 'textColor']) . '}';
|
||||
$css .= 'nav a:hover{background-color:' . $colors['darken'] . '}';
|
||||
$css .= 'nav a.active{color:' . $this->getData(['theme','menu','activeTextColor']) . ';}';
|
||||
@ -1596,7 +1602,10 @@ class core extends common {
|
||||
$css .= 'nav a.active{color:' . $color2['text'] . '}';*/
|
||||
}
|
||||
$css .= 'nav #burgerText{color:' . $colors['text'] . '}';
|
||||
$css .= 'nav .navLevel1 a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}';
|
||||
// Sous menu
|
||||
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColorSub']));
|
||||
$css .= 'nav .navSub a{background-color:' . $colors['normal'] . '}';
|
||||
$css .= 'nav .navMain a.active {border-radius:' . $this->getData(['theme', 'menu', 'radius']) . '}';
|
||||
$css .= '#menu{text-align:' . $this->getData(['theme', 'menu', 'textAlign']) . '}';
|
||||
if($this->getData(['theme', 'menu', 'margin'])) {
|
||||
if(
|
||||
@ -2409,7 +2418,7 @@ class layout extends common {
|
||||
empty($childrenPageIds)) {
|
||||
continue;
|
||||
}
|
||||
$itemsLeft .= '<ul class="navLevel2">';
|
||||
$itemsLeft .= '<ul class="navSub">';
|
||||
foreach($childrenPageIds as $childKey) {
|
||||
// Propriétés de l'item
|
||||
$active = ($childKey === $currentPageId) ? 'active ' : '';
|
||||
@ -2483,7 +2492,7 @@ class layout extends common {
|
||||
$itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
|
||||
}
|
||||
// Retourne les items du menu
|
||||
echo '<ul class="navLevel1" id="menuLeft">' . $itemsLeft . '</ul><ul class="navLevel1" id="menuRight">' . $itemsRight . '</ul>';
|
||||
echo '<ul class="navMain" id="menuLeft">' . $itemsLeft . '</ul><ul class="navMain" id="menuRight">' . $itemsRight . '</ul>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -508,6 +508,11 @@ nav li ul li {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/*
|
||||
nav .navSub a{
|
||||
background-color:red !important;
|
||||
}*/
|
||||
|
||||
nav li:hover ul {
|
||||
z-index: 8;
|
||||
opacity: 1;
|
||||
@ -608,8 +613,8 @@ nav::before {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
#navfixedconnected .navLevel2,
|
||||
#navfixedlogout .navLevel2 {
|
||||
#navfixedconnected .navSub,
|
||||
#navfixedlogout .navSub {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,7 @@ class init extends common {
|
||||
],
|
||||
'menu' => [
|
||||
'backgroundColor' => 'rgba(32, 59, 82, 1)',
|
||||
'backgroundColorSub' => 'rgba(32, 59, 82, 1)',
|
||||
'font' => 'Open+Sans',
|
||||
'fontSize' => '1em',
|
||||
'fontWeight' => 'normal',
|
||||
|
@ -490,6 +490,7 @@ class theme extends common {
|
||||
if($this->isPost()) {
|
||||
$this->setData(['theme', 'menu', [
|
||||
'backgroundColor' => $this->getInput('themeMenuBackgroundColor'),
|
||||
'backgroundColorSub' => $this->getInput('themeMenuBackgroundColorSub'),
|
||||
'font' => $this->getInput('themeMenuFont'),
|
||||
'fontSize' => $this->getInput('themeMenuFontSize'),
|
||||
'fontWeight' => $this->getInput('themeMenuFontWeight'),
|
||||
|
@ -43,7 +43,7 @@ $("input, select").on("change", function() {
|
||||
var css = "@import url('https://fonts.googleapis.com/css?family=" + menuFont + "');";
|
||||
var colors = core.colorVariants($("#themeMenuBackgroundColor").val());
|
||||
// Couleurs du menu
|
||||
css += "nav,nav .navLevel2 a{background-color:" + colors.normal + "}";
|
||||
css += "nav,nav.navLevel1 a{background-color:" + colors.normal + "}";
|
||||
css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}";
|
||||
css += "nav a:hover{background-color:" + colors.darken + "}";
|
||||
if ($("#themeMenuActiveColorAuto").is(':checked')) {
|
||||
@ -51,6 +51,9 @@ $("input, select").on("change", function() {
|
||||
} else {
|
||||
css += "nav a:hover{background-color:" + $("#themeMenuActiveColor").val() + ";color:" + $('#themeMenuActiveTextColor').val() + ";}";
|
||||
}
|
||||
// sous menu
|
||||
var colors = core.colorVariants($("#themeMenuBackgroundColorSub").val());
|
||||
css += 'nav .navSub a{background-color:' + colors.normal + '}';
|
||||
// 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
|
||||
|
@ -17,7 +17,7 @@
|
||||
<div class="block">
|
||||
<h4>Couleur</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col4">
|
||||
<?php echo template::text('themeMenuTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
@ -25,7 +25,7 @@
|
||||
'value' => $this->getData(['theme', 'menu', 'textColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="col4">
|
||||
<?php echo template::text('themeMenuBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
@ -33,6 +33,14 @@
|
||||
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('themeMenuBackgroundColorSub', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond du sous-menu',
|
||||
'value' => $this->getData(['theme', 'menu', 'backgroundColorSub'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user