-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.html
40 lines (38 loc) · 1.49 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> <title>Vue douban</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<script>
(function() {
var baseFontSize = 50;
var baseWidth = 320;
var clientWidth = document.documentElement.clientWidth || window.innerWidth;
var innerWidth = Math.max(Math.min(clientWidth, 480), 320);
var rem = 50;
if (innerWidth > 362 && innerWidth <= 375) {
rem = Math.floor(innerWidth / baseWidth * baseFontSize * 0.9);
}
if (innerWidth > 375) {
rem = Math.floor(innerWidth / baseWidth * baseFontSize * 0.84);
}
window.__baseREM = rem;
document.querySelector('html').style.fontSize = rem + 'px';
}());
</script>
<link rel="stylesheet" href="/dist/style.css">
</head>
<body>
<div id="app" class="app">
<nv-head></nv-head>
<div id="main" class="main">
<router-view></router-view>
</div>
</div>
<script src="/dist/common.js"></script>
<script src="/dist/build.js"></script>
</body>
</html>