-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
35 lines (32 loc) · 894 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" />
<title>Vue Boilerplate</title>
</head>
<style>
.bg-dark {
background: #151d32 !important;
}
.bg-light {
background: #f0f2f5 !important;
}
</style>
<body>
<div id="app"></div>
<script type="module" src="./src/main.js"></script>
</body>
</html>
<script>
const themeStore = localStorage.getItem('global-application')
const htmlElement = document.documentElement
if (themeStore) {
const theme = JSON.parse(themeStore).currentTheme
htmlElement.classList.add(theme === 'light' ? 'bg-light' : 'bg-dark')
}
// Fallback
htmlElement.classList.add('bg-dark')
</script>