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

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2019-08-21 23:01:02 +0300
committerDillon <dillonzq@outlook.com>2019-08-21 23:01:02 +0300
commit07883308192c47f432c04eac4ad54ea05e6a8e85 (patch)
treebec2cfbdf717b6ba6a39f6a4a26335982aee7a0c /layouts/_default/baseof.html
parenta46456ef0ae2480bfd0b6de6aa86f874e6e5ac06 (diff)
fix: fix screen-splash bug under dark theme and orientationchange bug
Diffstat (limited to 'layouts/_default/baseof.html')
-rw-r--r--layouts/_default/baseof.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index bdbdc61..3a60625 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -6,7 +6,11 @@
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
{{ partial "head.html" . }}
</head>
- <body class="">
+ <body>
+ <script>
+ var isDark = (window.localStorage && window.localStorage.getItem('theme')) === 'dark';
+ if (isDark) document.body.classList.add('dark-theme');
+ </script>
<div class="wrapper">
{{ partial "header.html" . }}
<main class="main">