diff --git a/core/core.php b/core/core.php
index 08805477..1fbe9adb 100644
--- a/core/core.php
+++ b/core/core.php
@@ -2233,7 +2233,6 @@ class core extends common {
$css .= '.block {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) . ';}.block h4 {background-color:'. $colors['normal'] . ';color:' . $colors['text'] .';}';
$css .= '.mce-tinymce {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) .' !important;}';
// Bannière
- $colors = helper::colorVariants($this->getData(['theme', 'header', 'backgroundColor']));
if($this->getData(['theme', 'header', 'margin'])) {
if($this->getData(['theme', 'menu', 'position']) === 'site-first') {
$css .= 'header{margin:0 20px}';
@@ -2242,18 +2241,21 @@ class core extends common {
$css .= 'header{margin:20px 20px 0 20px}';
}
}
- $css .= 'header{background-size:' . $this->getData(['theme','header','imageContainer']).'}';
- $css .= 'header{background-color:' . $colors['normal'];
-
- // 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']) . '}';
- 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']) . '}';
+ 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'];
+
+ // 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']) . '}';
+ 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']) . '}';
+ }
+ $colors = helper::colorVariants($this->getData(['theme', 'header', 'textColor']));
+ $css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'header', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}';
}
- $colors = helper::colorVariants($this->getData(['theme', 'header', 'textColor']));
- $css .= 'header span{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'header', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'header', 'fontWeight']) . ';font-size:' . $this->getData(['theme', 'header', 'fontSize']) . ';text-transform:' . $this->getData(['theme', 'header', 'textTransform']) . '}';
// Menu
$colors = helper::colorVariants($this->getData(['theme', 'menu', 'backgroundColor']));
$css .= 'nav,nav.navMain a{background-color:' . $colors['normal'] . '}';
diff --git a/core/layout/main.php b/core/layout/main.php
index 423fcd7c..519f20b1 100644
--- a/core/layout/main.php
+++ b/core/layout/main.php
@@ -61,20 +61,24 @@
getData(['theme', 'header', 'position']) === 'body'): ?>
Bannière vide
' ], 'menu' => [ 'backgroundColor' => 'rgba(32, 59, 82, 1)', diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 639e9ad4..bc199963 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -69,6 +69,10 @@ class theme extends common { 'Ubuntu' => 'Ubuntu', 'Vollkorn' => 'Vollkorn' ]; + public static $containers = [ + 'container' => 'Largeur du site', + 'container-large' => 'Largeur de la page' + ]; public static $footerblocks = [ 1 => [ 'hide' => 'Masqué', @@ -133,6 +137,10 @@ class theme extends common { 'site' => 'Dans le site', 'hide' => 'Cachée' ]; + public static $headerFeatures = [ + 'wallpaper' => 'Couleur unie ou papier-peint', + 'content' => 'Contenu personnalisé' + ]; public static $imagePositions = [ 'top left' => 'En haut à gauche', 'top center' => 'En haut au centre', @@ -435,6 +443,7 @@ class theme extends common { 'fontSize' => $this->getInput('themeHeaderFontSize'), 'fontWeight' => $this->getInput('themeHeaderFontWeight'), 'height' => $this->getInput('themeHeaderHeight'), + 'container' => $this->getInput('themeHeaderContainer'), 'image' => $this->getInput('themeHeaderImage'), 'imagePosition' => $this->getInput('themeHeaderImagePosition'), 'imageRepeat' => $this->getInput('themeHeaderImageRepeat'), @@ -446,7 +455,9 @@ class theme extends common { 'textTransform' => $this->getInput('themeHeaderTextTransform'), 'linkHomePage' => $this->getInput('themeHeaderlinkHomePage',helper::FILTER_BOOLEAN), 'imageContainer' => $this->getInput('themeHeaderImageContainer'), - 'tinyHidden' => $this->getInput('themeHeaderTinyHidden', helper::FILTER_BOOLEAN) + 'tinyHidden' => $this->getInput('themeHeaderTinyHidden', helper::FILTER_BOOLEAN), + 'feature' => $this->getInput('themeHeaderFeature'), + 'featureContent' => $this->getInput('themeHeaderContent', null) ]]); // Modification de la position du menu selon la position de la bannière if ( $this->getData(['theme','header','position']) == 'site' ) @@ -474,7 +485,8 @@ class theme extends common { $this->addOutput([ 'title' => 'Personnalisation de la bannière', 'vendor' => [ - 'tinycolorpicker' + 'tinycolorpicker', + 'tinymce' ], 'view' => 'header' ]); @@ -504,6 +516,7 @@ class theme extends common { 'fontSize' => $this->getInput('themeMenuFontSize'), 'fontWeight' => $this->getInput('themeMenuFontWeight'), 'height' => $this->getInput('themeMenuHeight'), + 'container' => $this->getInput('themeMenuContainer'), 'loginLink' => $this->getInput('themeMenuLoginLink', helper::FILTER_BOOLEAN), 'margin' => $this->getInput('themeMenuMargin', helper::FILTER_BOOLEAN), 'position' => $this->getInput('themeMenuPosition'), diff --git a/core/module/theme/view/header/header.php b/core/module/theme/view/header/header.php index 87e2a974..896b0d2a 100644 --- a/core/module/theme/view/header/header.php +++ b/core/module/theme/view/header/header.php @@ -17,51 +17,40 @@