From e679ebf1a3f377632ef86f5d24c697f013fc25e9 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 2 Jan 2020 19:30:23 +0100 Subject: [PATCH] [10.0.023.dev] Favicon switcher --- core/core.php | 21 +++++++++++++++------ core/module/config/config.php | 1 + core/module/config/view/index/index.php | 12 ++++++++++-- core/vendor/zwiico/ico/faviconDark.ico | Bin 0 -> 1150 bytes sitemap.xml.gz | Bin 384 -> 382 bytes 5 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 core/vendor/zwiico/ico/faviconDark.ico diff --git a/core/core.php b/core/core.php index 0cd8964d..f29cd6af 100644 --- a/core/core.php +++ b/core/core.php @@ -34,7 +34,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '10.0.022.dev'; + const ZWII_VERSION = '10.0.023.dev'; public static $actions = []; public static $coreModuleIds = [ @@ -995,8 +995,6 @@ class common { // Préparation des clés de légendes pour la v10 // Construire une liste plate de parents et d'enfants - $pageList = array(); - $pageList = array(); foreach ($this->getHierarchy(null,null,null) as $parentKey=>$parentValue) { @@ -1818,14 +1816,25 @@ class layout extends common { * Affiche le favicon */ public function showFavicon() { - $favicon = $this->getData(['config', 'favicon']); + // Light scheme + $favicon = $this->getData(['config', 'favicon']); if($favicon && file_exists(self::FILE_DIR.'source/' . $favicon) ) { - echo ''; + echo ''; } else { - echo ''; + echo ''; } + // Dark scheme + $faviconDark = $this->getData(['config', 'faviconDark']); + if($faviconDark && + file_exists(self::FILE_DIR.'source/' . $faviconDark) + ) { + echo ''; + echo ''; + } else { + echo ''; + } } diff --git a/core/module/config/config.php b/core/module/config/config.php index 2adfcaf0..10841ebf 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -390,6 +390,7 @@ class config extends common { 'maintenance' => $this->getInput('configMaintenance', helper::FILTER_BOOLEAN), 'cookieConsent' => $this->getInput('configCookieConsent', helper::FILTER_BOOLEAN), 'favicon' => $this->getInput('configFavicon'), + 'faviconDark' => $this->getInput('configFaviconDark'), 'social' => [ 'facebookId' => $this->getInput('configSocialFacebookId'), 'linkedinId' => $this->getInput('configSocialLinkedinId'), diff --git a/core/module/config/view/index/index.php b/core/module/config/view/index/index.php index b71d8609..f2cc3748 100755 --- a/core/module/config/view/index/index.php +++ b/core/module/config/view/index/index.php @@ -58,14 +58,22 @@

Réglages

-
+
1, 'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', - 'label' => 'Favicon', + 'label' => 'Favicon thème clair', 'value' => $this->getData(['config', 'favicon']) ]); ?>
+
+ 1, + 'help' => 'Sélectionnez une icône adaptée à un thème sombre.
Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', + 'label' => 'Favicon thème sombre', + 'value' => $this->getData(['config', 'faviconDark']) + ]); ?> +
'Articles par page', diff --git a/core/vendor/zwiico/ico/faviconDark.ico b/core/vendor/zwiico/ico/faviconDark.ico new file mode 100644 index 0000000000000000000000000000000000000000..2063f4bf0645d587b0f8d9310f00a0ee09a53310 GIT binary patch literal 1150 zcmb7^F-pWx6h#vhL_|oVtz#hyVqq;VK&BK|V4)xuEKWpmm2-JNr0)TI9&!)9C%I?j%m0J_ G?tcNUhJ;N3 literal 0 HcmV?d00001 diff --git a/sitemap.xml.gz b/sitemap.xml.gz index de91fda42a4c4a323b4b6a1d5d2ac67d5329e786..8eae1a36c43ad0c81dcc9b919acf616dc5611f70 100644 GIT binary patch literal 382 zcmV-^0fGJ>iwFP!000003$&EaPlGTV#qawokn2+VV@njm*ulipcG^sgw_3ikCZ%24 zBE-Mm!sfx4>868lXxjJQC%l&C%dS?@8(1feUc@vZaRgeJQtE0EKW-n;UA!zN`3*u* z1sW{(P@-PS2qTD4MA(+58J&f9N@zwx07AjhSmnS+Azr(zb8->yyx(USw{4rWv&7g6 zGeRhSTCX-@2Q^1hJI}R%_~82DaMB0K-VHuC=p8;zVv?l6<79SNSQ)|n@I4ma&XsX7IT_ivROHHt;us!=Twxe!amVDX!>kcNKw$o-}ydnMCkx*EG z+Qz?L+RcNB(@oc&2)y?`;X%okZ6$*@Fji=_2x&yZ02J4SP~{?g+&-YYaG8&?8-#)q z6d2~9K%F!uG(j{*bhf3lbQ-7A`Iyj@_yB~wqc+ll3w*q?X=}wI+&Q;TF>abBYHlNK zN*ohH@zZ*>;X9}p63RNJID`k+7l#$jOZK++*