-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
175 lines (175 loc) · 6.62 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html manifest='cache.manifest'>
<head>
<meta charset='UTF-8'>
<meta content='index,follow,archive' name='robots'>
<meta content='時間によって作成されたカラーコードから背景色が変化します!What color is it を作り直してみました。' name='description'>
<meta content='2001Y' name='author'>
<meta content='Copyright © 2017 2001Y All Rights Reserved.' name='copyright'>
<meta content='width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0' name='viewport'>
<meta content='yes' name='apple-mobile-web-app-capable'>
<meta content='yes' name='mobile-web-app-capable'>
<meta content='black-translucent' name='apple-mobile-web-app-status-bar-style'>
<meta content='What color is it ?' name='apple-mobile-web-app-title'>
<meta content='604800' http-equiv='expires'>
<meta content='telephone=no,address=no,email=no' name='format-detection'>
<meta href='//plus.google.com/+2001Y' property='article:publisher'>
<meta href='//twitter.com/Y20010920T' property='article:publisher'>
<meta href='//line.me/ti/p/@ovx8986w' property='article:publisher'>
<meta href='//youtube.com/channel/UCud0Fw7VvVtHbLlbXVi3WgQ' property='article:publisher'>
<link href='https://2001y.github.io/what-color-is-it' rel='canonical'>
<link href='//plus.google.com/+2001Y' rel='publisher'>
<link href='//twitter.com/Y20010920T' rel='publisher'>
<link href='//line.me/ti/p/@ovx8986w' rel='publisher'>
<link href='//youtube.com/channel/UCud0Fw7VvVtHbLlbXVi3WgQ' rel='publisher'>
<meta href='' property='fb:admins'>
<meta href='' property='fb:app_id'>
<meta content='@Y20010920T' name='twitter:site'>
<meta content='@Y20010920T' property='twitter:account_id'>
<meta content='website' property='og:type'>
<meta content='summary' name='twitter:card'>
<meta content='時間によって作成されたカラーコードから背景色が変化します!What color is it を作り直してみました。' name='twitter:description'>
<meta content='時間によって作成されたカラーコードから背景色が変化します!What color is it を作り直してみました。' property='og:description'>
<meta content='What color is it ? by2001Y' name='twitter:title'>
<meta content='What color is it ? by2001Y' property='og:site_name'>
<meta content='https://2001y.github.io/what-color-is-it' name='twitter:url'>
<meta content='https://2001y.github.io/what-color-is-it' property='og:url'>
<meta content='on' http-equiv='cleartype'>
<link href='favicon.svg' rel='icon' type='image/svg+xml'>
<link href='favicon.ico' rel='icon' type='image/x-icon'>
<link href='apple-touch-icon.png' rel='apple-touch-icon'>
<link href='manifest.json' rel='manifest'>
<link href='safari-pinned-tab.svg' color='#010920' rel='mask-icon'>
<meta content='mstile-144x144.png' name='msapplication-TileImage'>
<meta content='#010920' name='msapplication-TileColor'>
<meta content='#010920' name='theme-color'>
<meta content='notranslate' name='google'>
<title>What color is it ? by2001Y</title>
<!--[if lt IE 9]>
<script src='//cdn.jsdelivr.net/g/html5shiv@3.7.3,ie7.js@2.1b4(IE9.js),respond@1.4.2'></script>
<![endif]-->
</head>
<style>
html, body, div, section {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
}
section {
display: block;
}
html,body {
width: 100%;
height: 100%;
}
body {
font-family: 'SFNSText','Helvetica Neue','Rounded Mplus 1c',sans-serif;
font-weight: 100;
color: white;
background: #010920;
overflow: hidden;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-transition: .3s;
-o-transition: .3s;
transition: .3s;
-webkit-font-smoothing: antialiased;
}
div {
text-align: center;
}
a {
-webkit-touch-callout:none;
-webkit-tap-highlight-color:(0,0,0,0);
}
#clock {
font-size: 90px;
}
#color {
font-size: 30px;
}
@media screen and (max-width: 479px) and (orientation: portrait) {
body {
-webkit-transform:rotate(-90deg);
-ms-transform:rotate(-90deg);
transform:rotate(-90deg);
}
}
.sticky {
position: -webkit-sticky;
position: sticky;
top: 0;
}
.sticky:before,.sticky:after {
content: '';
display: table;
}
</style>
<script>
function regulate(num) {
let ret;
if (num < 10) {
ret = '0' + num;
} else {
ret = num;
}
return ret;
}
function clock() {
let time = new Date();
let hour = regulate(time.getHours());
let min = regulate(time.getMinutes());
let sec = regulate(time.getSeconds());
let color = '#' + hour + min + sec;
document.getElementById('clock').innerHTML = hour + ':' + min + ':' + sec;
document.getElementById('color').innerHTML = color;
document.body.style.backgroundColor = color;
}
</script>
<body>
<section>
<div id='clock'>JavaScriptが無効</div>
<div id='color'>JavaScriptを有効にしてください。</div>
</section>
</body>
<style>
@font-face {
font-family: 'Rounded Mplus 1c';
font-style: normal;
font-weight: 100;
src: url(//fonts.gstatic.com/ea/roundedmplus1c/v1/RoundedMplus1c-Thin.eot);
src: url(//fonts.gstatic.com/ea/roundedmplus1c/v1/RoundedMplus1c-Thin.eot?#iefix) format('embedded-opentype'), url(//fonts.gstatic.com/ea/roundedmplus1c/v1/RoundedMplus1c-Thin.woff2) format('woff2'), url(//fonts.gstatic.com/ea/roundedmplus1c/v1/RoundedMplus1c-Thin.woff) format('woff'), url(//fonts.gstatic.com/ea/roundedmplus1c/v1/RoundedMplus1c-Thin.ttf) format('truetype');
}
</style>
<script>
setInterval('clock()', 1000);
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create', 'UA-68964193-12', 'auto');ga('send', 'pageview');
window.addEventListener('touchmove', function(event) {
event.preventDefault();
});
window.addEventListener('load', function(e) {
window.applicationCache.addEventListener('updateready', function(e) {
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
window.applicationCache.swapCache();
if (confirm('アプリケーションキャッシュを更新しました。リロードしますか?')) {
window.location.reload();
}
} else {
}
}, false);
}, false);
</script>
</html>