From 9590408c7cd3f7b0f94799727ec303c76b1fd349 Mon Sep 17 00:00:00 2001 From: Phuntsok Drak-pa Date: Sun, 25 Aug 2019 05:20:06 +0200 Subject: [PATCH] fixes for themes and header links --- headers/head-lvl0.org | 2 -- headers/head-lvl1.org | 8 +++----- js/main.js | 9 +++++---- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/headers/head-lvl0.org b/headers/head-lvl0.org index c0b92a0..f78ad60 100644 --- a/headers/head-lvl0.org +++ b/headers/head-lvl0.org @@ -5,8 +5,6 @@ #+HTML_HEAD: #+HTML_HEAD: -#+HTML_HEAD: -# #+HTML_HEAD: #+HTML_HEAD: #+HTML_HEAD: diff --git a/headers/head-lvl1.org b/headers/head-lvl1.org index 1f51889..10756da 100644 --- a/headers/head-lvl1.org +++ b/headers/head-lvl1.org @@ -3,10 +3,8 @@ # ### STYLE #################################################################### -#+HTML_HEAD: -#+HTML_HEAD: +#+HTML_HEAD: +#+HTML_HEAD: #+HTML_HEAD: -#+HTML_HEAD: -#+HTML_HEAD: -#+HTML_HEAD: +#+HTML_HEAD: diff --git a/js/main.js b/js/main.js index 82a0f96..98119d8 100644 --- a/js/main.js +++ b/js/main.js @@ -50,11 +50,12 @@ function create_theme_switcher() { } // set the css and button depending on the cookie found, dark is default - if (Cookies.get('theme') == 'dark') { - $('body').append('
'); - } else { + if (Cookies.get('theme') == 'light') { $('body').append('
'); - $('link[href="./css/dark.css"]').attr('href', './css/light.css'); + $('head').append(''); + } else { + $('body').append('
'); + $('head').append(''); } // switch CSS files and button icon, set new cookie