made css path absolute in Javascript

This commit is contained in:
Phuntsok Drak-pa 2019-09-23 14:25:36 +02:00
parent 36cd932eef
commit 6fc2cd5409

View File

@ -41,7 +41,7 @@ function create_theme_switcher() {
var light = isThemeLight(); var light = isThemeLight();
$('body').append('<div class="themeBtn"><i class="fas fa-' $('body').append('<div class="themeBtn"><i class="fas fa-'
.concat(light ? 'moon' : 'sun').concat('"></i></div>')); .concat(light ? 'moon' : 'sun').concat('"></i></div>'));
$('head').append('<link id="theme" rel="stylesheet" href="./css/' $('head').append('<link id="theme" rel="stylesheet" href="https://langue.phundrak.fr/css/'
.concat(light ? 'light' : 'dark').concat('.css">')); .concat(light ? 'light' : 'dark').concat('.css">'));
// switch CSS files and button icon, set new cookie on theme switcher click // switch CSS files and button icon, set new cookie on theme switcher click