fix: fix screen-splash bug under dark theme and orientationchange bug

This commit is contained in:
Dillon
2019-08-22 04:01:02 +08:00
parent a46456ef0a
commit 0788330819
3 changed files with 79 additions and 73 deletions

View File

@@ -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">