-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
39 lines (38 loc) · 1.24 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
<!DOCTYPE html>
<html lang="en" class="borderbox">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Demo</title>
<script type="text/javascript" src="https://mat1.gtimg.com/qqcdn/tnewsh5/short-term/cchao/p2.js"></script>
<script type="text/javascript" src="https://mat1.gtimg.com/qqcdn/tnewsh5/short-term/cchao/bump.js"></script>
<style>
.pageLoading {
display: none;
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-size: cover;
}
</style>
</head>
<body>
<div id="app"></div>
<!-- <div class="pageLoading"></div> -->
<script type="module" src="/src/main.ts"></script>
</body>
</html>
<script>
const scale = window.innerWidth / 750;
const metaEl = document.createElement('meta');
metaEl.setAttribute('name', 'viewport');
metaEl.setAttribute(
'content',
`width=device-width,initial-scale=${scale},maximum-scale=${scale},minimum-scale=${scale}, user-scalable=no`,
);
const firstElementChildEl = document.documentElement.firstElementChild;
firstElementChildEl?.appendChild(metaEl);
document.querySelector('.pageLoading').style = 'display: block';
</script>