From 380fccc62982d7070acb61886c6adf357e8e4c5c Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 15 May 2021 21:00:40 +0200 Subject: Separate script file --- content/script.js | 5 +++++ templates/base.html | 9 ++------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 content/script.js diff --git a/content/script.js b/content/script.js new file mode 100644 index 0000000..649da9e --- /dev/null +++ b/content/script.js @@ -0,0 +1,5 @@ +const lightTheme = localStorage.getItem("light"); + +if (lightTheme === "true") { + document.documentElement.classList.add("t-light"); +} diff --git a/templates/base.html b/templates/base.html index 3a1502b..6006211 100644 --- a/templates/base.html +++ b/templates/base.html @@ -28,16 +28,11 @@ + - + -- cgit v1.2.3-70-g09d2