From 5adf44aeff474f1dd1e70771016a45a9b96d938d Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sat, 21 Mar 2020 18:08:04 +0100 Subject: [PATCH] =?UTF-8?q?[9.2.26]=20Th=C3=A8me=20admin=20+=20arri=C3=A8r?= =?UTF-8?q?eplan=20TinyMCE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 5 +- core/layout/admin.css | 56 ++++++++++++++++++ core/module/config/view/index/index.css | 27 +-------- core/module/install/view/update/update.css | 17 +----- core/module/page/view/edit/edit.css | 25 +------- core/module/theme/view/advanced/advanced.css | 27 +-------- core/module/theme/view/body/body.css | 27 +-------- core/module/theme/view/footer/footer.css | 27 +-------- core/module/theme/view/header/header.css | 26 +------- core/module/theme/view/index/index.css | 32 ++-------- core/module/theme/view/index/index.php | 7 ++- core/module/theme/view/manage/manage.css | 27 +-------- core/module/theme/view/menu/menu.css | 26 +------- core/module/theme/view/site/site.css | 31 +--------- core/module/theme/view/site/site.js.php | 62 +++++++++++--------- core/module/theme/view/site/site.php | 38 ++++++------ core/module/user/view/add/add.css | 26 +------- core/module/user/view/edit/edit.css | 25 +------- core/module/user/view/index/index.css | 25 +------- core/module/user/view/reset/reset.css | 26 +------- module/blog/view/add/add.css | 25 +------- module/blog/view/article/article.php | 2 - module/blog/view/comment/comment.css | 25 +------- module/blog/view/config/config.css | 25 +------- module/blog/view/edit/edit.css | 25 +------- module/form/view/config/config.css | 25 +------- module/form/view/data/data.css | 25 +------- module/form/view/data/data.php | 1 - module/gallery/view/config/config.css | 25 +------- module/gallery/view/edit/edit.css | 25 +------- module/news/view/add/add.css | 25 +------- module/news/view/config/config.css | 25 +------- module/redirection/view/config/config.css | 25 +------- module/redirection/view/index/index.css | 25 +------- 34 files changed, 153 insertions(+), 712 deletions(-) create mode 100644 core/layout/admin.css diff --git a/core/core.php b/core/core.php index dd836e32..eb67fe0c 100644 --- a/core/core.php +++ b/core/core.php @@ -1179,7 +1179,8 @@ class core extends common { $css .= 'a{color:' . $colors['normal'] . '}'; $css .= 'a:hover{color:' . $colors['darken'] . '}'; $css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}'; - $css .= 'body,.block h4,input[type=\'email\'],input[type=\'text\'],input[type=\'password\'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:' . $this->getData(['theme', 'text', 'textColor']) . '}'; + $css .= 'body,.block h4,input[type=\'email\'],input[type=\'text\'],input[type=\'password\'],.inputFile,select,textarea,.inputFile{color:' . $this->getData(['theme', 'text', 'textColor']) . '}'; + $css .= '.button.buttonGrey,.button.buttonGrey:hover{color:' . $this->getData(['theme', 'text', 'textColor']) . '}'; $css .= '.container{max-width:' . $this->getData(['theme', 'site', 'width']) . '}'; $css .= $this->getData(['theme', 'site', 'width']) === '100%' ? '#site{margin:0 auto !important;} body{margin:0 auto !important;} #bar{margin:0 auto !important;} body > header{margin:0 auto !important;} body > nav {margin: 0 auto !important;} body > footer {margin:0 auto !important;}': ''; $css .= $this->getData(['theme', 'site', 'width']) === '750px' ? '.button, button{font-size:0.8em;}' : ''; @@ -1192,7 +1193,7 @@ class core extends common { $css .= '.speechBubble:before{border-color:' . $colors['normal'] . ' transparent transparent transparent}'; $css .= '.button:hover,button[type=\'submit\']:hover,.pagination a:hover,input[type=\'checkbox\']:not(:active):checked:hover + label:before,input[type=\'checkbox\']:active + label:before,input[type=\'radio\']:checked:hover + label:before,input[type=\'radio\']:not(:checked):active + label:before{background-color:' . $colors['darken'] . '}'; $css .= '.helpButton span:hover{color:' . $colors['darken'] . '}'; - $css .= '.button:active,button[type=\'submit\']:active,.pagination a:active{background-color:' . $colors['veryDarken'] . '}'; + $css .= '.button:active,button[type=\'submit\']:active,.pagination a:active{background-color:' . $colors['veryDarken'] . '}'; $colors = helper::colorVariants($this->getData(['theme', 'title', 'textColor'])); $css .= 'h1,h2,h3,h4,h5,h6{color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'title', 'font'])) . '",sans-serif;font-weight:' . $this->getData(['theme', 'title', 'fontWeight']) . ';text-transform:' . $this->getData(['theme', 'title', 'textTransform']) . '}'; // Bannière diff --git a/core/layout/admin.css b/core/layout/admin.css new file mode 100644 index 00000000..3e4f8a3a --- /dev/null +++ b/core/layout/admin.css @@ -0,0 +1,56 @@ +/** + * This file is part of Zwii. + * + * For full copyright and license information, please see the LICENSE + * file that was distributed with this source code. + * + * @author Rémi Jean + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2020, Frédéric Tempez + * @license GNU General Public License, version 3 + * @link http://zwiicms.com/ + */ + + +#site { + background-color: rgba(255, 255, 255, 1); +} + +body:not(.editorWysiwyg), +.block h4, +input[type=email], +input[type=text], +input[type=password], +.inputFile, +select, +textarea, +.inputFile, +span .zwiico-help { + color: rgba(33, 34, 35, 1); +} + +.button, +button[type=submit], +.button:hover, +button[type=submit]:hover, +input[type="checkbox"]:checked + label::before, +.speechBubble { + background-color: rgba(32, 59, 82, 1); + color: white; +} + +.speechBubble::before { + border-color: rgba(32, 59, 82, 1) transparent transparent transparent; +} + +body, .row > div { + font: "Open+Sans", sans-serif; + font-size: 13px; +} +body h1, h2, h3, h4, h5, h6 { + font-family: "Oswald"; + color: rgba(74, 105, 189, 1); +} + + diff --git a/core/module/config/view/index/index.css b/core/module/config/view/index/index.css index 8aefd17a..191d1c13 100644 --- a/core/module/config/view/index/index.css +++ b/core/module/config/view/index/index.css @@ -11,29 +11,4 @@ * @license GNU General Public License, version 3 * @link http://zwiicms.com/ */ - - -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file + @import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/install/view/update/update.css b/core/module/install/view/update/update.css index ef597423..af663d8c 100644 --- a/core/module/install/view/update/update.css +++ b/core/module/install/view/update/update.css @@ -13,20 +13,5 @@ */ -#site { - background-color: rgba(255, 255, 255, 1); -} -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} \ No newline at end of file + @import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/page/view/edit/edit.css b/core/module/page/view/edit/edit.css index 029db4f8..92452732 100644 --- a/core/module/page/view/edit/edit.css +++ b/core/module/page/view/edit/edit.css @@ -13,27 +13,4 @@ */ -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file + @import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/theme/view/advanced/advanced.css b/core/module/theme/view/advanced/advanced.css index ede2b1d7..7ae5b983 100644 --- a/core/module/theme/view/advanced/advanced.css +++ b/core/module/theme/view/advanced/advanced.css @@ -12,28 +12,5 @@ * @link http://zwiicms.com/ */ - -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file +/* Thème administration */ +@import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/theme/view/body/body.css b/core/module/theme/view/body/body.css index 3f764b8d..09788d08 100644 --- a/core/module/theme/view/body/body.css +++ b/core/module/theme/view/body/body.css @@ -11,32 +11,9 @@ * @link http://zwiicms.com/ */ +@import url("core/layout/admin.css"); + #backToTop { display: block; } - -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file diff --git a/core/module/theme/view/footer/footer.css b/core/module/theme/view/footer/footer.css index ede2b1d7..7ae5b983 100644 --- a/core/module/theme/view/footer/footer.css +++ b/core/module/theme/view/footer/footer.css @@ -12,28 +12,5 @@ * @link http://zwiicms.com/ */ - -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file +/* Thème administration */ +@import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/theme/view/header/header.css b/core/module/theme/view/header/header.css index ede2b1d7..dcedae12 100644 --- a/core/module/theme/view/header/header.css +++ b/core/module/theme/view/header/header.css @@ -12,28 +12,4 @@ * @link http://zwiicms.com/ */ - -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file + @import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/theme/view/index/index.css b/core/module/theme/view/index/index.css index 7a7607d3..451894c3 100755 --- a/core/module/theme/view/index/index.css +++ b/core/module/theme/view/index/index.css @@ -10,6 +10,10 @@ * @link http://zwiicms.com/ */ + +/* Thème administration */ +@import url("core/layout/admin.css"); + #bar, #site, header, @@ -54,31 +58,3 @@ nav li ul { #themeOverlayBody { position: fixed; /* Sinon l'overlay s'arrête à la hauteur de la fenêtre et non de la page*/ } - -/* Contrastes */ - - -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file diff --git a/core/module/theme/view/index/index.php b/core/module/theme/view/index/index.php index b92fc11d..18b43f12 100755 --- a/core/module/theme/view/index/index.php +++ b/core/module/theme/view/index/index.php @@ -15,6 +15,7 @@
'buttonBlue', 'ico' => 'upload', 'href' => helper::baseUrl() . $this->getUrl(0) . '/manage', 'value' => 'Thèmes' @@ -22,13 +23,15 @@
'buttonBlue', + 'ico' => 'code', 'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced', - 'value' => 'Éditeur CSS', - 'ico' => 'code' + 'value' => 'Éditeur CSS' ]); ?>
'buttonBlue', 'ico' => 'eye', 'value' => 'Zones cachées' ]); ?> diff --git a/core/module/theme/view/manage/manage.css b/core/module/theme/view/manage/manage.css index ede2b1d7..7ae5b983 100644 --- a/core/module/theme/view/manage/manage.css +++ b/core/module/theme/view/manage/manage.css @@ -12,28 +12,5 @@ * @link http://zwiicms.com/ */ - -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file +/* Thème administration */ +@import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/theme/view/menu/menu.css b/core/module/theme/view/menu/menu.css index ede2b1d7..9774521b 100644 --- a/core/module/theme/view/menu/menu.css +++ b/core/module/theme/view/menu/menu.css @@ -12,28 +12,4 @@ * @link http://zwiicms.com/ */ - -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans"; -} -body h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} \ No newline at end of file +@import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/theme/view/site/site.css b/core/module/theme/view/site/site.css index 29fe0414..92452732 100644 --- a/core/module/theme/view/site/site.css +++ b/core/module/theme/view/site/site.css @@ -13,33 +13,4 @@ */ -#site { - background-color: rgba(255, 255, 255, 1); -} - -body:not(.editorWysiwyg), -.block h4, -input[type="email"], -input[type="text"], -input[type="password"], -.inputFile, -select, -textarea, -.inputFile, -.button.buttonGrey, -.button.buttonGrey:hover { - color: rgba(33, 34, 35, 1); -} -body { - font-family: "Open+Sans",sans-serif; -} -h1, h2, h3, h4, h5, h6 { - font-family: "Oswald"; - color: rgba(74, 105, 189, 1); -} -div.preview { - border-radius: 2%; - -webkit-box-shadow: 5px 5px 5px 2px rgba(0,0,0,0.75); - -moz-box-shadow: 5px 5px 5px 2px rgba(0,0,0,0.75); - box-shadow: 5px 5px 5px 2px rgba(0,0,0,0.75); -} \ No newline at end of file + @import url("core/layout/admin.css"); \ No newline at end of file diff --git a/core/module/theme/view/site/site.js.php b/core/module/theme/view/site/site.js.php index febdd146..a42ed46c 100755 --- a/core/module/theme/view/site/site.js.php +++ b/core/module/theme/view/site/site.js.php @@ -26,43 +26,45 @@ $("input, select").on("change",function() { function updateDOM() { + + /** + * Aperçu dans la boîte + */ + // Import des polices de caractères var titleFont = $("#themeTitleFont").val(); var textFont = $("#themeTextFont").val(); var css = "@import url('https://fonts.googleapis.com/css?family=" + titleFont + "|" + textFont + "');"; - // Couleurs des boutons + // Couleurs des boutons var colors = core.colorVariants($("#themeButtonBackgroundColor").val()); - css += ".speechBubble,.button,.button:hover,.pagination a,.pagination a:hover,input[type='checkbox']:checked + label:before,.helpContent{background-color:" + colors.normal + ";color:" + colors.text + "}"; - //css += ".helpButton span{color:" + colors.normal + "}"; - //css += "input[type='text']:hover,input[type='password']:hover,.inputFile:hover,select:hover,textarea:hover{border-color:" + colors.normal + "}"; - //css += ".speechBubble:before{border-color:" + colors.normal + " transparent transparent transparent}"; - //css += ".button:hover,button[type='submit']:hover,.pagination a:hover,input[type='checkbox']:not(:active):checked:hover + label:before,input[type='checkbox']:active + label:before{background-color:" + colors.darken + "}"; - //css += ".helpButton span:hover{color:" + colors.darken + "}"; - //css += ".button:active,button[type='submit']:active,.pagination a:active{background-color:" + colors.veryDarken + "}"; + css += ".button.buttonSubmitPreview{background-color:" + colors.normal + ";}"; + css += ".button.buttonSubmitPreview:hover{background-color:" + colors.darken + "}"; + // Couleurs des liens + colors = core.colorVariants($("#themeLinkTextColor").val()); + css += "a.urlPreview{color:" + colors.normal + "}"; + css += "a.urlPreview:hover{color:" + colors.darken + "}"; + // Couleur, polices, épaisseur et capitalisation de caractères des titres + css += ".headerPreview,.headerPreview{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").val() + "}"; + // Police de caractères + // Police + couleur + css += ".textPreview,.urlPreview{color:" + $("#themeTextTextColor").val() + ";font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif; font-size:" + $("#themeTextFontSize").val() + ";}"; + // Couleur des liens + //css += "a.preview,.buttonSubmitPreview{font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}"; + + // Taille du texte + // Couleur du texte + css += "p.preview,.buttonSubmitPreview{color:" + $("#themeTextTextColor").val() + "}"; + + /** + * Aperçu réel + */ + + // Taille du site if ($("#themeSiteWidth").val() === "750px") { css += ".button, button{font-size:0.8em;}"; } else { css += ".button, button{font-size:1em;}"; } - // Couleurs des liens - colors = core.colorVariants($("#themeLinkTextColor").val()); - css += "a{color:" + colors.normal + "}"; - css += "a:hover{color:" + colors.darken + "}"; - css += "a.preview,.buttonPreview{color:" + colors.normal + "}"; - css += "a.preview:hover,.buttonPreview{color:" + colors.darken + "}"; - // Couleur, polices, épaisseur et capitalisation de caractères des titres - //css += "h1,h2,h3,h4,h5,h6{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").val() + "}"; - css += "h1.preview,h3.preview{color:" + $("#themeTitleTextColor").val() + ";font-family:'" + titleFont.replace(/\+/g, " ") + "',sans-serif;font-weight:" + $("#themeTitleFontWeight").val() + ";text-transform:" + $("#themeTitleTextTransform").val() + "}"; - // Police de caractères - //css += "body{font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}"; - // Police + couleur - css += "p.preview{color:" + $("#themeTextTextColor").val() + ";font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}"; - css += "a.preview,.buttonPreview{font-family:'" + textFont.replace(/\+/g, " ") + "',sans-serif}"; - // Taille du texte - //css += "body,.row > div{font-size:" + $("#themeTextFontSize").val() + "}"; - // Couleur du texte - //css += "body,.block h4,input[type='email'],input[type='text'],input[type='password'],.inputFile,select,textarea,.inputFile,.button.buttonGrey,.button.buttonGrey:hover{color:" + $("#themeTextTextColor").val() + "}"; - css += "p.preview,.buttonPreview{color:" + $("#themeTextTextColor").val() + "}"; // Largeur du site css += ".container{max-width:" + $("#themeSiteWidth").val() + "}"; if ($("#themeSiteWidth").val() === "100%") { @@ -74,7 +76,11 @@ function updateDOM() { // Couleur du site, arrondi sur les coins du site et ombre sur les bords du site //css += "#site{background-color:" + $("#themeSiteBackgroundColor").val() + ";border-radius:" + $("#themeSiteRadius").val() + ";box-shadow:" + $("#themeSiteShadow").val() + " #212223}"; css += "#site{border-radius:" + $("#themeSiteRadius").val() + ";box-shadow:" + $("#themeSiteShadow").val() + " #212223}"; - css += "div.preview{background-color:" + $("#themeSiteBackgroundColor").val() + ";}"; + css += "div.bgPreview{background-color:" + $("#themeSiteBackgroundColor").val() + ";}"; + + /** + * Injection dans le DOM + */ // Ajout du css au DOM $("#themePreview").remove(); $("