.
This commit is contained in:
parent
36576a27f3
commit
c2095d0b13
29 changed files with 5941 additions and 0 deletions
295
wip-refactor/assets/css/catppuccin.scss
Normal file
295
wip-refactor/assets/css/catppuccin.scss
Normal file
|
@ -0,0 +1,295 @@
|
|||
/* Catppuccin Mocha */
|
||||
:root[data-theme="mocha"], :root {
|
||||
--color-surface-0: #313244;
|
||||
/* Base */
|
||||
--color-surface-1: #45475a;
|
||||
/* Mantle */
|
||||
--color-surface-2: #585b70;
|
||||
/* Surface */
|
||||
--color-text: #cdd6f4;
|
||||
--color-base: #1e1e2e;
|
||||
/* Text */
|
||||
--color-accent: #a6e3a1;
|
||||
/* Green */
|
||||
--color-accent-hover: #89d58d;
|
||||
/* Hover Green */
|
||||
--color-border: #585b70;
|
||||
/* Overlay */
|
||||
--color-rosewater: #f5e0dc;
|
||||
--color-flamingo: #f2cdcd;
|
||||
--color-pink: #f5c2e7;
|
||||
--color-mauve: #cba6f7;
|
||||
--color-red: #f38ba8;
|
||||
--color-maroon: #eba0ac;
|
||||
--color-peach: #fab387;
|
||||
--color-yellow: #f9e2af;
|
||||
--color-teal: #94e2d5;
|
||||
--color-sky: #89dceb;
|
||||
--color-sapphire: #74c7ec;
|
||||
--color-blue: #89b4fa;
|
||||
--color-lavender: #b4befe;
|
||||
--color-overlay-0: #6c7086;
|
||||
--color-overlay-1: #7f849c;
|
||||
--color-overlay-2: #9399b2;
|
||||
}
|
||||
|
||||
/* Catppuccin Latte */
|
||||
:root[data-theme="latte"] {
|
||||
--color-surface-0: #ccd0da;
|
||||
/* Base */
|
||||
--color-surface-1: #bcc0cc;
|
||||
/* Mantle */
|
||||
--color-surface-2: #acb0be;
|
||||
/* Surface */
|
||||
--color-text: #4c4f69;
|
||||
--color-base: #eff1f5;
|
||||
/* Text */
|
||||
--color-accent: #d7827e;
|
||||
/* Peach */
|
||||
--color-accent-hover: #e04f58;
|
||||
/* Hover Peach */
|
||||
--color-border: #9ca0b0;
|
||||
/* Overlay */
|
||||
--color-rosewater: #dc8a78;
|
||||
--color-flamingo: #dd7878;
|
||||
--color-pink: #ea76cb;
|
||||
--color-mauve: #8839ef;
|
||||
--color-red: #d20f39;
|
||||
--color-maroon: #e64553;
|
||||
--color-peach: #fe640b;
|
||||
--color-yellow: #df8e1d;
|
||||
--color-teal: #40a02b;
|
||||
--color-sky: #04a5e5;
|
||||
--color-sapphire: #209fb5;
|
||||
--color-blue: #1e66f5;
|
||||
--color-lavender: #7287fd;
|
||||
--color-overlay-0: #6c6f85;
|
||||
--color-overlay-1: #8c8fa1;
|
||||
--color-overlay-2: #9ca0b0;
|
||||
}
|
||||
|
||||
:root[data-theme="yule-night"] {
|
||||
--color-surface-0: #1b1d28;
|
||||
/* Deep midnight */
|
||||
--color-surface-1: #252936;
|
||||
/* Frosty steel */
|
||||
--color-surface-2: #343a48;
|
||||
/* Snow shadow */
|
||||
--color-text: #d4e6f4;
|
||||
/* Pale moonlight */
|
||||
--color-accent: #a3cf8e;
|
||||
/* Pine green */
|
||||
--color-accent-hover: #7fb36a;
|
||||
/* Mistletoe */
|
||||
--color-border: #475266;
|
||||
/* Frosty edges */
|
||||
}
|
||||
|
||||
:root[data-theme="yule-day"] {
|
||||
--color-surface-0: #f5f3ed;
|
||||
/* Fresh snow */
|
||||
--color-surface-1: #ece7df;
|
||||
/* Frosty beige */
|
||||
--color-surface-2: #dcd3c3;
|
||||
/* Hearth ash */
|
||||
--color-text: #4e4b43;
|
||||
/* Warm bark */
|
||||
--color-accent: #7ea86a;
|
||||
/* Pine green */
|
||||
--color-accent-hover: #577a46;
|
||||
/* Darker pine */
|
||||
--color-border: #9d9684;
|
||||
/* Frosted wood */
|
||||
}
|
||||
|
||||
:root[data-theme="midsummer-twilight"] {
|
||||
--color-surface-0: #241f36;
|
||||
/* Starry violet */
|
||||
--color-surface-1: #2e2746;
|
||||
/* Dusky purple */
|
||||
--color-surface-2: #403659;
|
||||
/* Twilight shadow */
|
||||
--color-text: #f6d8e8;
|
||||
/* Fading pink */
|
||||
--color-accent: #ffd983;
|
||||
/* Sunflower gold */
|
||||
--color-accent-hover: #f4be5c;
|
||||
/* Saffron yellow */
|
||||
--color-border: #6b5a89;
|
||||
/* Lavender dusk */
|
||||
}
|
||||
|
||||
:root[data-theme="midsummer-daylight"] {
|
||||
--color-surface-0: #faf8eb;
|
||||
/* Bright sunlight */
|
||||
--color-surface-1: #f2e7c4;
|
||||
/* Sunlit field */
|
||||
--color-surface-2: #e6d399;
|
||||
/* Wheat gold */
|
||||
--color-text: #3b3a24;
|
||||
/* Tree bark */
|
||||
--color-accent: #f5c34e;
|
||||
/* Summer gold */
|
||||
--color-accent-hover: #d69a30;
|
||||
/* Sunset orange */
|
||||
--color-border: #a38a5b;
|
||||
/* Golden shadows */
|
||||
}
|
||||
|
||||
:root[data-theme="fireworks-night"] {
|
||||
--color-surface-0: #0a0e1a;
|
||||
/* Starry sky */
|
||||
--color-surface-1: #121b32;
|
||||
/* Midnight blue */
|
||||
--color-surface-2: #1f2945;
|
||||
/* Smoke cloud */
|
||||
--color-text: #ffffff;
|
||||
/* Brilliant white */
|
||||
--color-accent: #ff4c4c;
|
||||
/* Firework red */
|
||||
--color-accent-hover: #ff726f;
|
||||
/* Flaming red */
|
||||
--color-border: #3b4e7e;
|
||||
/* Steel blue */
|
||||
}
|
||||
|
||||
:root[data-theme="parade-day"] {
|
||||
--color-surface-0: #fafafa;
|
||||
/* White fabric */
|
||||
--color-surface-1: #eaeaea;
|
||||
/* Pale silver */
|
||||
--color-surface-2: #c9d3e3;
|
||||
/* Cerulean mist */
|
||||
--color-text: #2b2b2b;
|
||||
/* Midnight blue */
|
||||
--color-accent: #ff3b3b;
|
||||
/* Firework red */
|
||||
--color-accent-hover: #cc2a2a;
|
||||
/* Deep crimson */
|
||||
--color-border: #8795b4;
|
||||
/* Cloud blue */
|
||||
}
|
||||
|
||||
:root[data-theme="harvest-twilight"] {
|
||||
--color-surface-0: #1d1b13;
|
||||
/* Shadowed wheat field */
|
||||
--color-surface-1: #29231a;
|
||||
/* Earthen soil */
|
||||
--color-surface-2: #4b3b27;
|
||||
/* Golden dusk */
|
||||
--color-text: #f2e5ce;
|
||||
/* Pale harvest moon */
|
||||
--color-accent: #e4a672;
|
||||
/* Pumpkin orange */
|
||||
--color-accent-hover: #c88752;
|
||||
/* Rusted leaves */
|
||||
--color-border: #5d4633;
|
||||
/* Bark brown */
|
||||
}
|
||||
|
||||
:root[data-theme="golden-hour"] {
|
||||
--color-surface-0: #fef6e6;
|
||||
/* Golden wheat */
|
||||
--color-surface-1: #fdecc8;
|
||||
/* Honey glow */
|
||||
--color-surface-2: #fcd399;
|
||||
/* Pumpkin yellow */
|
||||
--color-text: #533c24;
|
||||
/* Harvest bark */
|
||||
--color-accent: #e78a4b;
|
||||
/* Autumn orange */
|
||||
--color-accent-hover: #d06b34;
|
||||
/* Deep amber */
|
||||
--color-border: #a88a5f;
|
||||
/* Field shadows */
|
||||
}
|
||||
|
||||
:root[data-theme="stargazer"] {
|
||||
--color-surface-0: #0d1321;
|
||||
/* Midnight sky */
|
||||
--color-surface-1: #1c2533;
|
||||
/* Cloudy night */
|
||||
--color-surface-2: #283142;
|
||||
/* Subtle twilight */
|
||||
--color-text: #d6e0f5;
|
||||
/* Starlight */
|
||||
--color-accent: #62b6cb;
|
||||
/* Cool cyan */
|
||||
--color-accent-hover: #89d3ed;
|
||||
/* Soft teal */
|
||||
--color-border: #3e506a;
|
||||
/* Lunar blue */
|
||||
}
|
||||
|
||||
:root[data-theme="daydreamer"] {
|
||||
--color-surface-0: #f9f9fc;
|
||||
/* Light paper */
|
||||
--color-surface-1: #eceef3;
|
||||
/* Morning mist */
|
||||
--color-surface-2: #d7dcea;
|
||||
/* Overcast sky */
|
||||
--color-text: #2e3440;
|
||||
/* Quiet gray */
|
||||
--color-accent: #5e81ac;
|
||||
/* Blue-gray calm */
|
||||
--color-accent-hover: #81a1c1;
|
||||
/* Brighter sky blue */
|
||||
--color-border: #b2c4d4;
|
||||
/* Subtle frost */
|
||||
}
|
||||
|
||||
// Use SCSS features to create 100-950 shades of all colors (tailwindify)
|
||||
// Increments of 100, 200, (steps of 100) until 900, 950, HSL
|
||||
// 100 being 90% lightness, 950 being 5% lightness
|
||||
// 100 being the most light (nearly white), 950 being the least light (nearly black)
|
||||
// Generate 100-900
|
||||
|
||||
// These are root variables that don't care what the theme is
|
||||
// for loop, 100 increment each
|
||||
@for $j from 1 through 9 {
|
||||
$i: $j * 100;
|
||||
// Compute lightness value before setting color
|
||||
$lightness: 100% - $j * 10%;
|
||||
|
||||
|
||||
:root {
|
||||
// Take brightness of active color (var(--color-surface-1)) and adjust its lightness
|
||||
--color-surface-1-#{$i}: hsl(hue(var(--color-surface-1)), 100%, #{$lightness});
|
||||
--color-surface-2-#{$i}: hsl(hue(var(--color-surface-2)), 100%, #{$lightness});
|
||||
--color-text-#{$i}: hsl(hue(var(--color-text)), 100%, #{$lightness});
|
||||
--color-accent-#{$i}: hsl(hue(var(--color-accent)), 100%, #{$lightness});
|
||||
--color-accent-hover-#{$i}: hsl(hue(var(--color-accent-hover)), 100%, #{$lightness});
|
||||
--color-border-#{$i}: hsl(hue(var(--color-border)), 100%, #{$lightness});
|
||||
--color-rosewater-#{$i}: hsl(hue(var(--color-rosewater)), 100%, #{$lightness});
|
||||
--color-flamingo-#{$i}: hsl(hue(var(--color-flamingo)), 100%, #{$lightness});
|
||||
--color-pink-#{$i}: hsl(hue(var(--color-pink)), 100%, #{$lightness});
|
||||
--color-mauve-#{$i}: hsl(hue(var(--color-mauve)), 100%, #{$lightness});
|
||||
--color-red-#{$i}: hsl(hue(var(--color-red)), 100%, #{$lightness});
|
||||
--color-maroon-#{$i}: hsl(hue(var(--color-maroon)), 100%, #{$lightness});
|
||||
--color-peach-#{$i}: hsl(hue(var(--color-peach)), 100%, #{$lightness});
|
||||
--color-yellow-#{$i}: hsl(hue(var(--color-yellow)), 100%, #{$lightness});
|
||||
--color-blue-#{$i}: hsl(hue(var(--color-blue)), 100%, #{$lightness});
|
||||
--color-teal-#{$i}: hsl(hue(var(--color-teal)), 100%, #{$lightness});
|
||||
--color-sky-#{$i}: hsl(hue(var(--color-sky)), 100%, #{$lightness});
|
||||
--color-sapphire-#{$i}: hsl(hue(var(--color-sapphire)), 100%, #{$lightness});
|
||||
--color-lavender-#{$i}: hsl(hue(var(--color-lavender)), 100%, #{$lightness});
|
||||
--color-overlay-0-#{$i}: hsl(hue(var(--color-overlay-0)), 100%, #{$lightness});
|
||||
--color-overlay-1-#{$i}: hsl(hue(var(--color-overlay-1)), 100%, #{$lightness});
|
||||
--color-overlay-2-#{$i}: hsl(hue(var(--color-overlay-2)), 100%, #{$lightness});
|
||||
--color-base-#{$i}: hsl(hue(var(--color-base)), 100%, #{$lightness});
|
||||
}
|
||||
}
|
||||
|
||||
p, h1, h2, h3, h4, h5, h6, small, a, span, div, li, td, th, label, input, textarea, select, button {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
// Set background for things like buttons, dropdowns, etc.
|
||||
button, input, select, textarea {
|
||||
@apply border-accent border rounded-sm m-1;
|
||||
background-color: var(--color-surface-1);
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--color-base);
|
||||
}
|
39
wip-refactor/assets/css/main.css
Normal file
39
wip-refactor/assets/css/main.css
Normal file
|
@ -0,0 +1,39 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
|
||||
/* Default styles */
|
||||
h1, h2, h3 {
|
||||
margin-bottom: 1rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
@apply p-2 rounded-md text-white transition-all duration-200 hover:bg-surface-2;
|
||||
}
|
||||
|
||||
/* Import the WOFF IBM VGA font */
|
||||
@font-face {
|
||||
font-family: 'IBM VGA 8x16';
|
||||
src: url('/Web437_IBM_VGA_8x16.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.vga-font {
|
||||
font-family: 'IBM VGA 8x16', monospace;
|
||||
|
||||
text-shadow: 1px 1px 0 black;
|
||||
}
|
310
wip-refactor/assets/diagnostics.ts
Normal file
310
wip-refactor/assets/diagnostics.ts
Normal file
|
@ -0,0 +1,310 @@
|
|||
import * as net from "net";
|
||||
|
||||
export enum Severity {
|
||||
OK = "OK",
|
||||
Warning = "WARN",
|
||||
Error = "ERR",
|
||||
Skip = "SKIP",
|
||||
}
|
||||
|
||||
export interface Status {
|
||||
severity: Severity;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface DiagnosticStep {
|
||||
run: () => Promise<Status>;
|
||||
name: string;
|
||||
status?: Status;
|
||||
}
|
||||
|
||||
export interface Diagnostic {
|
||||
title: string;
|
||||
steps: Array<DiagnosticStep>;
|
||||
status?: Status;
|
||||
}
|
||||
|
||||
const domain = "/web/access/smgames.club";
|
||||
|
||||
export var diagnostics: Ref<Diagnostic[]> = ref([
|
||||
{
|
||||
title: "Matrix Server Acs.",
|
||||
steps: [
|
||||
{
|
||||
name: "Version access",
|
||||
run: () => {
|
||||
// The Matrix server should be hosted at smgames.club - Attempt to connect to the server
|
||||
// TODO: Better checking - This just checks for resources.
|
||||
|
||||
// Check _matrix/client/versions - Should return a JSON object
|
||||
// Else, return an error
|
||||
const url = `${domain}/_matrix/client/versions`;
|
||||
return fetch(url)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
return {
|
||||
severity: Severity.OK,
|
||||
message: "Matrix server is accessible.",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message: "Response was not OK.",
|
||||
};
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message:
|
||||
"Unable to get a response when querying the version: " +
|
||||
error,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Primary Domain",
|
||||
steps: [
|
||||
{
|
||||
name: "Fetch Index",
|
||||
run: () => {
|
||||
// Check that the domain resolves
|
||||
const url = `${domain}`;
|
||||
return fetch(url)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
return {
|
||||
severity: Severity.OK,
|
||||
message: "Able to fetch.",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message: "Response was not OK.",
|
||||
};
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message:
|
||||
"Unable to get a response when querying the domain: " +
|
||||
error,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Services Reverse Proxy",
|
||||
steps: [
|
||||
{
|
||||
name: "Access Index",
|
||||
run: () => {
|
||||
const service_url = "/web/access/services.smgames.club";
|
||||
return fetch(service_url)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
return {
|
||||
severity: Severity.OK,
|
||||
message: "Able to fetch index.",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message: "Index response was not OK: " +
|
||||
response.statusText,
|
||||
};
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message:
|
||||
"Unable to get a response when querying the domain index: " +
|
||||
error,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Minecraft",
|
||||
steps: [
|
||||
{
|
||||
name: "WS Connect",
|
||||
run: () => {
|
||||
const minecraft_server = "ws://social.smgames.club:25565"; // WebSocket URL for Minecraft
|
||||
const timeoutDuration = 100; // Timeout duration in ms
|
||||
|
||||
return new Promise<Status>((resolve, reject) => {
|
||||
const socket = new WebSocket(minecraft_server);
|
||||
|
||||
// Set up a timeout to reject the promise if the connection takes too long
|
||||
const timeout = setTimeout(() => {
|
||||
reject({
|
||||
severity: Severity.Error,
|
||||
message:
|
||||
`Timeout while trying to connect to Minecraft server via WebSocket on port 25565.`,
|
||||
});
|
||||
socket.close(); // Close the WebSocket connection in case of timeout
|
||||
}, timeoutDuration);
|
||||
|
||||
socket.onopen = () => {
|
||||
clearTimeout(timeout); // Clear the timeout once the connection is successful
|
||||
resolve({
|
||||
severity: Severity.OK,
|
||||
message:
|
||||
"WebSocket connection successful to Minecraft server on port 25565.",
|
||||
});
|
||||
socket.close(); // Close the WebSocket connection after success
|
||||
};
|
||||
|
||||
socket.onerror = (err) => {
|
||||
clearTimeout(timeout); // Clear the timeout if an error occurs
|
||||
reject({
|
||||
severity: Severity.Error,
|
||||
message:
|
||||
"Unable to connect to Minecraft server via WebSocket on port 25565: " +
|
||||
err,
|
||||
});
|
||||
socket.close(); // Close the WebSocket connection after error
|
||||
};
|
||||
|
||||
socket.onclose = (event) => {
|
||||
clearTimeout(timeout); // Clear the timeout when the connection is closed
|
||||
if (!event.wasClean) {
|
||||
reject({
|
||||
severity: Severity.Error,
|
||||
message:
|
||||
"WebSocket connection closed unexpectedly to Minecraft server on port 25565.",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
socket.onmessage = (event) => {
|
||||
// Optionally handle any WebSocket messages if necessary
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Forgejo",
|
||||
steps: [
|
||||
{
|
||||
name: "Fetch Index",
|
||||
run: () => {
|
||||
const service_url = "/web/access/git.smgames.club";
|
||||
return fetch(service_url)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
return {
|
||||
severity: Severity.OK,
|
||||
message: "Able to fetch index.",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message: "Index response was not OK: " +
|
||||
response.statusText,
|
||||
};
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message:
|
||||
"Unable to get a response when querying the domain index: " +
|
||||
error,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Social",
|
||||
steps: [
|
||||
{
|
||||
name: "Fetch Index",
|
||||
run: () => {
|
||||
const service_url = "/web/access/social.smgames.club";
|
||||
return fetch(service_url)
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
return {
|
||||
severity: Severity.OK,
|
||||
message: "Able to fetch index.",
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message: "Index response was not OK: " +
|
||||
response.statusText,
|
||||
};
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
return {
|
||||
severity: Severity.Error,
|
||||
message:
|
||||
"Unable to get a response when querying the domain index: " +
|
||||
error,
|
||||
};
|
||||
});
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
]);
|
||||
|
||||
// Run all diagnostics
|
||||
export async function run_diagnostics() {
|
||||
for (const diagnostic of diagnostics.value) {
|
||||
try {
|
||||
if (diagnostic.steps === undefined || diagnostic.steps.length === 0) {
|
||||
diagnostic.status = {
|
||||
severity: Severity.Skip,
|
||||
message: "No steps available to take.",
|
||||
};
|
||||
continue;
|
||||
}
|
||||
diagnostic.status = {
|
||||
severity: Severity.OK,
|
||||
message: "Successfully verified.",
|
||||
};
|
||||
for (const step of diagnostic.steps) {
|
||||
try {
|
||||
const res = await step.run();
|
||||
step.status = res;
|
||||
} catch (err: any) {
|
||||
step.status = {
|
||||
severity: Severity.Error,
|
||||
message: err.message,
|
||||
};
|
||||
}
|
||||
if (step.status.severity === Severity.Error) {
|
||||
diagnostic.status = {
|
||||
severity: Severity.Error,
|
||||
message: "One or more steps failed.",
|
||||
};
|
||||
}
|
||||
}
|
||||
} catch (err: any) {
|
||||
diagnostic.status = {
|
||||
severity: Severity.Error,
|
||||
message: err.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Run diagnostics on load
|
||||
run_diagnostics();
|
67
wip-refactor/assets/projects.ts
Normal file
67
wip-refactor/assets/projects.ts
Normal file
|
@ -0,0 +1,67 @@
|
|||
export const projects = [
|
||||
{
|
||||
name: "Wildspace",
|
||||
description: "A browser pet game.",
|
||||
tags: ["Website", "Multiplayer", "ALPHA"],
|
||||
links: {
|
||||
public: "https://thewild.space",
|
||||
local: null,
|
||||
testing: null,
|
||||
wiki: "wiki.smgames.club/wildspace",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Ghostbound",
|
||||
description: "A ghost hunting game.",
|
||||
tags: ["PC", "Singleplayer", "Multiplayer", "ALPHA", "Horror", "Team"],
|
||||
links: {
|
||||
public: null,
|
||||
local: null,
|
||||
testing: null,
|
||||
wiki: "wiki.smgames.club/ghostbound",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '"Island"',
|
||||
description: "A cozy play-at-your-pace game.",
|
||||
tags: ["PC", "Singleplayer", "Multiplayer", "ALPHA", "Relaxing", "Sim"],
|
||||
links: {
|
||||
public: null,
|
||||
local: null,
|
||||
testing: null,
|
||||
wiki: "wiki.smgames.club/island",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '"Random RPG"',
|
||||
description: "An RPG game with actions and consequences.",
|
||||
tags: ["PC", "Singleplayer", "ALPHA", "RPG"],
|
||||
links: {
|
||||
public: null,
|
||||
local: null,
|
||||
testing: null,
|
||||
wiki: "wiki.smgames.club/randomrpg",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
// Fetch all tags from the projects array
|
||||
export var tags: Array<string> = [];
|
||||
|
||||
projects.forEach((project) => {
|
||||
project.tags.forEach((tag) => {
|
||||
var exists: boolean = false;
|
||||
tags.forEach((existingTag) => {
|
||||
if (tag === existingTag) {
|
||||
exists = true;
|
||||
}
|
||||
});
|
||||
if (!exists)
|
||||
tags.push(tag);
|
||||
});
|
||||
});
|
||||
|
||||
export default {
|
||||
projects,
|
||||
tags,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue