-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
77 lines (77 loc) · 3.29 KB
/
index.php
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
<!DOCTYPE html>
<html lang="zh_TW">
<head>
<title>JudgeGirl Scoreboard</title>
<meta charset='utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='https://cdnjs.cloudflare.com/ajax/libs/tocas-ui/2.3.3/tocas.css' rel='stylesheet' type='text/css'>
<link href="stylesheets/flatpickr.min.css" rel='stylesheet' type='text/css'>
<link href="stylesheets/index.css" rel='stylesheet' type='text/css'>
</head>
<body>
<!--Hey! This is the original version of Simple CSS Waves-->
<div class="wave header">
<!--Content before waves-->
<div class="wave inner-header flex">
<div>
<?php
if(isset($_GET['error_msg'])) {
?>
<div class="ts negative message">
<div class="header">Oops! Something went wrong.</div>
<p><?= htmlspecialchars($_GET['error_msg']); ?></p>
</div>
<?php } ?>
<h1 class="unstyled">JudgeGirl Scoreboard</h1>
<hr>
<form method="GET" action="./scoreboard.php" class="ts form" id="form">
<div class="field">
<label>Contest ID:</label>
<input type="number" name="cid">
</div>
<div class="field">
<label>End Time:</label>
<input type="text" class="flatpickr" id="end_time">
<input type="hidden" name="end" id="end">
</div>
<input type="submit" class="ts button" value="Get!"/>
</form>
</div>
</div>
<!--Waves Container-->
<div>
<svg class="wave waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto">
<defs>
<path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" />
</defs>
<g class="wave parallax">
<use xlink:href="#gentle-wave" x="48" y="0" fill="rgba(255,255,255,0.7" />
<use xlink:href="#gentle-wave" x="48" y="3" fill="rgba(255,255,255,0.5)" />
<use xlink:href="#gentle-wave" x="48" y="5" fill="rgba(255,255,255,0.3)" />
<use xlink:href="#gentle-wave" x="48" y="7" fill="#fff" />
</g>
</svg>
</div>
<!--Waves end-->
</div>
<!--Header ends-->
<!--Content starts-->
<div class="wave content flex">
<p>
<a href="https://codepen.io/goodkatz/pen/LYPGxQz" target="_blank">Daniel Österman</a> | 2019 | Modified by <a href="https://github.com/oToToT/JudgeGirl-Scoreboard" target="_blank">oToToT</a>
</p>
</div>
<!--Content ends-->
<script src="javascripts/moment.min.js"></script>
<script src="javascripts/flatpickr.min.js"></script>
<script>
flatpickr(".flatpickr", {enableTime: true});
document.getElementById('form').addEventListener('submit',function(e){
e.preventDefault();
let d = moment(document.getElementById("end_time").value);
document.getElementById("end").value = d.valueOf();
this.submit();
});
</script>
</body>
</html>