|
|
@ -56,7 +56,7 @@ function injectTheme(theme,container="head") { |
|
|
|
} else html_element = document.body; |
|
|
|
let themeOption = document.getElementById("theme-option") |
|
|
|
let link = themeOption ? themeOption : document.createElement("link"); |
|
|
|
url = "/css/theme-options" |
|
|
|
url = `${window.location.pathname}css/theme-options` |
|
|
|
link.type = "text/css"; |
|
|
|
link.rel = "stylesheet"; |
|
|
|
link.href = `${url}/${themeLower}.css`; |
|
|
@ -145,7 +145,7 @@ function fadeOutIn(speed) { |
|
|
|
} |
|
|
|
|
|
|
|
function updateMetaThemeColor() { |
|
|
|
fetch(`/css/theme-options/${Object.keys(themeOptions)[currentIndex].toLowerCase()}.css`) |
|
|
|
fetch(`${window.location.pathname}css/theme-options/${Object.keys(themeOptions)[currentIndex].toLowerCase()}.css`) |
|
|
|
.then(response => response.text()) |
|
|
|
.then(text => { |
|
|
|
let re = text.match("--accent-color:.*;")[0] |
|
|
|