-
Notifications
You must be signed in to change notification settings - Fork 127
/
map.html
143 lines (133 loc) · 4.1 KB
/
map.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>
<title>WaffleJS · Map</title>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">
<meta name="viewport" content="initial-scale=1,user-scalable=no" />
<style>
body {
padding: 0;
margin: 0;
background-color: black;
}
.map {
width: 100vw;
height: 83.5vw;
position: relative;
background: url("/images/map.png") no-repeat center;
background-size: 100% 100%;
}
.map .marker:before {
position: absolute;
content: '';
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: center;
}
.map .marker:after {
position: absolute;
font: 3vw 'Roboto', sans-serif;
color: white;
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, .6);
text-align: center;
margin-top: 11vw;
width: 30vw;
margin-left: -15vw;
}
.map .marker.barn:before {
background-image: radial-gradient(circle at 46% 46%,
hsla(0, 0%, 0%, .1) 10vw,
hsla(0, 0%, 0%, .6) 0);
}
.map .marker.barn:after {
content: 'You are here';
left: 46%;
top: 46%;
}
.map .marker.restrooms:before {
background-image: radial-gradient(circle at 86% 49%,
hsla(0, 0%, 0%, .1) 10vw,
hsla(0, 0%, 0%, .6) 0);
}
.map .marker.restrooms:after {
content: 'Drank too much refreshment?';
left: 86%;
top: 49%;
}
.map .marker.drinks:before {
background-image: radial-gradient(circle at 77% 37%,
hsla(0, 0%, 0%, .1) 10vw,
hsla(0, 0%, 0%, .6) 0);
}
.map .marker.drinks:after {
content: 'Get a refreshment';
left: 77%;
top: 37%;
}
.map .marker.food:before {
background-image: radial-gradient(circle at 56% 27%,
hsla(0, 0%, 0%, .1) 9vw,
hsla(0, 0%, 0%, .6) 0);
}
.map .marker.food:after {
content: 'Grab some food!';
margin-top: 10vw;
left: 56%;
top: 27%;
}
.map .marker.more-food:before {
background-image: radial-gradient(circle at 33% 70%,
hsla(0, 0%, 0%, .1) 9vw,
hsla(0, 0%, 0%, .6) 0);
}
.map .marker.more-food:after {
content: 'OMG more food!';
margin-top: 10vw;
left: 33%;
top: 70%;
}
.map .marker.games:before {
background-image: radial-gradient(circle at 36% 48%,
hsla(0, 0%, 0%, .1) 4vw,
hsla(0, 0%, 0%, .6) 0);
}
.map .marker.games:after {
content: 'Games on your table';
margin-top: 5vw;
left: 36%;
top: 48%;
}
.map .marker.karaoke:before {
background-image: radial-gradient(circle at 53% 48%,
hsla(0, 0%, 0%, .1) 5vw,
hsla(0, 0%, 0%, .6) 0);
}
.map .marker.karaoke:after {
content: 'Karaoke afterwards at Butter';
margin-top: 6vw;
left: 53%;
top: 48%;
}
</style>
</head>
<body>
<div class="map">
<div class="marker barn"></div>
</div>
<script>
(function() {
var i = -1;
var places = ['barn', 'drinks', 'restrooms', 'food', 'more-food',
'games', 'karaoke'];
var marker = document.querySelector('.marker');
(function loop() {
marker.classList.remove(places[i]);
i = (i + 1) % places.length;
marker.classList.add(places[i]);
setTimeout(loop, 8888);
})();
})();
</script>
</body>
</html>