Skip to content

Commit 08ae7a8

Browse files
committed
V5.2.1 - Added 404 Page, Updated Tabs
1 parent caac8ee commit 08ae7a8

File tree

12 files changed

+146
-127
lines changed

12 files changed

+146
-127
lines changed

index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,19 @@ const fetchData = async (req, res, next, baseUrls) => {
5555
if (data) {
5656
res.end(Buffer.from(data))
5757
} else {
58-
res.status(404).send()
58+
res.status(404).sendFile(path.join(__dirname, "static", "404.html"))
5959
}
6060
} catch (error) {
6161
console.error(`Error fetching ${req.url}:`, error)
62-
res.status(500).send()
62+
next(error)
6363
}
6464
}
65+
app.use((req, res, next) => {
66+
res.status(404).sendFile(path.join(__dirname, "static", "404.html"))
67+
})
6568
app.use((err, req, res, next) => {
6669
console.error(err.stack)
67-
res.status(500).send()
70+
res.status(500).sendFile(path.join(__dirname, "static", "404.html"))
6871
})
6972
server.on("request", (req, res) => {
7073
if (bareServer.shouldRoute(req)) {

static/404.html

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="referrer" content="no-referrer" />
6+
<meta http-equiv="X-Content-Type-Options" content="nosniff" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<link rel="shortcut icon" id="tab-favicon" href="favicon.png" />
9+
<title id="tab-title">Home</title>
10+
<link rel="stylesheet" href="/assets/styles/main.css?v=10" />
11+
<link rel="stylesheet" href="/assets/styles/global.css?v=8" />
12+
<script src="https://kit.fontawesome.com/1237c86ba0.js" crossorigin="anonymous"></script>
13+
</head>
14+
<body>
15+
<div class="fixed-nav-bar"></div>
16+
<div class="main error">
17+
<h1>404</h1>
18+
<h3>Page not found.</h3>
19+
<p>Keep getting this error? Report it down below.</p>
20+
<button class="one" type="button" onclick="window.location.href = '/';">Go Back Home</button>
21+
<button class="two" type="button" onclick="window.location.href = 'https://discord.gg/interstellar'">Join our Discord (Direct)</button>
22+
<button class="three" type="button" onclick="go('https://discord.gg/interstellar')">Join our Discord (Proxied)</button>
23+
</div>
24+
</body>
25+
<script src="assets/scripts/i.js?V=42"></script>
26+
<script src="./assets/-/bundle.js?v=5-5-2024"></script>
27+
<script src="./assets/-/config.js?v=5-5-2024"></script>
28+
<script src="assets/scripts/m.js?v=54"></script>
29+
</html>

static/apps.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<script src="./assets/-/bundle.js?v=5-5-2024"></script>
1111
<script src="./assets/-/config.js?v=5-5-2024"></script>
1212
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
13-
<link rel="stylesheet" href="/assets/styles/main.css?v=8" />
13+
<link rel="stylesheet" href="/assets/styles/main.css?v=10" />
1414
<link rel="stylesheet" href="/assets/styles/global.css?v=8" />
1515
<script src="/assets/scripts/m.js?v=54"></script>
1616
<script src="/assets/scripts/i.js?V=42"></script>
@@ -21,7 +21,7 @@
2121
<div class="fixed-nav-bar"></div>
2222
<div class="input-container">
2323
<input type="text" id="searchbarbottom" onkeyup="search_bar()" placeholder="Search" />
24-
<select id="category" name="category" onchange="show_category()">
24+
<select title="Category" id="category" name="category" onchange="show_category()">
2525
<option value="all">All</option>
2626
<option value="android">Android Emulator</option>
2727
<option value="social">Social</option>

static/assets/scripts/ta.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -286,22 +286,21 @@ function goForward() {
286286
}
287287
}
288288
// Remove Nav
289-
document.addEventListener("fullscreenchange", function () {
290-
const isFullscreen = Boolean(document.fullscreenElement)
291-
document.body.classList.toggle("fullscreen", isFullscreen)
292-
})
293289
document.addEventListener("DOMContentLoaded", function () {
294-
var navIcon = document.getElementById("nav-icon")
295-
var navBar = document.getElementById("right-side-nav")
296-
const activeIframe = document.querySelector("#iframe-container iframe.active")
297-
console.log(navIcon)
298-
navIcon.addEventListener("click", function () {
299-
var isOpen = navBar.classList.toggle("hidden")
300-
this.classList.toggle("open")
301-
if (isOpen) {
302-
activeIframe.style.top = "5%"
290+
var TB = document.getElementById("tabs-button")
291+
var NB = document.getElementById("right-side-nav")
292+
TB.addEventListener("click", function () {
293+
var activeIframe = document.querySelector("#iframe-container iframe.active")
294+
if (NB.style.display === "none") {
295+
NB.style.display = ""
296+
activeIframe.style.top = "10%"
297+
TB.querySelector("i").classList.remove("fa-magnifying-glass-plus")
298+
TB.querySelector("i").classList.add("fa-magnifying-glass-minus")
303299
} else {
304-
activeIframe.style.top = "13%"
300+
NB.style.display = "none"
301+
activeIframe.style.top = "5%"
302+
TB.querySelector("i").classList.remove("fa-magnifying-glass-minus")
303+
TB.querySelector("i").classList.add("fa-magnifying-glass-plus")
305304
}
306305
})
307306
})

static/assets/styles/fr.css

Lines changed: 0 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,6 @@ body {
1111
color: white;
1212
}
1313

14-
iframe {
15-
display: block;
16-
border: none;
17-
height: calc(100% - 3em);
18-
width: 100vw;
19-
position: absolute;
20-
bottom: 0;
21-
left: 0;
22-
right: 0;
23-
top: 3em;
24-
overflow-y: scroll;
25-
overflow-x: hidden;
26-
background: white;
27-
}
28-
2914
.nav {
3015
padding: 1rem;
3116
transition: transform 0.5s ease;
@@ -249,81 +234,3 @@ iframe {
249234
left: 0;
250235
top: 10%;
251236
}
252-
253-
/* Credits to https://codepen.io/designcouch/pen/ExvwPY for the hamburger animations */
254-
#nav-icon {
255-
width: 20px;
256-
position: fixed;
257-
bottom: 5%;
258-
left: 10px;
259-
-webkit-transform: rotate(0deg);
260-
-moz-transform: rotate(0deg);
261-
-o-transform: rotate(0deg);
262-
transform: rotate(0deg);
263-
-webkit-transition: 0.5s ease-in-out;
264-
-moz-transition: 0.5s ease-in-out;
265-
-o-transition: 0.5s ease-in-out;
266-
transition: 0.5s ease-in-out;
267-
cursor: pointer;
268-
z-index: 9999;
269-
}
270-
271-
#nav-icon span {
272-
display: block;
273-
position: absolute;
274-
height: 5px;
275-
width: 100%;
276-
background: var(--main);
277-
border-radius: 9px;
278-
opacity: 1;
279-
left: 0;
280-
-webkit-transform: rotate(0deg);
281-
-moz-transform: rotate(0deg);
282-
-o-transform: rotate(0deg);
283-
transform: rotate(0deg);
284-
-webkit-transition: 0.25s ease-in-out;
285-
-moz-transition: 0.25s ease-in-out;
286-
-o-transition: 0.25s ease-in-out;
287-
transition: 0.25s ease-in-out;
288-
cursor: pointer;
289-
box-shadow: 0 0 0 1px white;
290-
}
291-
292-
#nav-icon span:nth-child(1) {
293-
top: 0px;
294-
}
295-
296-
#nav-icon span:nth-child(2) {
297-
top: 8px;
298-
}
299-
300-
#nav-icon span:nth-child(3) {
301-
top: 16px;
302-
}
303-
304-
#nav-icon.open span:nth-child(1) {
305-
top: 8px;
306-
-webkit-transform: rotate(135deg);
307-
-moz-transform: rotate(135deg);
308-
-o-transform: rotate(135deg);
309-
transform: rotate(135deg);
310-
}
311-
312-
#nav-icon.open span:nth-child(2) {
313-
opacity: 0;
314-
left: -30px;
315-
}
316-
317-
#nav-icon.open span:nth-child(3) {
318-
top: 8px;
319-
-webkit-transform: rotate(-135deg);
320-
-moz-transform: rotate(-135deg);
321-
-o-transform: rotate(-135deg);
322-
transform: rotate(-135deg);
323-
}
324-
325-
#right-side-nav.hidden {
326-
display: none;
327-
}
328-
329-
/* Credits to https://codepen.io/designcouch/pen/ExvwPY for the hamburger animations */

static/assets/styles/main.css

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap");
1+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap");
22
@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
33

44
body {
@@ -348,7 +348,7 @@ select {
348348
.main {
349349
letter-spacing: 0px;
350350
font-family: "Inter", sans-serif;
351-
width: 100%;
351+
width: 99%;
352352
display: flex;
353353
flex-direction: column;
354354
justify-content: center;
@@ -358,6 +358,89 @@ select {
358358
z-index: 99;
359359
}
360360

361+
.error {
362+
color: white;
363+
font-family: "Inter", sans-serif;
364+
font-weight: 900;
365+
top: 15%;
366+
text-align: center;
367+
}
368+
369+
.error h1 {
370+
font-size: 10vw;
371+
margin: 0 auto -2vw auto;
372+
background: linear-gradient(150deg, #746eff 0%, #ff00bb 51%, #746eff 100%);
373+
-webkit-background-clip: text;
374+
-moz-background-clip: text;
375+
background-clip: text;
376+
color: transparent;
377+
}
378+
379+
.error h3 {
380+
font-size: 4vw;
381+
margin-bottom: auto;
382+
margin-top: auto;
383+
font-weight: 600;
384+
}
385+
386+
.error p {
387+
font-size: 2vw;
388+
font-weight: 700;
389+
margin-top: 0.5%;
390+
margin-bottom: 1%;
391+
color: var(--text-dark);
392+
}
393+
394+
.error button {
395+
padding: 15px;
396+
border-radius: 5px;
397+
background: var(--block-buttons);
398+
color: inherit;
399+
font-size: 24px;
400+
border: 2px solid var(--block-buttons);
401+
outline: none;
402+
margin-bottom: 10px;
403+
cursor: pointer;
404+
}
405+
406+
.error .one:hover {
407+
color: #ef6e78;
408+
border: 2px solid #ef6e78;
409+
background: transparent;
410+
}
411+
412+
.error .two:hover {
413+
color: #ef996e;
414+
border: 2px solid #ef996e;
415+
background: transparent;
416+
}
417+
418+
.error .three:hover {
419+
color: #ef6ee4;
420+
border: 2px solid #ef6ee4;
421+
background: transparent;
422+
}
423+
424+
@media (max-width: 768px) {
425+
.error h1 {
426+
font-size: 12vw;
427+
}
428+
429+
.error h3 {
430+
font-size: 5vw;
431+
}
432+
433+
.error p {
434+
font-size: 3vw;
435+
margin-top: 5px;
436+
margin-bottom: 5px;
437+
}
438+
439+
.error button {
440+
font-size: 16px;
441+
}
442+
}
443+
361444
#particles-js {
362445
position: absolute;
363446
width: 100%;

static/games.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<link rel="shortcut icon" id="tab-favicon" href="favicon.png" />
99
<title id="tab-title">Home</title>
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
11-
<link rel="stylesheet" href="/assets/styles/main.css?v=8" />
11+
<link rel="stylesheet" href="/assets/styles/main.css?v=10" />
1212
<link rel="stylesheet" href="/assets/styles/global.css?v=8" />
1313
<script src="/assets/scripts/i.js?V=42"></script>
1414
<script src="/assets/scripts/ap.js?v=90"></script>

static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<link rel="shortcut icon" id="tab-favicon" href="favicon.png" />
99
<title id="tab-title">Home</title>
10-
<link rel="stylesheet" href="/assets/styles/main.css?v=8" />
10+
<link rel="stylesheet" href="/assets/styles/main.css?v=10" />
1111
<link rel="stylesheet" href="/assets/styles/global.css?v=8" />
1212
</head>
1313
<body class="center" onload="SplashT">

static/privacy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
99
<link rel="shortcut icon" id="tab-favicon" href="favicon.png" />
1010
<title id="tab-title">Home</title>
11-
<link rel="stylesheet" href="/assets/styles/main.css?v=8" />
11+
<link rel="stylesheet" href="/assets/styles/main.css?v=10" />
1212
<link rel="stylesheet" href="/assets/styles/global.css?v=8" />
1313
<script src="https://kit.fontawesome.com/1237c86ba0.js" crossorigin="anonymous"></script>
1414
</head>

static/settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
99
<link rel="shortcut icon" id="tab-favicon" href="favicon.png" />
1010
<title id="tab-title">Home</title>
11-
<link rel="stylesheet" href="/assets/styles/main.css?v=8" />
11+
<link rel="stylesheet" href="/assets/styles/main.css?v=10" />
1212
<link rel="stylesheet" href="/assets/styles/settings.css?v=5" />
1313
<link rel="stylesheet" href="/assets/styles/global.css?v=8" />
1414
<script src="https://kit.fontawesome.com/1237c86ba0.js" crossorigin="anonymous"></script>

0 commit comments

Comments
 (0)