Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/darshanbaral/aafu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2019-07-21 00:58:45 +0300
committerDarshan Baral <darshanbaral@gmail.com>2019-07-21 00:58:45 +0300
commit39a480d068b05ad2fa8ed62ba49a085d59be151f (patch)
tree79f64370ae906e6f41d9ce0cb551d5b2e6faa892
parent7a14f4e0eb4d001f2e11fdc0914a9f74ef311f01 (diff)
Add period before CSS filepath
-rw-r--r--layouts/partials/toggleTheme.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/partials/toggleTheme.html b/layouts/partials/toggleTheme.html
index 912c9d7..f71cfee 100644
--- a/layouts/partials/toggleTheme.html
+++ b/layouts/partials/toggleTheme.html
@@ -10,17 +10,19 @@
<script>
const mainTheme =
- "{{ print `/css/aafu_` .Site.Params.theme.mainTheme `.css` | absURL }}";
+ "{{ print (`/css/aafu_` | relURL) .Site.Params.theme.mainTheme `.css` }}";
const altTheme =
- "{{ print `/css/aafu_` .Site.Params.theme.altTheme `.css` | absURL }}";
+ "{{ print (`/css/aafu_` | relURL) .Site.Params.theme.altTheme `.css` }}";
const currentCSS = document.querySelector("#color-CSS");
function toggleTheme(elem) {
+ //console.log("." + mainTheme);
+ //console.log(altTheme);
elem.classList.toggle("fa-toggle-off");
elem.classList.toggle("fa-toggle-on");
if (currentCSS.href.includes(mainTheme)) {
- currentCSS.setAttribute("href", altTheme);
+ currentCSS.setAttribute("href", "." + altTheme);
} else {
- currentCSS.setAttribute("href", mainTheme);
+ currentCSS.setAttribute("href", "." + mainTheme);
}
}