-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
129 lines (106 loc) · 3.83 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#101010" />
<meta
name="description"
content="SRS kanji learning application for WaniKani users."
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
<link rel="dns-prefetch" href="https://fonts.gstatic.com">
<link rel="preconnect" crossorigin="anonymous" href="https://fonts.googleapis.com">
<link rel="preconnect" crossorigin="anonymous" href="https://fonts.gstatic.com">
<link rel="stylesheet" crossorigin="anonymous" href="https://fonts.googleapis.com/css?family=Noto+Sans+JP:400,700&display=swap&subset=japanese">
<title>KanjiSchool</title>
<style>
/* Provided to prevent flash-bang on page load */
html, body {
background: #000000;
margin: 0;
}
.wk-preloader {
width: 100%;
height: 100vh;
overflow: hidden;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.85);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
"Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
"Noto Color Emoji";
font-size: 16px;
line-height: 1.5715;
}
.wk-preloader .wk-preloader-spinner {
border: 3px solid transparent;
border-bottom-color: rgba(255, 255, 255, 0.45);
border-radius: 50%;
width: 96px;
height: 96px;
box-sizing: border-box;
animation: wk-preloader-spin 1s linear infinite;
}
.wk-preloader span, .wk-preloader-extra {
margin-top: 16px;
max-width: 350px;
box-sizing: border-box;
}
.wk-preloader-extra {
color: rgba(255, 255, 255, 0.45);
}
/* Preloader light theme */
html.light, html.light body {
background: #f5f5f5;
}
html.light .wk-preloader {
color: rgba(0, 0, 0, 0.85);
}
html.light .wk-preloader .wk-preloader-spinner {
border-bottom-color: rgba(0, 0, 0, 0.15);
}
html.light .wk-preloader-extra {
color: rgba(0, 0, 0, 0.45);
}
@keyframes wk-preloader-spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script>
const theme = localStorage.getItem("kanjiSchoolSettings.siteTheme");
document.documentElement.classList.add(theme || "dark");
document.querySelector("meta[name=theme-color]")
?.setAttribute("content", theme === "light" ? "#f0f0f0" : "#101010");
</script>
<div id="root">
<div class="wk-preloader" id="wk-preloader">
<div class="wk-preloader-spinner"></div>
<span>Loading KanjiSchool...</span>
</div>
</div>
<script>
const msg = "Your web browser is not supported by this application. " +
"Please install a recent version of Google Chrome or Mozilla Firefox."
const isIE = navigator.userAgent.indexOf("MSIE ") !== -1
|| navigator.appVersion.indexOf("Trident/") > 0;
const isLocalhost = window.location.hostname === "localhost"
|| window.location.hostname === "[::1]";
if (isIE && !isLocalhost) {
document.getElementById("wk-preloader").innerText = msg;
alert(msg);
}
</script>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>