Noms des variables

This commit is contained in:
Fred Tempez 2021-11-13 09:06:37 +01:00
parent c54b9d262d
commit eaccb4bb9d
7 changed files with 15 additions and 15 deletions

View File

@ -56,7 +56,7 @@
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
$menuClass = ($this->getData(['theme', 'menu', 'position']) === 'body-first' ||
$this->getData(['theme', 'menu', 'position']) === 'body-second' ) &&
$this->getData(['theme', 'menu', 'container']) === 'none' // étendue sur la page
$this->getData(['theme', 'menu', 'width']) === 'none' // étendue sur la page
? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?> >
@ -70,7 +70,7 @@
<?php
$headerClass = $this->getData(['theme', 'header', 'position']) === 'hide' ? 'displayNone' : '';
$headerClass .= $this->getData(['theme', 'header', 'tinyHidden']) ? ' bannerDisplay ' : '';
$headerClass .= $this->getData(['theme', 'header', 'container']) === 'none' ? '' : 'container';
$headerClass .= $this->getData(['theme', 'header', 'width']) === 'none' ? '' : 'container';
?>
<header <?php echo empty($headerClass) ? '' : 'class="' . $headerClass . '"';?>>
<?php echo ($this->getData(['theme','header','linkHomePage']) && $this->getData(['theme','header','feature']) === 'wallpaper' ) ? '<a href="' . helper::baseUrl(false) . '">' : ''; ?>
@ -107,7 +107,7 @@
$menuClass = $this->getData(['theme', 'menu', 'position']) === 'top' ? 'class="container-large"' : 'class="container"';
$menuClass = ($this->getData(['theme', 'menu', 'position']) === 'body-first' ||
$this->getData(['theme', 'menu', 'position']) === 'body-second' ) &&
$this->getData(['theme', 'menu', 'container']) === 'none' // étendue sur la page
$this->getData(['theme', 'menu', 'width']) === 'none' // étendue sur la page
? 'class="container-large"' : 'class="container"';
?>
<div id="menu" <?php echo $menuClass; ?> >

View File

@ -160,7 +160,7 @@ class init extends common {
'tinyHidden' => true,
'feature' => 'wallpaper',
'featureContent' => '<p>Bannière vide</p>',
'container' => 'container'
'width' => 'container'
],
'menu' => [
'backgroundColor' => 'rgba(32, 59, 82, 1)',
@ -183,7 +183,7 @@ class init extends common {
'memberBar' => true,
'burgerLogo' => '',
'burgerContent' => 'title',
'container' => 'container'
'width' => 'container'
],
'site' => [
'backgroundColor' => 'rgba(255, 255, 255, 1)',

View File

@ -69,7 +69,7 @@ class theme extends common {
'Ubuntu' => 'Ubuntu',
'Vollkorn' => 'Vollkorn'
];
public static $containers = [
public static $widths = [
'container' => 'Limitée au site',
'none' => 'Etendue sur la page'
];
@ -229,7 +229,7 @@ class theme extends common {
'uppercase' => 'Majuscules',
'capitalize' => 'Majuscule à chaque mot'
];
public static $widths = [
public static $headerMenuWidths = [
'750px' => 'Petite (750 pixels)',
'960px' => 'Moyenne (960 pixels)',
'1170px' => 'Grande (1170 pixels)',
@ -443,7 +443,7 @@ class theme extends common {
'fontSize' => $this->getInput('themeHeaderFontSize'),
'fontWeight' => $this->getInput('themeHeaderFontWeight'),
'height' => $this->getInput('themeHeaderHeight'),
'container' => $this->getInput('themeHeaderContainer'),
'width' => $this->getInput('themeHeaderWidth'),
'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'),
'container' => $this->getInput('themeMenuContainer'),
'width' => $this->getInput('themeMenuWidth'),
'loginLink' => $this->getInput('themeMenuLoginLink', helper::FILTER_BOOLEAN),
'margin' => $this->getInput('themeMenuMargin', helper::FILTER_BOOLEAN),
'position' => $this->getInput('themeMenuPosition'),

View File

@ -175,7 +175,7 @@ $("input, select").on("change", function() {
}
// Largeur du header
switch ($("#themeHeaderContainer").val()) {
switch ($("#themeHeaderWidth").val()) {
case "container":
$("header").addClass("container");
break;

View File

@ -63,9 +63,9 @@
</div>
</div>
<div class="col4">
<?php echo template::select('themeHeaderContainer', $module::$containers, [
<?php echo template::select('themeHeaderWidth', $module::$widths, [
'label' => 'Largeur',
'selected' => $this->getData(['theme', 'header', 'container'])
'selected' => $this->getData(['theme', 'header', 'width'])
]); ?>
</div>
</div>

View File

@ -123,7 +123,7 @@ $("input, select").on("change", function() {
}
// Largeur étendue
if ($("#themeMenuContainer").val() === 'none') {
if ($("#themeMenuWidth").val() === 'none') {
$("#menu").removeClass();
} else {
$("#menu").addClass("container");

View File

@ -41,9 +41,9 @@
?>
</div>
<div class="col6">
<?php echo template::select('themeMenuContainer', $module::$containers, [
<?php echo template::select('themeMenuWidth', $module::$widths, [
'label' => 'Largeur',
'selected' => $this->getData(['theme', 'menu', 'container'])
'selected' => $this->getData(['theme', 'menu', 'width'])
]); ?>
</div>
</div>