11.2.00.6 :

L'arrière plan du contenu perso est défini dans le thème et non "à la main"
Fond devient Arrière-plan dans la définition des couleurs
This commit is contained in:
Fred Tempez 2021-11-21 16:11:40 +01:00
parent f9109bb4a1
commit 993fa80624
9 changed files with 26 additions and 19 deletions

View File

@ -45,7 +45,7 @@ class common {
// Numéro de version
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
const ZWII_VERSION = '11.2.00.5';
const ZWII_VERSION = '11.2.00.6';
const ZWII_UPDATE_CHANNEL = "test";
public static $actions = [];
@ -2241,15 +2241,16 @@ class core extends common {
$css .= 'header{margin:20px 20px 0 20px}';
}
}
// Couleur du fonc
$colors = helper::colorVariants($this->getData(['theme', 'header', 'backgroundColor']));
$css .= 'header{background-color:' . $colors['normal'].'}';
if ($this->getData(['theme','header','feature']) === 'wallpaper' ) {
$colors = helper::colorVariants($this->getData(['theme', 'header', 'backgroundColor']));
$css .= 'header{background-size:' . $this->getData(['theme','header','imageContainer']).'}';
$css .= 'header{background-color:' . $colors['normal'];
$css .= 'header{background-size:' . $this->getData(['theme','header','imageContainer']).';}';
// Valeur de hauteur traditionnelle
$css .= ';height:' . $this->getData(['theme', 'header', 'height']) . ';line-height:' . $this->getData(['theme', 'header', 'height']) ;
$css .= ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}';
$css .= 'header{height:' . $this->getData(['theme', 'header', 'height']) . ';line-height:' . $this->getData(['theme', 'header', 'height']) . ';text-align:' . $this->getData(['theme', 'header', 'textAlign']) . '}';
if($themeHeaderImage = $this->getData(['theme', 'header', 'image'])) {
$css .= 'header{background-image:url("../file/source/' . $themeHeaderImage . '");background-position:' . $this->getData(['theme', 'header', 'imagePosition']) . ';background-repeat:' . $this->getData(['theme', 'header', 'imageRepeat']) . '}';
}

View File

@ -498,13 +498,14 @@ header .container {
height: 100%;
}
/* Marges au cotenu de la bannière personnalisée
/* Marges du contenu de la bannière personnalisée
header:not(.container) #featureContent {
margin: 0 10px;
}*/
header #featureContent {
overflow: hidden;
margin: 0 10px;
}

View File

@ -66,7 +66,7 @@
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : "";
echo template::file('themeBodyImage', [
'help' => 'Sélectionner une image',
'label' => 'Fond',
'label' => 'Arrière-plan',
'type' => 1,
'value' => $imageFile
]); ?>

View File

@ -57,7 +57,7 @@
<div class="col6">
<?php echo template::text('themeFooterBackgroundColor', [
'class' => 'colorPicker',
'label' => 'Fond',
'label' => 'Arrière-plan',
'value' => $this->getData(['theme', 'footer', 'backgroundColor']),
'help' => 'Quand le pied de page est dans le site, l\'arrière plan transparent montre le fond de la page. Quand le pied de page est hors du site, l\'arrière plan transparent montre le fond du site.'
]); ?>

View File

@ -83,7 +83,7 @@ $("input, select").on("change", function() {
var headerFont = $("#themeHeaderFont").val();
var css = "@import url('https://fonts.googleapis.com/css?family=" + headerFont + "');";
css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";text-align:" + $("#themeHeaderTextAlign").val() + ";";
css += "header{text-align:" + $("#themeHeaderTextAlign").val() + ";";
if ($("#themeHeaderImage").val()) {
// Une image est sélectionnée
css += "background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + $("#themeHeaderImage").val() + "');background-repeat:" + $("#themeHeaderImageRepeat").val() + ";background-position:" + $("#themeHeaderImagePosition").val() + ";";
@ -97,7 +97,7 @@ $("input, select").on("change", function() {
// Taille, couleur, épaisseur et capitalisation du titre de la bannière
css += "header span{color:" + $("#themeHeaderTextColor").val() + ";font-family:'" + headerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeHeaderFontWeight").val() + ";font-size:" + $("#themeHeaderFontSize").val() + ";text-transform:" + $("#themeHeaderTextTransform").val() + "}";
css += "header span{font-family:'" + headerFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeHeaderFontWeight").val() + ";font-size:" + $("#themeHeaderFontSize").val() + ";text-transform:" + $("#themeHeaderTextTransform").val() + "}";
// Cache le titre de la bannière
if($("#themeHeaderTextHide").is(":checked")) {
@ -108,6 +108,9 @@ $("input, select").on("change", function() {
}
}
// Couleur du fond
css += "header{background-color:" + $("#themeHeaderBackgroundColor").val() + ";}";
// Position de la bannière
var positionNav = <?php echo json_encode($this->getData(['theme', 'menu', 'position'])); ?>;
@ -252,9 +255,11 @@ $("#themeHeaderFeature").on("change", function() {
if($(this).val() === 'wallpaper') {
$(".wallpaperContainer").show();
$(".featureContainer").hide();
$("#themeHeaderTextColorWrapper").show();
}
if($(this).val() === 'feature') {
$(".featureContainer").show();
$(".wallpaperContainer").hide();
$("#themeHeaderTextColorWrapper").hide();
}
}).trigger("change");

View File

@ -72,7 +72,7 @@
</div>
</div>
</div>
<div class="row wallpaperContainer">
<div class="row">
<div class="col12">
<div class="block">
<h4>Couleurs</h4>
@ -81,7 +81,7 @@
<?php echo template::text('themeHeaderBackgroundColor', [
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond',
'label' => 'Arrière-plan',
'value' => $this->getData(['theme', 'header', 'backgroundColor'])
]); ?>
</div>
@ -157,7 +157,7 @@
$this->getData(['theme', 'header', 'image']) : "";
echo template::file('themeHeaderImage', [
'help' => 'Sélectionner une image aux dimensions recommandées ci-dessous :',
'label' => 'Fond',
'label' => 'Image',
'type' => 1,
'value' => $imageFile
]); ?>

View File

@ -138,7 +138,7 @@
<?php echo template::text('themeMenuBackgroundColor', [
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond',
'label' => 'Arrière-plan',
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
]); ?>
</div>

View File

@ -66,7 +66,7 @@
<?php echo template::text('themeSiteBackgroundColor', [
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond',
'label' => 'Arrière-plan',
'value' => $this->getData(['theme', 'site', 'backgroundColor'])
]); ?>
</div>

View File

@ -115,7 +115,7 @@
<?php echo template::text('galleryThemeLegendBgColor', [
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond',
'label' => 'Arrière-plan',
'value' => $this->getData(['module', $this->getUrl(0), 'theme','legendBgColor'])
]); ?>
</div>