[9.2.12] Bords arrondis de la page active dans le menu

This commit is contained in:
fredtempez 2019-11-29 16:09:28 +01:00
parent 7f28f87dda
commit e546f91ca5
4 changed files with 44 additions and 26 deletions

View File

@ -1158,6 +1158,7 @@ class core extends common {
$color2 = helper::colorVariants($this->getData(['theme', 'menu', 'textColor']));
$css .= 'nav a.active{color:' . $color2['text'] . '}';
}
$css .= 'nav 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(

View File

@ -170,6 +170,14 @@ class theme extends common {
'site' => 'Dans le site',
'hide' => 'Caché'
];
public static $menuRadius = [
'0px' => 'Aucun',
'3px 3px 0px 0px' => 'Très léger',
'6px 6px 0px 0px' => 'Léger',
'9px 9px 0px 0px' => 'Moyen',
'12px 12px 0px 0px' => 'Important',
'15px 15px 0px 0px' => 'Très important'
];
public static $radius = [
'0px' => 'Aucun',
'5px' => 'Très léger',
@ -444,7 +452,8 @@ class theme extends common {
'textTransform' => $this->getInput('themeMenuTextTransform'),
'fixed' => $this->getInput('themeMenuFixed', helper::FILTER_BOOLEAN),
'activeColorAuto' => $this->getInput('themeMenuActiveColorAuto', helper::FILTER_BOOLEAN),
'activeColor' => $this->getInput('themeMenuActiveColor')
'activeColor' => $this->getInput('themeMenuActiveColor'),
'radius' => $this->getInput('themeMenuRadius')
]]);
// Valeurs en sortie
$this->addOutput([

View File

@ -35,20 +35,20 @@
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::text('themeMenuActiveColor', [
'class' => 'colorPicker',
'help' => 'Couleur d\'arrièreplan du menu sélectionné.<br>Le curseur horizontal règle le niveau de transparence.',
'label' => 'Activé',
'value' => $this->getData(['theme', 'menu', 'activeColor'])
]); ?>
</div>
<div class="col12">
<div class="col6">
<?php echo template::checkbox('themeMenuActiveColorAuto', true, 'Page active, couleur de 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>
<div class="col6">
<?php echo template::text('themeMenuActiveColor', [
'class' => 'colorPicker',
'help' => 'Couleur d\'arrièreplan du menu sélectionné.<br>Le curseur horizontal règle le niveau de transparence.',
'label' => 'Page active',
'value' => $this->getData(['theme', 'menu', 'activeColor'])
]); ?>
</div>
</div>
</div>
</div>
@ -100,27 +100,35 @@
<div class="block">
<h4>Configuration</h4>
<div class="row">
<div class="col4">
<div class="col6">
<?php
if ( $this->getData(['theme', 'header', 'position']) == "site")
{ echo template::select('themeMenuPosition', $module::$menuPositionsSite, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position'])
]);
}else{
echo template::select('themeMenuPosition', $module::$menuPositionsBody, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position'])
]); }
?>
if ( $this->getData(['theme', 'header', 'position']) == "site")
{ echo template::select('themeMenuPosition', $module::$menuPositionsSite, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position'])
]);
}else{
echo template::select('themeMenuPosition', $module::$menuPositionsBody, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position'])
]); }
?>
</div>
<div class="col4">
<div class="col6">
<?php echo template::select('themeMenuRadius', $module::$menuRadius, [
'label' => 'Bords arrondis',
'selected' => $this->getData(['theme', 'menu', 'radius'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::select('themeMenuHeight', $module::$menuHeights, [
'label' => 'Hauteur',
'selected' => $this->getData(['theme', 'menu', 'height'])
]); ?>
</div>
<div class="col4">
<div class="col6">
<?php echo template::select('themeMenuTextAlign', $module::$aligns, [
'label' => 'Alignement du contenu',
'selected' => $this->getData(['theme', 'menu', 'textAlign'])

View File

@ -123,7 +123,7 @@
</div>
<div class="col4">
<?php echo template::select('themeSiteRadius', $module::$radius, [
'label' => 'Arrondi des coins',
'label' => 'Bords arrondis',
'selected' => $this->getData(['theme', 'site', 'radius'])
]); ?>
</div>