forked from ZwiiCMS-Team/ZwiiCMS
093 thème menu couleur de la page sélectionnée
This commit is contained in:
parent
8cf09137fb
commit
5e77c51f51
@ -1417,12 +1417,13 @@ class core extends common {
|
||||
$css .= 'nav,nav 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']) . ';}';
|
||||
if ($this->getData(['theme','menu','activeColorAuto']) === true) {
|
||||
$css .= 'nav a.active{background-color:' . $colors['veryDarken'] . '}';
|
||||
} else {
|
||||
$css .= 'nav a.active{background-color:' . $this->getData(['theme','menu','activeColor']) . '}';
|
||||
$color2 = helper::colorVariants($this->getData(['theme', 'menu', 'textColor']));
|
||||
$css .= 'nav a.active{color:' . $color2['text'] . '}';
|
||||
/*$color2 = helper::colorVariants($this->getData(['theme', 'menu', 'textColor']));
|
||||
$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']) . '}';
|
||||
|
@ -135,7 +135,8 @@ class init extends common {
|
||||
'textTransform' => 'none',
|
||||
'fixed' => false,
|
||||
'activeColorAuto' => true,
|
||||
'activeColor' => 'rgba(255, 255, 255, 1)'
|
||||
'activeColor' => 'rgba(255, 255, 255, 1)',
|
||||
'activeTextColor' => 'rgba(255, 255, 255, 1)'
|
||||
],
|
||||
'site' => [
|
||||
'backgroundColor' => 'rgba(255, 255, 255, 1)',
|
||||
|
@ -462,6 +462,7 @@ class theme extends common {
|
||||
'fixed' => $this->getInput('themeMenuFixed', helper::FILTER_BOOLEAN),
|
||||
'activeColorAuto' => $this->getInput('themeMenuActiveColorAuto', helper::FILTER_BOOLEAN),
|
||||
'activeColor' => $this->getInput('themeMenuActiveColor'),
|
||||
'activeTextColor' => $this->getInput('themeMenuActiveTextColor'),
|
||||
'radius' => $this->getInput('themeMenuRadius'),
|
||||
'burgerTitle' => $this->getInput('themeMenuBurgerTitle', helper::FILTER_BOOLEAN)
|
||||
]]);
|
||||
|
@ -47,10 +47,11 @@ $("input, select").on("change", function() {
|
||||
css += "nav a,#toggle span,nav a:hover{color:" + $("#themeMenuTextColor").val() + "}";
|
||||
css += "nav a:hover{background-color:" + colors.darken + "}";
|
||||
if ($("#themeMenuActiveColorAuto").is(':checked')) {
|
||||
css += "nav a.active{background-color:" + colors.veryDarken + "}";
|
||||
css += "nav a:hover{background-color:" + colors.veryDarken + ";color:" + $('#themeMenuActiveTextColor').val() + ";}";
|
||||
} else {
|
||||
css += "nav a.active{background-color:" + $("#themeMenuActiveColor").val() + "}";
|
||||
css += "nav a:hover{background-color:" + $("#themeMenuActiveColor").val() + ";color:" + $('#themeMenuActiveTextColor').val() + ";}";
|
||||
}
|
||||
console.log(css);
|
||||
// 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
|
||||
@ -139,7 +140,6 @@ $("#themeMenuLoginLink").on("change", function() {
|
||||
|
||||
// Affiche / Cache les options de la position
|
||||
$("#themeMenuPosition").on("change", function() {
|
||||
console.log($("#themeMenuPosition").val());
|
||||
if($(this).val() === 'site-first' || $(this).val() === 'site-second') {
|
||||
$("#themeMenuPositionOptions").slideDown();
|
||||
}
|
||||
|
@ -15,17 +15,9 @@
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Couleur</h4>
|
||||
<h4>Couleurs</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('themeMenuBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond',
|
||||
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="col3">
|
||||
<?php echo template::text('themeMenuTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
@ -33,20 +25,36 @@
|
||||
'value' => $this->getData(['theme', 'menu', 'textColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col3">
|
||||
<?php echo template::text('themeMenuBackgroundColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond',
|
||||
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::text('themeMenuActiveTextColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Texte page active',
|
||||
'value' => $this->getData(['theme', 'menu', 'activeTextColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3 verticalAlignBottom">
|
||||
<?php
|
||||
echo template::checkbox('themeMenuActiveColorAuto', true, 'Page sélectionnée, couleur de fond automatique ', [
|
||||
echo template::checkbox('themeMenuActiveColorAuto', true, 'Fond automatique.', [
|
||||
'checked' => $this->getData(['theme', 'menu', 'activeColorAuto']),
|
||||
'help' => 'La couleur de fond de la page active peut être définie automatique ou selon une couleur définie, comme par exemple celle de fond des pages.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col3 offset9">
|
||||
<?php echo template::text('themeMenuActiveColor', [
|
||||
'class' => 'colorPicker',
|
||||
'help' => 'Couleur de fond de la page sélectionnée dans le menu.<br>Le curseur horizontal règle le niveau de transparence.',
|
||||
'label' => 'Fond',
|
||||
'label' => 'Fond active',
|
||||
'value' => $this->getData(['theme', 'menu', 'activeColor'])
|
||||
]); ?>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user