-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
98 lines (90 loc) · 2.91 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" type="image/png" href="./pizza-favicon.png">
<title>Pizza @ LUG?</title>
<style>
body {
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
margin: 0px;
}
.splash {
text-align: center;
/* vertical-align: middle; */
min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.splash h1 {
margin-top: 10px;
margin-bottom: 10px;
font-size: 25vw;
font-family: monospace;
}
.splash p {
font-family: monospace;
font-size: 2vw;
margin: 0px;
}
.splash a {
color: #3a3a3a;
}
</style>
<script>
(function() {
"use strict";
var text = {
true: {
big: "YES",
detail: "Why aren't you there <b>right now</b>?",
color: "#59cc63",
},
false: {
big: "NO",
detail: "There is no pizza this week,<br/>but you should show up anyway!",
color: "#bf2d2d",
},
};
var pizza_this_week = function() {
var week_ms = 1000 * 60 * 60 * 24 * 7;
var magic = 1476322937348;
var now = Date.now();
var weeks_since = (now - magic) / week_ms;
var is_odd_week = (Math.floor(weeks_since) % 2) !== 1;
return is_odd_week;
};
window.onload = function() {
var big = document.getElementsByClassName("answer")[0];
var detail = document.getElementsByClassName("description")[0];
var isPizza = pizza_this_week();
big.innerHTML = text[isPizza].big;
detail.innerHTML = text[isPizza].detail;
document.body.style.backgroundColor = text[isPizza].color;
};
})();
</script>
</head>
<body>
<div class="splash">
<h1 class="answer"></h1>
<p class="description"></p>
<p class="ad">
<br/>
<a href="http://lugatgt.org/">Mondays @ 6:30 PM in CCB 347</a>
<!-- TODO Add back the installfest indicator -->
<!-- <a href="http://lugatgt.org/installfests/">Installfest October 1</a>! -->
<br/>
<br/>
</p>
<br/>
<br/>
</div>
</body>
</html>