forked from Acode-Foundation/Acode
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathindex.html
More file actions
126 lines (100 loc) · 2.96 KB
/
index.html
File metadata and controls
126 lines (100 loc) · 2.96 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<style>
html,
body {
margin: 0;
background-color: #20202c; /* fallback dark */
}
:root {
--bg-color: #20202c; /* fallback splash color */
--test-height: 45px;
}
body.loading {
position: relative;
}
body.loading #splash {
display: block;
}
#splash {
display: none;
position: fixed;
inset: 0;
z-index: 999999;
background-image: url("./logo.svg");
background-position: center;
background-repeat: no-repeat;
background-size: 180px;
background-color: var(--bg-color);
text-align: center;
/* Disable any possible fade */
animation: none !important;
transition: none !important;
}
.splash-version {
position: absolute;
top: 15px;
left: 15px;
color: rgb(209, 209, 209);
font-size: 0.8rem;
white-space: pre;
font-family: monospace;
text-align: left;
}
.splash-message {
position: absolute;
bottom: 15px;
left: 50%;
transform: translateX(-50%);
color: rgb(209, 209, 209);
font-size: 1rem;
width: 90vw;
text-align: center;
}
</style>
<!-- Set theme color BEFORE UI renders -->
<script>
(function () {
var color = localStorage.getItem("__primary_color");
var bg = color || "#20202c";
document.documentElement.style.setProperty("--bg-color", bg);
document.documentElement.style.backgroundColor = bg;
document.body && (document.body.style.backgroundColor = bg);
})();
</script>
<!-- Core Scripts -->
<script src="cordova.js"></script>
<script src="./build/main.js"></script>
<link rel="stylesheet" href="./build/main.css" />
<title>Acode</title>
</head>
<body class="loading" data-version="" data-small-msg="">
<div id="splash">
<div class="splash-version"></div>
<div class="splash-message"></div>
</div>
<wc-page id="root" class="primary"></wc-page>
<script>
document.addEventListener("DOMContentLoaded", function () {
const splash = document.getElementById("splash");
function updateSplash() {
splash.querySelector(".splash-version").textContent =
document.body.getAttribute("data-version") || "";
splash.querySelector(".splash-message").textContent =
document.body.getAttribute("data-small-msg") || "";
}
updateSplash();
new MutationObserver(updateSplash).observe(document.body, {
attributes: true,
attributeFilter: ["data-version", "data-small-msg"],
});
});
</script>
</body>
</html>