-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
391 lines (327 loc) · 9.96 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
---
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Casual ARMS</title>
{% include meta_tags.html %}
<link rel="stylesheet" href="/assets/style.css">
<script src="/script/general.js"></script>
<script src="/script/arms-data.js"></script>
<script src="/data/support.js"></script>
<script>
function load()
{
// Add random trivia
var PRNG = Math.seed(Math.random()*10000);
$("random-fact").innerHTML = generateQuestion(PRNG).trivia;
// Display last tournament winner
var images = { "clash" : "/assets/main/logo-champion.png", "scramble" : "/assets/main/logo-sovereign.png", "cookoff" : "/assets/main/logo-cookoff.png" };
var titles = { "clash" : "Clash Champion", "scramble" : "Scramble Sovereign", "cookoff" : "Cookoff Champion" };
var names = { "clash" : "Casual Clash", "scramble" : "Casual Scramble", "cookoff" : "Casual Cookoff" };
var entry = tournamentsLog[tournamentsLog.length - 1];
var ordinal = tournamentsLog.filter(function(item) { return item.type == entry.type; }).length;
var challongeURL = "https://challonge.com/" + (names[entry.type] + " " + ordinal).replace(/\s/g, "");
if (entry.type == "cookoff") challongeURL = "cookoff";
$("champ-name").innerHTML = entry.winner[0].name;
$("champ-title").innerHTML = titles[entry.type];
$("champ-img").src = images[entry.type];
$("champ-name").href = challongeURL;
$("champ-url").href = challongeURL;
// Discord widget display
fetchJSON("https://discordapp.com/api/guilds/396373087278465038/widget.json", function(discordData)
{
$("footer-discord-text").innerHTML = "<span id='discord-number'>" + discordData.members.length + "</span> members online on <u>Discord</u>";
});
}
function checkKey(e)
{
e = e || window.event;
if (e.keyCode == '13')
document.location.href = document.activeElement.childNodes[1].href;
}
document.onkeydown = checkKey;
// function goScramble(e)
// {
// document.location.href = 'scramble/';
// e.preventDefault();
// }
</script>
<style type="text/css">
.menu-item {
overflow: hidden;
position: relative;
}
.menu-item a {
z-index: 1;
}
.menu-item > img {
position: absolute;
z-index: 0;
opacity: 0;
}
.menu-item:hover > img {
opacity: 0.5;
}
#container.main-menu {
padding-bottom: 0;
}
.main-menu h3 {
font-size: 1em;
margin-top: -0.6em;
margin-bottom: 0.4em;
opacity: 0.6;
text-align: right;
padding-right: 1em;
border-bottom: 1pt dotted rgba(0, 0, 0, 0.5);
}
#logo, #shield {
position: absolute;
top: 12%;
width: 18%;
z-index: 0;
}
#logo {
right: 4%;
opacity: 0.15;
}
#shield {
left: 4%;
opacity: 0.08;
}
#arms-text {
position: absolute;
top: -120pt;
left: -90pt;
color: black;
opacity: 0.03;
font-size: 490pt;
font-family: 'ARMS';
z-index: -1;
}
#m-discord > img { width: 2.0em; left: 25pt; top: 10pt; }
#m-twitter > img { width: 3.0em; left: 25pt; top: 5pt; }
#m-lobby > img { width: 3.2em; left: 30pt; top: -5pt; }
#m-leaderboards > img { width: 3.3em; left: 30pt; top: 0pt; }
#m-quiz > img { width: 2.9em; left: 40pt; top: -10pt; }
#m-clash > img { width: 3.5em; left: 30pt; top: 5pt; }
#m-screenshot > img { width: 3.0em; left: 30pt; top: 5pt; }
@keyframes pulse {
from { transform: scale(1); color: white; }
50% { transform: scale(1.1); color: yellow; }
to { transform: scale(1); color: white; }
}
.lobby-event #m-lobby { animation: 1s pulse infinite; }
.lobby-event #m-lobby:after { content: " - Live"; }
.clash-event #m-clash { animation: 1s pulse infinite; }
.clash-event #m-clash:after { content: " - Live"; }
#featured-aligner {
white-space: nowrap;
}
#featured {
background-color: #1d94fc;
height: 90pt;
position: absolute;
left: -35pt;
top: 200pt;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
transform: rotate(-2deg);
z-index: 10;
transition: 0.2s transform;
}
#featured:hover {
transform: rotate(-2deg) scale(1.3) translateX(20pt);
}
#featured > .featured-left {
height: 100%;
width: 50pt;
display: inline-block;
border-right: 2pt dotted yellow;
}
#featured-banner {
display: none;
}
#featured img, #featured canvas {
height: 80pt;
max-width: 150pt;
margin: 5pt 5pt 5pt 0;
display: inline-block;
background-color: white;
}
p.bottom {
text-align: center;
font-size: 0.8em;
padding: 0 5pt;
}
a#random-fact {
color: white;
text-decoration: none;
}
#main-footer {
position: relative;
height: 40pt;
margin-top: 3.5em;
}
#discord-footer {
text-align: center;
display: block;
background-color: #738bd7;
height: 100%;
width: 100%;
text-decoration: none;
color: white;
}
#footer-discord-text {
display: inline-block;
width: 75%;
line-height: 30pt;
padding: 5pt;
}
#patron-feature, #discord-number {
font-weight: bold;
}
#discord-footer:hover {
background-color: #5c70ae;
}
/*
* FIXME: The Discord logo *really* ought to be repositioned to be closer to the
* text, in light of removing the Patreon part of the bar. However, I (Sora) am
* not wizard enough at CSS to fix it.
*/
img#discord-logo {
height: 20pt;
position: absolute;
top: 10pt;
left: 10pt;
}
#featured.featured-hidden {
display: none !important;
}
a > em.subselect {
display: none;
}
#footer {
background-color: transparent;
color: rgb(197, 215, 255);
}
@media only screen and (min-width: 800px)
{
a > em.subselect {
background-color: rgba(0,0,0,0);
font-size: 10pt;
text-decoration: none;
position: relative;
top: -0.7em;
padding: 3pt 8pt;
}
a:hover > em.subselect {
display: inline-block;
}
a:hover > em.subselect:hover {
background-color: #ff9310;
}
#m-clash:hover {
padding-left: 3.5em;
}
}
@media only screen and (max-width: 600px)
{
#featured-aligner {
text-align: left;
}
#featured {
display: inline-block;
position: relative;
top: 0; left: -30pt;
transform: none;
}
#featured:hover {
transform: translateX(20pt);
}
#featured.featured-hidden {
display: none !important;
}
#discord-footer {
width: 100%;
}
#footer-discord-text, #footer-patreon-text {
position: unset;
font-size: 0.8em;
line-height: 20pt;
width: 100%;
box-sizing: border-box;
}
#main-footer {
position: relative;
height: auto;
margin-top: 2em;
}
#patreon-footer {
width: 100%;
background-color: #f36b61;
position: relative;
height: 30pt;
}
#patreon-footer:hover {
background-color: #d65a4e;
}
img#discord-logo, img#patreon-logo, #patreon-footer svg {
display: none;
}
a.submenu-item { margin-top: 2.8em; }
}
h2 a {
color: white;
z-index: 1;
}
a.menu-item.m5 { margin-top: 0.2em; }
</style>
</head>
<body id="event-id" onload="load()" ontouchstart="">
<h1><a href="/">Casual ARMS</a></h1>
<div class="main-menu" id="container">
<img src="assets/main/rank-shield.png" id="shield"/>
<img src="assets/main/logo.png" id="logo"/>
<span id="arms-text">CA</span>
<div class="menu-container">
<a class="menu-item m1" id="m-lobby" href="events/"><img src="/assets/main/lobby-logo.png"/>Community Events</a>
<a class="menu-item m2" id="m-leaderboards" href="leaderboards/"><img src="/assets/main/leaderboards-logo.png"/>Leaderboards</a>
<!-- <a class="menu-item m3" id="m-clash" href="clash/"><img src="/assets/main/clash-logo.png"/> -->
<!-- Tournaments <em class="subselect">Clash</em><em class="subselect" onclick="goScramble(event);">Scramble</em> -->
<!-- </a> -->
<!-- <a class="menu-item m4" href="/streaming/"> -->
<!-- Streaming<\!-- <em class="subselect">Mixer</em><em class="subselect" onclick="goScramble(event);">Twitch</em>-\-> -->
<!-- </a> -->
<!-- <a class="menu-item m4" id="m-screenshot" href="screenshots/"><img src="/assets/main/screenshot-logo.png"/>Screenshot Gallery</a>-->
<a class="menu-item m5" href="tools/randomizers/">Randomizers</a>
<a class="menu-item m5" href="tools/stats-generator/">Stats Card</a>
<!-- <a class="menu-item m5" id="m-quiz" href="quiz/"><img src="/assets/main/quiz-logo.png"/>Quiz</a>-->
</div>
<div id="featured-aligner">
<div id="featured" class="featured-hidden">
<div class="featured-left"></div>
<a href="events/#next" id="featured-link"><canvas width="880" height="480" id="featured-canvas"></canvas><img id="featured-img"/></a>
</div>
</div>
<div class="submenu">
<a class="submenu-item" href="https://twitter.com/casualARMS" target="_blank"><img src="/assets/main/logo-twitter.png"/><span class="sub-text">Twitter</span></a>
<a class="submenu-item" href="https://twitch.tv/casualARMS" target="_blank"><img src="/assets/main/logo-twitter.png"/><span class="sub-text">Twitch</span></a>
<a class="submenu-item" href="https://www.youtube.com/channel/UCh7099LQkbVAnNJ_EauiPFA" target="_blank"><img src="/assets/main/logo-twitter.png"/><span class="sub-text">YouTube</span></a>
<!-- <a class="submenu-item" href="https://reddit.com/r/arms/" target="_blank"><img src="/assets/main/logo-reddit.png"/><span class="sub-text">Reddit</span></a> -->
<!-- <a class="submenu-item" href="https://armswiki.org/" target="_blank"><img src="/assets/main/logo-wiki.png"/><span class="sub-text">Wiki</span></a>-->
<!-- <a class="submenu-item" href="https://twitch.tv/schkrimps/" target="_blank"><img src="/assets/main/logo-schkrimps.png"/><span class="sub-text">Schkrimps</span></a>-->
<span class="submenu-group">
<a class="submenu-item long" id="champ-url"><img src="" id="champ-img"/><span class="sub-text" id="champ-title"></span></a>
<a class="submenu-item extra" id="champ-name"></a>
</span>
</div>
<div id="main-footer">
<img id="discord-logo" src="/assets/main/discord-logo.png"/>
<a id="discord-footer" href="https://discord.gg/5A7QkPC"><span id="footer-discord-text">Join the <u>Discord</u> server!</span></a>
</div>
</div>
<p class="bottom"><a href="quiz/" id="random-fact"></a></p>
{% include footer.html %}
</body>
</html>