-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
143 lines (107 loc) · 4.21 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>联合早报成语填字</title>
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
<meta name="viewport"
content="width=device-width,user-scalable=no,initial-scale=1,minimum-scale=1,maximum-scale=1,minimal-ui=true,viewport-fit=cover" />
<!--https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
<!-- force webkit on 360 -->
<meta name="renderer" content="webkit" />
<meta name="force-rendering" content="webkit" />
<!-- force edge on IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="msapplication-tap-highlight" content="no">
<!-- force full screen on some browser -->
<meta name="full-screen" content="yes" />
<meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" />
<!--fix fireball/issues/3568 -->
<!--<meta name="browsermode" content="application">-->
<meta name="x5-page-mode" content="app">
<!--<link rel="apple-touch-icon" href=".png" />-->
<!--<link rel="apple-touch-icon-precomposed" href=".png" />-->
<link rel="icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="style.0881f.css" />
</head>
<body>
<div id="GameDiv">
<div id="Cocos3dGameContainer">
<canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="99"></canvas>
</div>
</div>
<div id="splash">
<div class="progress-bar stripes">
<span style="width: 0%"></span>
</div>
</div>
<script src="share.js" charset="utf-8"> </script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LMCHCW0E1G"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
// https://www.analyticsmania.com/post/get-google-analytics-client-id/
function get_ga_clientid() {
var cookie = {};
document.cookie.split(';').forEach(function (el) {
var splitCookie = el.split('=');
var key = splitCookie[0].trim();
var value = splitCookie[1];
cookie[key] = value;
});
return cookie["_ga"].substring(6) + ".";
}
gtag('js', new Date());
gtag('config', 'G-LMCHCW0E1G');
</script>
<!-- Polyfills bundle. -->
<script src="src/polyfills.bundle.5adbf.js" charset="utf-8"> </script>
<!-- SystemJS support. -->
<script src="src/system.bundle.543e6.js" charset="utf-8"> </script>
<!-- Import map -->
<script src="src/import-map.d97b8.json" type="systemjs-importmap" charset="utf-8"> </script>
<script>
System.import('./index.fc62c.js').catch(function(err) { console.error(err); })
</script>
<script type="text/javascript">
(function () {
var splash = document.getElementById('splash');
splash.style.display = 'block';
const bodyWidth = document.body.clientWidth;
const bodyHeight = document.body.clientHeight;
console.log("ratio:", bodyHeight / bodyWidth);
if (bodyHeight / bodyWidth >= 1.7) {
console.log("fit");
splash.style.position = "absolute";
splash.style.left = "0";
splash.style.top = "0";
splash.style.width = "100%";
splash.style.height = "100%";
splash.style.background = "#171717 url(./splash.jpg) no-repeat center";
splash.style.backgroundSize = "100% 100%";
splash.style.backgroundColor = "white";
} else {
console.log("no fit");
var w = bodyHeight / 1.78;
var ratio = 100 * w / bodyWidth;
splash.style.position = "absolute";
splash.style.margin = "0 auto";
splash.style.top = "0";
splash.style.left = ((100 - ratio) / 2) + "%";
splash.style.width = ratio + "%";
splash.style.height = "100%";
splash.style.background = "#171717 url(./splash.jpg) no-repeat center";
splash.style.backgroundSize = "100% 100%";
splash.style.backgroundColor = "white";
}
})();
</script>
</body>
</html>