From 3b8b09df590c761984a87099be6cbd5ad7268c47 Mon Sep 17 00:00:00 2001 From: Prof Langues Date: Thu, 4 Feb 2021 16:41:54 +0100 Subject: [PATCH] =?UTF-8?q?015=20Effets=20d'agrandissements=20de=20l'image?= =?UTF-8?q?=20en=20arri=C3=A8re=20plan=20lorsque=20la=20page=20s'=C3=A9tir?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 21 ++++++++++++++------- core/module/theme/view/body/body.js.php | 7 ++++--- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/core/core.php b/core/core.php index f654b20a..3f47ba4d 100755 --- a/core/core.php +++ b/core/core.php @@ -44,7 +44,7 @@ class common { const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '10.4.00.014'; + const ZWII_VERSION = '10.4.00.015'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = []; @@ -1647,20 +1647,27 @@ class core extends common { $css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/'; // Import des polices de caractères $css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '|' . $this->getData(['theme', 'menu', 'font']) . '");'; - // Fond du site + // Fond du body $colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor'])); - $css .= 'body,div.mce-edit-area{background-color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}'; - // Fond TinyMCe - $css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ' !important}'; + // Body + $css .= 'body{font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}'; if($themeBodyImage = $this->getData(['theme', 'body', 'image'])) { - $css .= 'body,div.mce-edit-area{background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}'; - $css .= 'div.mce-edit-area{background-image:url("../file/source/' . $themeBodyImage . '") !important;background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}'; + // Image dans html pour éviter les déformations. + $css .= 'html{background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}'; + // Couleur du body transparente + $css .= 'body{background-color: rgba(0,0,0,0)}'; + } else { + // Pas d'image couleur du body + $css .= 'html{background-color:' . $colors['normal'] . ';}'; } // Icône BacktoTop $css .= '#backToTop {background-color:' .$this->getData(['theme', 'body', 'toTopbackgroundColor']). ';color:'.$this->getData(['theme', 'body', 'toTopColor']).';}'; // Site $colors = helper::colorVariants($this->getData(['theme', 'text', 'linkColor'])); $css .= 'a{color:' . $colors['normal'] . '}'; + // Fond TinyMCe + $css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ' !important}'; + $css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}'; //$css .= 'a:hover:not(.inputFile, button){color:' . $colors['darken'] . '}'; $css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}'; $css .= 'body{color:' . $this->getData(['theme', 'text', 'textColor']) . '}'; diff --git a/core/module/theme/view/body/body.js.php b/core/module/theme/view/body/body.js.php index 4b46e333..cf08898d 100755 --- a/core/module/theme/view/body/body.js.php +++ b/core/module/theme/view/body/body.js.php @@ -22,14 +22,15 @@ $(document).ready(function(){ */ $("input, select").on("change", function() { // Couleur du fond - var css = "body{background-color:" + $("#themeBodyBackgroundColor").val() + "}"; + var css = "html{background-color:" + $("#themeBodyBackgroundColor").val() + "}"; // Image du fond var themeBodyImage = $("#themeBodyImage").val(); if(themeBodyImage) { - css += "body{background-image:url('site/file/source/" + themeBodyImage + "');background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}"; + css += "html{background-image:url('site/file/source/" + themeBodyImage + "');background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}"; + css += "html{background-color:rgba(0,0,0,0);}"; } else { - css += "body{background-image:none}"; + css += "html{background-image:none}"; } css += '#backToTop {background-color:' + $("#themeBodyToTopBackground").val() + ';color:' + $("#themeBodyToTopColor").val() + ';}';