[10.0.040.dev] favicone

This commit is contained in:
fredtempez 2020-03-01 18:11:04 +01:00
parent 36afbfcdc0
commit 0d836021a5
2 changed files with 4 additions and 6 deletions

View File

@ -33,7 +33,7 @@ class common {
const TEMP_DIR = 'site/tmp/';
// Numéro de version
const ZWII_VERSION = '10.0.039.dev';
const ZWII_VERSION = '10.0.040.dev';
const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = [];
@ -1857,15 +1857,13 @@ class layout extends common {
echo '<link rel="shortcut icon" media="(prefers-color-scheme:light)" href="' . helper::baseUrl(false) . 'core/vendor/zwiico/ico/favicon.ico">';
}
// Dark scheme
$faviconDark = $this->getData(['config', 'faviconDark']);
if($faviconDark &&
$faviconDark = $this->getData(['config', 'faviconDark']);
if(!empty($faviconDark) &&
file_exists(self::FILE_DIR.'source/' . $faviconDark)
) {
echo '<link rel="shortcut icon" media="(prefers-color-scheme:dark)" href="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $faviconDark . '">';
echo '<script src="https://unpkg.com/favicon-switcher@1.2.0/dist/index.js" crossorigin="anonymous" type="application/javascript"></script>';
} else {
echo '<link rel="shortcut icon" media="(prefers-color-scheme:dark)" href="' . helper::baseUrl(false) . 'core/vendor/zwiico/ico/faviconDark.ico">';
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB