-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
84 lines (84 loc) · 2.92 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hex Clock</title>
<meta name="description" content="Hex Clock is a precise hexadecimal color clock that goes the whole 24 hours color range, from #000000 to #235959." />
<meta name="keywords" content="hex clock, hexadecimal clock, 24 hour color range clock" />
<meta name="author" content="Enclave Games" />
<link rel="shortcut icon" href="favicon.png" />
<meta name="viewport" content="width=device-width, user-scalable=yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta property="og:image" content="http://hexclock.enclavegames.com/icons/hexclockicon.png" />
<style>
#background {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
position: absolute;
vertical-align: middle;
}
@font-face {
font-family: 'Fira Mono';
src: url('fonts/FiraMono-Regular.eot');
src: local('Fira Mono'),
url('fonts/FiraMono-Regular.eot') format('embedded-opentype'),
url('fonts/FiraMono-Regular.woff') format('woff'),
url('fonts/FiraMono-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}
#hex {
color: #eee;
font-family: 'Fira Mono', Helvetica, Arial, sans-serif;
text-align: center;
font-size: 5em;
font-size: 10vw;
display: block;
min-width: 200px;
font-weight: 400;
text-shadow: 2px 2px 2px #111;
}
header {
margin: auto;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
-moz-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
-o-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
img {
display: none;
}
</style>
</head>
<body id="background">
<header><h1 id="hex">Hex Clock</h1></header>
<img src="http://hexclock.enclavegames.com/icons/hexclockicon.png" alt="Hex Clock" />
<script>
function tick() {
var date = new Date();
var hours = ((date.getHours() < 10) ? '0' : '') + date.getHours();
var minutes = ((date.getMinutes() < 10) ? '0' : '') + date.getMinutes();
var seconds = ((date.getSeconds() < 10) ? '0' : '') + date.getSeconds();
var color = '#' + hours + minutes + seconds;
document.getElementById("background").style.backgroundColor = color;
document.getElementById("hex").innerHTML = color;
setTimeout(tick, 1000);
}
tick();
</script>
<script>
(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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-30485283-11', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>