mirror of
https://github.com/G2-Games/website.git
synced 2025-06-22 15:52:53 -05:00
241 lines
7.1 KiB
HTML
241 lines
7.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>G2's Website | 404 - Not Found</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta charset="UTF-8">
|
|
<link rel="stylesheet" href="/assets/main-style.css">
|
|
<link rel="preload" as="image" href="/assets/images/cat_light.png">
|
|
<link rel="preload" as="image" href="/assets/images/cat_dark.png">
|
|
<style>
|
|
@import url('/assets/fonts/fonts.css');
|
|
* {
|
|
margin: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
height: 100vh;
|
|
width: 100vw;
|
|
|
|
display: flex;
|
|
font-size: 16pt;
|
|
}
|
|
main {
|
|
max-width: 100vw;
|
|
margin: auto;
|
|
padding-bottom: 20px;
|
|
}
|
|
h1 {
|
|
font-size: 10em;
|
|
text-align: center;
|
|
}
|
|
main h3 {
|
|
font-weight: 500;
|
|
margin: 0 10px;
|
|
text-align: center;
|
|
font-family: "Roboto";
|
|
}
|
|
main p {
|
|
font-size: 15pt;
|
|
margin: auto;
|
|
padding: 0 5px;
|
|
text-align: center;
|
|
max-width: 540px;
|
|
opacity: 0;
|
|
text-overflow: ellipsis;
|
|
line-height: 1;
|
|
}
|
|
a {
|
|
text-decoration: none;
|
|
}
|
|
hr {
|
|
margin: 20px 10px;
|
|
color: #f9e2af;
|
|
}
|
|
|
|
button {
|
|
width: 75%;
|
|
margin: 20px auto;
|
|
position: relative;
|
|
display: block;
|
|
font-size: 18pt;
|
|
font-weight: bold;
|
|
padding: 10px 0;
|
|
border-radius: 2em;
|
|
border: 2px solid #74c7ec;
|
|
|
|
background-color: #74c7ec;
|
|
color: #2C2F33;
|
|
transition-duration: 500ms;
|
|
cursor: pointer;
|
|
}
|
|
button:hover {
|
|
background-color: transparent;
|
|
color: #74c7ec;
|
|
}
|
|
button:active {
|
|
background-color: #74c7ec55;
|
|
color: #7dd8ff;
|
|
}
|
|
|
|
.text-box {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 4em;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.slide-up {
|
|
animation-duration: 1s;
|
|
animation-name: slideup;
|
|
animation-fill-mode: forwards;
|
|
position: relative;
|
|
display: block;
|
|
}
|
|
|
|
.fade-in {
|
|
animation-duration: 1s;
|
|
animation-name: fadein;
|
|
animation-fill-mode: forwards;
|
|
position: relative;
|
|
display: block;
|
|
}
|
|
|
|
.cat {
|
|
position: absolute;
|
|
top: 29px;
|
|
left: calc(50%);
|
|
transform: translatex(-50%);
|
|
background-image: url("/assets/images/cat_light.png");
|
|
image-rendering: pixelated;
|
|
width: 137px;
|
|
height: 178px;
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
.cat {
|
|
background-image: url("/assets/images/cat_dark.png");
|
|
}
|
|
}
|
|
|
|
@media(max-width: 700px) {
|
|
h1 {
|
|
font-size: 8em;
|
|
}
|
|
main h3 {
|
|
font-size: 1.2em;
|
|
}
|
|
}
|
|
|
|
#cookies {
|
|
font-weight: bold;
|
|
}
|
|
@keyframes slideright {
|
|
from {
|
|
transform: translatex(100%);
|
|
opacity: 0;
|
|
}
|
|
|
|
to {
|
|
transform: translatey(0%);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
@keyframes slideup {
|
|
from {
|
|
transform: translatey(100%);
|
|
opacity: 0;
|
|
}
|
|
|
|
to {
|
|
transform: translatey(0%);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
@keyframes fadein {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<main class="fade-in">
|
|
<div style="position:relative;display: flex;justify-content: center;">
|
|
<h1>404</h1>
|
|
<div class="cat" style="display:none;" id="cat"></div>
|
|
</div>
|
|
<h3 id="notFound">The page you requested could not be found.</h3>
|
|
<hr>
|
|
<div class="text-box">
|
|
<p id="message" class="slide-up"><i>A message was here<br>But sometimes, without warning<br>javascript will fail</i></p>
|
|
</div>
|
|
<a href="/"><button>Home</button></a>
|
|
</main>
|
|
</body>
|
|
<script>
|
|
// Eat the cookies you have
|
|
function eatCookie() {
|
|
let numCookies = localStorage.getItem('cookies') || 0;
|
|
if (numCookies >= 1) numCookies--;
|
|
document.getElementById('cookies').innerHTML = numCookies;
|
|
localStorage.setItem('cookies', numCookies);
|
|
console.log(numCookies);
|
|
}
|
|
|
|
let time = new Date();
|
|
let timePrefix = "";
|
|
if (time.getMinutes() >= 40){
|
|
time = new Date(Date.now() + 1 * 60 * 60 * 1000);
|
|
timePrefix = "almost";
|
|
}
|
|
currentTime = time.toLocaleString('en-US', { hour: 'numeric', hour12: true })
|
|
|
|
// Get cookies
|
|
let cookiesRecieved = localStorage.getItem('cookies') || 0;
|
|
cookiesRecieved++;
|
|
let s = "s";
|
|
if (cookiesRecieved == 1) {
|
|
s = "";
|
|
}
|
|
|
|
const strings = [
|
|
"Don't feel bad, have a cookie:</i> 🍪<i><br><sub>You have <span id='cookies'>" + cookiesRecieved + "</span> cookie" + s + "!</sub><br><sup><a style='cursor:pointer;color:teal;' onclick='eatCookie()'>Eat Cookie</a></sup>",
|
|
"Just think, it could be worse",
|
|
"Instead of staring at this page, <abbr title='If you are already outside, sorry'>you could go outside!</abbr>",
|
|
"Where did it go?",
|
|
"Error reduces<br>Your expensive computer<br>To a simple stone.",
|
|
"Sit back, relax, have some tea...</i> 🍵<i>",
|
|
"Where has the time gone, it's " + timePrefix + " <b>" + currentTime + "</b> already!",
|
|
"Where has the time gone, it's </i><currentTime><i> already!",
|
|
"This message brought to you by JavaScript!",
|
|
"This is not the page you are looking for.",
|
|
"Go check out <a href='https://xkcd.com/' target='_blank'>xkcd</a> instead!",
|
|
"Won't you please observe<br>A brief moment of silence<br>For the dead server?",
|
|
"Let's get you home, son",
|
|
"Nya~~!",
|
|
"Messages made possible by <a href='https://8325.org/haiku/' target='_blank'>NetPositive</a>"
|
|
];
|
|
let messageIndex = Math.floor(Math.random() * strings.length);
|
|
const message = strings[messageIndex];
|
|
const messageTarget = document.getElementById("message");
|
|
messageTarget.innerHTML = "<i>" + message + "</i>";
|
|
|
|
console.log(message);
|
|
console.log("Why are you looking at the console on a 404 page...?");
|
|
// For that matter, why are you looking at the source on a 404 page!
|
|
// You're probably cool is why.
|
|
|
|
if (messageIndex == 0) {
|
|
localStorage.setItem('cookies', cookiesRecieved);
|
|
} else if (message == "Nya~~!") {
|
|
document.getElementById("cat").style.display = "block";
|
|
document.getElementById("notFound").innerHTML = "The page you requested could <i>nyot</i> be found.";
|
|
}
|
|
</script>
|
|
</html>
|