-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
45 lines (45 loc) · 1.6 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
<!DOCTYPE html>
<html lang="en" style="font-size: 1px; height: 100%">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/icon.svg" />
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#1976d2" />
<!-- 指定桌面 icon -->
<link
rel="apple-touch-icon"
href="/static/img/apple-touch-icon-152x152.png"
/>
<!-- 指定应用名称 -->
<meta name="apple-mobile-web-app-title" content="PWA Lesson" />
<!-- 是否隐藏 Safari 地址栏等-->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!--修改 iOS 状态栏颜色 -->
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<title>Ninth Art</title>
</head>
<body style="font-size: 14px; height: 100%">
<!-- <script src="https://dt-static.s3.cn-east-2.jdcloud-oss.com/static/eruda.js"></script>
<script>
eruda.init();
</script> -->
<div id="root" style="height: 100%"></div>
<script>
var DESIGN_WIDTH = 750;
function relativeRatio() {
return Math.min(Number((window.innerWidth / DESIGN_WIDTH) * 1), 1.5);
}
function setRootFontSize() {
var fontSize = relativeRatio() + "px";
document.querySelector("html").style.fontSize = fontSize;
}
setRootFontSize();
window.addEventListener("resize", setRootFontSize);
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>