Prettier Changes
This commit is contained in:
parent
829e911674
commit
5bd01c3a22
10 changed files with 69 additions and 79 deletions
src/routes
|
@ -1,8 +1,8 @@
|
|||
<svelte:head>
|
||||
<title>Home</title>
|
||||
<meta name="description" content="Landing Page for neshweb.net">
|
||||
<title>Home</title>
|
||||
<meta name="description" content="Landing Page for neshweb.net" />
|
||||
</svelte:head>
|
||||
|
||||
<div class="h-full overflow-auto">
|
||||
<h1>Home Page</h1>
|
||||
<h1>Home Page</h1>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<svelte:head>
|
||||
<title>About</title>
|
||||
<meta name="description" content="Information about this Website">
|
||||
</svelte:head>
|
||||
<title>About</title>
|
||||
<meta name="description" content="Information about this Website" />
|
||||
</svelte:head>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import * as fs from "fs";
|
||||
import {json} from "@sveltejs/kit";
|
||||
import * as fs from 'fs';
|
||||
import { json } from '@sveltejs/kit';
|
||||
|
||||
export function GET() {
|
||||
let content = fs.readdirSync("static/assets/icons");
|
||||
let content = fs.readdirSync('static/assets/icons');
|
||||
|
||||
content = content.filter((entry) => entry != ".directory")
|
||||
content = content.filter((entry) => entry != '.directory');
|
||||
|
||||
return json(content);
|
||||
}
|
||||
return json(content);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import * as fs from "fs";
|
||||
import {json} from "@sveltejs/kit";
|
||||
import * as fs from 'fs';
|
||||
import { json } from '@sveltejs/kit';
|
||||
|
||||
export function GET() {
|
||||
const content = fs.readFileSync("static/data/services.json").toString();
|
||||
const content = fs.readFileSync('static/data/services.json').toString();
|
||||
|
||||
let data = JSON.parse(content)
|
||||
let data = JSON.parse(content);
|
||||
|
||||
return json(data);
|
||||
}
|
||||
return json(data);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<svelte:head>
|
||||
<title>Servers</title>
|
||||
<meta name="description" content="Overview of Game Servers running on neshweb.net">
|
||||
</svelte:head>
|
||||
<title>Servers</title>
|
||||
<meta name="description" content="Overview of Game Servers running on neshweb.net" />
|
||||
</svelte:head>
|
||||
|
|
|
@ -9,27 +9,26 @@
|
|||
let icons: readonly string[] = $state.frozen([]);
|
||||
|
||||
async function get(url: string): Promise<any> {
|
||||
let res = await fetch(url)
|
||||
let res = await fetch(url);
|
||||
if (res.ok) {
|
||||
let data = await res.json()
|
||||
return data
|
||||
}
|
||||
else {
|
||||
return Promise.reject()
|
||||
let data = await res.json();
|
||||
return data;
|
||||
} else {
|
||||
return Promise.reject();
|
||||
}
|
||||
}
|
||||
|
||||
$effect(() => {
|
||||
get("/data/services").then((data: Service[]) => {
|
||||
services = data
|
||||
})
|
||||
})
|
||||
get('/data/services').then((data: Service[]) => {
|
||||
services = data;
|
||||
});
|
||||
});
|
||||
|
||||
$effect(() => {
|
||||
get("/assets/icons").then((data: string[]) => {
|
||||
icons = data
|
||||
})
|
||||
})
|
||||
get('/assets/icons').then((data: string[]) => {
|
||||
icons = data;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue