This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
102 lines (93 loc) · 4.08 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="BCACTF 4.0 June 9-12">
<title>BCACTF 4.0</title>
<link rel="shortcut icon" type="image/png" href="/assets/favicon.png">
<link rel="stylesheet" href="https://use.typekit.net/xcy1jlj.css">
<link href="/style.css" rel="stylesheet">
</head>
<body>
<div class="wave">
<svg version="1.1" id="svgLogo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
x="0px" y="0px" viewBox="0 0 500 128.9" style="enable-background:new 0 0 500 128.9;" xml:space="preserve">
<style type="text/css">
.st0 {
fill: url(#SVGID_1_);
}
</style>
<lineargradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="250" y1="128.8675" x2="250"
y2="-9.094947e-13">
<stop offset="0" style="stop-color:#3E68BD" />
<stop offset="1" style="stop-color:#77D4CA" />
</lineargradient>
<path class="st0" d="M0,100c150,100,350-100,500,0V0H0" />
<image style="overflow:visible;" width="1373" height="1034" xlink:href="assets/logo4.png"
transform="matrix(6.836370e-02 0 0 6.836370e-02 210.1216 5.6881)">
</image>
</svg>
</div>
<div id="mainContent">
<h1 id="title">BCACTF 4.0</h1>
<h2 class="accent">June 09-12 2023</h2>
</div>
<div id="countdownTimer">
<p id="time"></p>
</div>
<br>
<div id="infoContainer">
<div class="infoDiv left">
<h3>CONTACT</h3>
<a href="https://discord.com/invite/9Hnz7aCmr6" target="blank">Discord</a>
<br>
<a href="mailto:[email protected]">[email protected]</a>
</div>
<div class="infoDiv right">
<h3>INTERESTED IN SPONSORING?</h3>
<a href="mailto:[email protected]">Contact Us</a>
</div>
</div>
<p class="bottom">Made by the <a href="https://github.com/BCACTF" target="blank">BCA CTF Club</a>. Logo
by Melissa Park.</p>
<script>
const timeElem = document.getElementById("time");
const ctfTime = 1686355200000; // Sat, 10 June 2023, 00:00 UTC
const ctfEndTime = 1686614400000;
var interval;
var showSeconds = window.innerWidth > 801;
function updateTime() {
timeElem.innerHTML = formatTime((ctfTime - Date.now()) / 1000);
}
function formatTime(s) {
s = Number(s);
var label = "<p class='time-info'>Competition Starts In: </p>";
var d = Math.floor(s / (60 * 60 * 24));
var h = Math.floor(s % (3600 * 24) / 3600);
var m = Math.floor(s % 3600 / 60);
var s = Math.floor(s % 60);
var dDisplay = String(Math.abs(d)).padStart(2, '0') + "<label> Days</label> <span class='blue'>:</span> ";
var hDisplay = String(Math.abs(h)).padStart(2, '0') + "<label> Hours</label> <span class='blue'>:</span> ";
var mDisplay = String(Math.abs(m)).padStart(2, '0') + "<label> Minutes</label> ";
var sDisplay = "<span class='blue'>: </span>" + String(Math.abs(s)).padStart(2, '0') + "<label> Seconds</label></span>";
return label + dDisplay + hDisplay + mDisplay + (showSeconds ? sDisplay : "");
}
if (Date.now() >= ctfEndTime) {
document.getElementById("time").innerHTML = "<p class='time-info'>The event is over! See you next year!</p>";
}
else
if (Date.now() >= ctfTime) {
document.getElementById("time").innerHTML = "<p class='time-info'>The event has started! Good luck!</p>";
}
else {
updateTime();
interval = setInterval(updateTime, 1000);
}
window.addEventListener('resize', function () {
showSeconds = window.innerWidth > 801;
});
</script>
</body>
</html>