noms de variables + bug overflow

This commit is contained in:
fredtempez 2021-11-15 09:01:08 +01:00
parent d9c0bc4b9b
commit 12e21a3067
6 changed files with 12 additions and 17 deletions

View File

@ -2257,11 +2257,10 @@ class core extends common {
}
if ($this->getData(['theme','header','feature']) === 'feature' ) {
// Hauteur de la taille du contenu perso
if ($this->getData(['theme', 'header', 'height']) !== 'none') {
$css .= 'header{height:' . $this->getData(['theme', 'header', 'height']) . ';}';
}
$css .= 'header #featureContent{height:' . $this->getData(['theme', 'header', 'height']) . '; }';
}
// Menu
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor']));
$css .= 'nav,nav.navMain a{background-color:' . $colors['normal'] . '}';

View File

@ -69,7 +69,7 @@ class theme extends common {
'Ubuntu' => 'Ubuntu',
'Vollkorn' => 'Vollkorn'
];
public static $containerWidths = [
public static $containerWides = [
'container' => 'Limitée au site',
'none' => 'Etendue sur la page'
];
@ -125,7 +125,7 @@ class theme extends common {
'2.4vmax' => 'Très grande (240%)'
];
public static $headerHeights = [
'none' => 'Libre', // texte dynamique cf header.js.php
'unset' => 'Libre', // texte dynamique cf header.js.php
'100px' => 'Très petite (100px) ',
'150px' => 'Petite (150px)',
'200px' => 'Moyenne (200px)',
@ -443,7 +443,7 @@ class theme extends common {
'fontSize' => $this->getInput('themeHeaderFontSize'),
'fontWeight' => $this->getInput('themeHeaderFontWeight'),
'height' => $this->getInput('themeHeaderHeight'),
'width' => $this->getInput('themeHeaderWidth'),
'wide' => $this->getInput('themeHeaderWide'),
'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'),
'width' => $this->getInput('themeMenuWidth'),
'wide' => $this->getInput('themeMenuWide'),
'loginLink' => $this->getInput('themeMenuLoginLink', helper::FILTER_BOOLEAN),
'margin' => $this->getInput('themeMenuMargin', helper::FILTER_BOOLEAN),
'position' => $this->getInput('themeMenuPosition'),

View File

@ -26,12 +26,8 @@ $("input, select").on("change", function() {
// Contenu perso
if ($("#themeHeaderFeature").val() == "feature") {
var headerHeight = $("#themeHeaderHeight").val();
if (headerHeight === 'none') {
css = "header{height:unset; background-position:top; background-repeat: no-repeat;;line-height:1.15;background-color:unset;;background-image:unset;text-align:unset}";
} else {
css = "header{height:" + $("#themeHeaderHeight").val() + "; overflow:hidden;background-position:top; background-repeat: no-repeat;;line-height:1.15;background-color:unset;;background-image:unset;text-align:unset}";
}
css = "header{height:" + $("#themeHeaderHeight").val() + "; overflow:hidden;background-position:top; background-repeat: no-repeat;;line-height:1.15;background-color:unset;;background-image:unset;text-align:unset}";
$("#featureContent").appendTo("header").show();
$("#themeHeaderTitle").hide();
@ -175,7 +171,7 @@ $("input, select").on("change", function() {
}
// Largeur du header
switch ($("#themeHeaderWidth").val()) {
switch ($("#themeHeaderWide").val()) {
case "container":
$("header").addClass("container");
break;

View File

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

View File

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

View File

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