Favicon url absolues
This commit is contained in:
parent
ccc599e2db
commit
acffb58116
|
@ -1593,8 +1593,6 @@ class common {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Affiche le favicon
|
||||
*/
|
||||
|
@ -1604,21 +1602,20 @@ class common {
|
|||
if($favicon &&
|
||||
file_exists(self::FILE_DIR.'source/' . $favicon)
|
||||
) {
|
||||
echo '<link rel="icon" media="(prefers-color-scheme:light)" href="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $favicon . '">';
|
||||
echo '<link rel="icon" media="(prefers-color-scheme:light)" href="' . self::FILE_DIR.'source/' . $favicon . '">';
|
||||
} else {
|
||||
echo '<link rel="icon" media="(prefers-color-scheme:light)" href="' . helper::baseUrl(false) . 'core/vendor/zwiico/ico/favicon.ico">';
|
||||
echo '<link rel="icon" media="(prefers-color-scheme:light)" href="core/vendor/zwiico/ico/favicon.ico">';
|
||||
}
|
||||
// Dark scheme
|
||||
$faviconDark = $this->getData(['config', 'faviconDark']);
|
||||
if(!empty($faviconDark) &&
|
||||
file_exists(self::FILE_DIR.'source/' . $faviconDark)
|
||||
) {
|
||||
echo '<link rel="icon" media="(prefers-color-scheme:dark)" href="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $faviconDark . '">';
|
||||
echo '<script src="' . helper::baseUrl(false) . 'core/vendor/favicon-switcher/favicon-switcher.js" crossorigin="anonymous"></script>';
|
||||
echo '<link rel="icon" media="(prefers-color-scheme:dark)" href="' . self::FILE_DIR.'source/' . $faviconDark . '">';
|
||||
echo '<script src="core/vendor/favicon-switcher/favicon-switcher.js" crossorigin="anonymous"></script>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Affiche le menu
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue