Began implementing RSE Minecraft server items.

This commit is contained in:
Harrison Deng 2024-10-18 09:16:57 +00:00
commit 1f20da27ad
43 changed files with 5671 additions and 0 deletions

11
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM mcr.microsoft.com/devcontainers/anaconda:1-3
# Copy environment.yml (if found) to a temp location so we update the environment. Also
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
&& rm -rf /tmp/conda-tmp
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

View File

@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda
{
"name": "Anaconda (Python 3)",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"svelte.svelte-vscode",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"antfu.vite",
"bradlc.vscode-tailwindcss"
]
}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "python --version",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

3
.devcontainer/noop.txt Normal file
View File

@ -0,0 +1,3 @@
This file copied into the container along with environment.yml* from the parent
folder. This file is included to prevents the Dockerfile COPY instruction from
failing if no environment.yml is found.

21
.gitignore vendored Normal file
View File

@ -0,0 +1,21 @@
node_modules
# Output
.output
.vercel
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

1
.npmrc Normal file
View File

@ -0,0 +1 @@
engine-strict=true

4
.prettierignore Normal file
View File

@ -0,0 +1,4 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock

15
.prettierrc Normal file
View File

@ -0,0 +1,15 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}

13
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev",
"problemMatcher": [],
"label": "npm: dev",
"detail": "vite dev",
"runOptions": {"instanceLimit": 1}
}
]
}

38
README.md Normal file
View File

@ -0,0 +1,38 @@
# create-svelte
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
## Creating a project
If you're seeing this, you've probably already done this step. Congrats!
```bash
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

5
environment.yml Normal file
View File

@ -0,0 +1,5 @@
name: base
channels:
- defaults
dependencies:
- nodejs=20.17

23
eslint.config.js Normal file
View File

@ -0,0 +1,23 @@
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
ignores: ['build/', '.svelte-kit/', 'dist/']
}
];

19
jsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}

5017
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

43
package.json Normal file
View File

@ -0,0 +1,43 @@
{
"name": "game.reslate.systems",
"version": "0.0.1",
"scripts": {
"dev": "vite dev --host",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
"test": "npm run test:integration && npm run test:unit",
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"test:integration": "playwright test",
"test:unit": "vitest"
},
"devDependencies": {
"@fontsource/fira-mono": "^5.0.0",
"@neoconfetti/svelte": "^2.0.0",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^9.6.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0",
"flowbite": "^2.5.2",
"flowbite-svelte": "^0.47.1",
"flowbite-svelte-icons": "^1.6.2",
"globals": "^15.0.0",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"prettier-plugin-tailwindcss": "^0.6.5",
"svelte": "^4.2.7",
"svelte-check": "^4.0.0",
"tailwindcss": "^3.4.9",
"typescript": "^5.0.0",
"vite": "^5.0.3",
"vitest": "^2.0.0"
},
"type": "module"
}

11
playwright.config.js Normal file
View File

@ -0,0 +1,11 @@
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
webServer: {
command: 'npm run build && npm run preview',
port: 4173
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/
};
export default config;

6
postcss.config.js Normal file
View File

@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};

4
src/app.css Normal file
View File

@ -0,0 +1,4 @@
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
@import '@fontsource/fira-mono';

13
src/app.d.ts vendored Normal file
View File

@ -0,0 +1,13 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};

12
src/app.html Normal file
View File

@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

16
src/lib/images/github.svg Normal file
View File

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 30 30">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5229 6.47715 22 12 22C17.5229 22 22 17.5229 22 12C22 6.47715 17.5229 2 12 2ZM0 12C0 5.3726 5.3726 0 12 0C18.6274 0 24 5.3726 24 12C24 18.6274 18.6274 24 12 24C5.3726 24 0 18.6274 0 12Z"
fill="rgba(0,0,0,0.7)"
stroke="none"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M9.59162 22.7357C9.49492 22.6109 9.49492 21.4986 9.59162 19.399C8.55572 19.4347 7.90122 19.3628 7.62812 19.1833C7.21852 18.9139 6.80842 18.0833 6.44457 17.4979C6.08072 16.9125 5.27312 16.8199 4.94702 16.6891C4.62091 16.5582 4.53905 16.0247 5.84562 16.4282C7.15222 16.8316 7.21592 17.9303 7.62812 18.1872C8.04032 18.4441 9.02572 18.3317 9.47242 18.1259C9.91907 17.9201 9.88622 17.1538 9.96587 16.8503C10.0666 16.5669 9.71162 16.5041 9.70382 16.5018C9.26777 16.5018 6.97697 16.0036 6.34772 13.7852C5.71852 11.5669 6.52907 10.117 6.96147 9.49369C7.24972 9.07814 7.22422 8.19254 6.88497 6.83679C8.11677 6.67939 9.06732 7.06709 9.73672 7.99999C9.73737 8.00534 10.6143 7.47854 12.0001 7.47854C13.386 7.47854 13.8777 7.90764 14.2571 7.99999C14.6365 8.09234 14.94 6.36699 17.2834 6.83679C16.7942 7.79839 16.3844 8.99999 16.6972 9.49369C17.0099 9.98739 18.2372 11.5573 17.4833 13.7852C16.9807 15.2706 15.9927 16.1761 14.5192 16.5018C14.3502 16.5557 14.2658 16.6427 14.2658 16.7627C14.2658 16.9427 14.4942 16.9624 14.8233 17.8058C15.0426 18.368 15.0585 19.9739 14.8708 22.6234C14.3953 22.7445 14.0254 22.8257 13.7611 22.8673C13.2924 22.9409 12.7835 22.9822 12.2834 22.9982C11.7834 23.0141 11.6098 23.0123 10.9185 22.948C10.4577 22.9051 10.0154 22.8343 9.59162 22.7357Z"
fill="rgba(0,0,0,0.7)"
stroke="none"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

138
src/lib/images/rse-logo.svg Normal file
View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="135.02238mm"
height="135.02238mm"
viewBox="0 0 135.02238 135.02238"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="rse-logo.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="true"
inkscape:zoom="0.81023078"
inkscape:cx="-275.23023"
inkscape:cy="170.93895"
inkscape:window-width="3840"
inkscape:window-height="2054"
inkscape:window-x="-12"
inkscape:window-y="-12"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="cm"
originx="6.8894153"
originy="-75.000007"
spacingx="0.99999998"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true"
enabled="false" />
<inkscape:grid
type="axonomgrid"
id="grid3"
units="mm"
originx="6.8894153"
originy="-75.000007"
spacingx="0"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true"
enabled="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(6.8894157,-75.000008)">
<circle
style="fill:#000000;stroke-width:5;stroke-dasharray:none"
id="path3"
cx="60.621777"
cy="142.5112"
r="67.511192" />
<circle
style="fill:none;stroke-width:0"
id="circle1"
cx="60.621777"
cy="142.5112"
r="67.511192" />
<circle
style="fill:#ffffff;fill-opacity:1;stroke-width:4.57742;stroke-dasharray:none"
id="circle2"
cx="60.621777"
cy="142.5112"
r="61.805431" />
<path
id="rect1"
style="fill:#1a1a1a;stroke-width:0"
d="m 17.320508,120 38.971142,22.5 v 50 L 17.320508,170 Z"
sodipodi:nodetypes="ccccc" />
<path
id="rect2"
style="fill:#1a1a1a;stroke-width:0"
d="M 64.951903,142.5 103.92305,120 v 50 l -38.971147,22.5 z"
sodipodi:nodetypes="ccccc" />
<path
id="rect3"
style="fill:#1a1a1a;stroke-width:0"
d="M 60.621772,89.999994 99.592919,112.5 60.621777,135 21.811174,112.5 Z"
sodipodi:nodetypes="ccccc" />
<path
id="path7"
style="fill:#ffffff;stroke-width:0"
d="m 77.94229,110 12.990382,7.5 -8.660255,5 -12.990381,-7.5 z"
sodipodi:nodetypes="ccccc" />
<path
id="rect4"
style="fill:#ffffff;stroke-width:0"
d="M 30.310886,142.49999 38.971145,147.5 v 35.00001 l -8.660254,-5 z"
sodipodi:nodetypes="ccccc" />
<path
id="path4"
style="fill:#ffffff;stroke-width:0"
d="M 38.97114,157.49999 56.291654,167.5 v 10.00001 l -17.320509,-10 z"
sodipodi:nodetypes="ccccc" />
<path
id="path5"
style="fill:#ffffff;stroke-width:0"
d="M 90.932674,142.49999 82.272424,147.5 v 35.00001 l 8.660245,-5 z"
sodipodi:nodetypes="ccccc" />
<path
id="path6"
style="fill:#ffffff;stroke-width:0"
d="M 82.27242,157.49999 64.951908,167.5 v 10.00001 l 17.320507,-10 z"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo</title><path d="M94.1566,22.8189c-10.4-14.8851-30.94-19.2971-45.7914-9.8348L22.2825,29.6078A29.9234,29.9234,0,0,0,8.7639,49.6506a31.5136,31.5136,0,0,0,3.1076,20.2318A30.0061,30.0061,0,0,0,7.3953,81.0653a31.8886,31.8886,0,0,0,5.4473,24.1157c10.4022,14.8865,30.9423,19.2966,45.7914,9.8348L84.7167,98.3921A29.9177,29.9177,0,0,0,98.2353,78.3493,31.5263,31.5263,0,0,0,95.13,58.117a30,30,0,0,0,4.4743-11.1824,31.88,31.88,0,0,0-5.4473-24.1157" style="fill:#ff3e00"/><path d="M45.8171,106.5815A20.7182,20.7182,0,0,1,23.58,98.3389a19.1739,19.1739,0,0,1-3.2766-14.5025,18.1886,18.1886,0,0,1,.6233-2.4357l.4912-1.4978,1.3363.9815a33.6443,33.6443,0,0,0,10.203,5.0978l.9694.2941-.0893.9675a5.8474,5.8474,0,0,0,1.052,3.8781,6.2389,6.2389,0,0,0,6.6952,2.485,5.7449,5.7449,0,0,0,1.6021-.7041L69.27,76.281a5.4306,5.4306,0,0,0,2.4506-3.631,5.7948,5.7948,0,0,0-.9875-4.3712,6.2436,6.2436,0,0,0-6.6978-2.4864,5.7427,5.7427,0,0,0-1.6.7036l-9.9532,6.3449a19.0329,19.0329,0,0,1-5.2965,2.3259,20.7181,20.7181,0,0,1-22.2368-8.2427,19.1725,19.1725,0,0,1-3.2766-14.5024,17.9885,17.9885,0,0,1,8.13-12.0513L55.8833,23.7472a19.0038,19.0038,0,0,1,5.3-2.3287A20.7182,20.7182,0,0,1,83.42,29.6611a19.1739,19.1739,0,0,1,3.2766,14.5025,18.4,18.4,0,0,1-.6233,2.4357l-.4912,1.4978-1.3356-.98a33.6175,33.6175,0,0,0-10.2037-5.1l-.9694-.2942.0893-.9675a5.8588,5.8588,0,0,0-1.052-3.878,6.2389,6.2389,0,0,0-6.6952-2.485,5.7449,5.7449,0,0,0-1.6021.7041L37.73,51.719a5.4218,5.4218,0,0,0-2.4487,3.63,5.7862,5.7862,0,0,0,.9856,4.3717,6.2437,6.2437,0,0,0,6.6978,2.4864,5.7652,5.7652,0,0,0,1.602-.7041l9.9519-6.3425a18.978,18.978,0,0,1,5.2959-2.3278,20.7181,20.7181,0,0,1,22.2368,8.2427,19.1725,19.1725,0,0,1,3.2766,14.5024,17.9977,17.9977,0,0,1-8.13,12.0532L51.1167,104.2528a19.0038,19.0038,0,0,1-5.3,2.3287" style="fill:#fff"/></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

29
src/routes/+layout.svelte Normal file
View File

@ -0,0 +1,29 @@
<script>
import {Navbar, NavBrand, NavLi, NavUl, NavHamburger, Footer, FooterCopyright} from 'flowbite-svelte';
import logo from "$lib/images/rse-logo.svg";
import '../app.css';
</script>
<div class="min-h-screen flex flex-col">
<header class="sticky top-0 px-8">
<Navbar class="px-2 sm:px-4 py-2.5 w-full z-20 top-0 start-0 border-b">
<NavBrand href="/">
<img src={logo} class="me-3 h-6 sm:h-9" alt="RSE Logo" />
<span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white">RS Entertainment</span>
</NavBrand>
<NavHamburger />
<NavUl >
<NavLi href="/">Home</NavLi>
<NavLi href="/minecraft/info">Minecraft</NavLi>
<NavLi href="https://gamedash.reslate.systems">Host Dashboard</NavLi>
<NavLi href="/about">About</NavLi>
</NavUl>
</Navbar>
</header>
<main class="flex flex-col w-full flex-grow">
<slot/>
</main>
</div>
<Footer>
<FooterCopyright href="/" by="Reslate Systems" year={2024} />
</Footer>

3
src/routes/+page.js Normal file
View File

@ -0,0 +1,3 @@
// since there's no dynamic data here, we can prerender
// it so that it gets served as a static asset in production
export const prerender = true;

26
src/routes/+page.svelte Normal file
View File

@ -0,0 +1,26 @@
<script>
import welcome from '$lib/images/svelte-welcome.webp';
import welcome_fallback from '$lib/images/svelte-welcome.png';
import { Button, Heading, P } from 'flowbite-svelte';
import { ArrowRightOutline } from 'flowbite-svelte-icons';
</script>
<svelte:head>
<title>Home</title>
<meta name="description" content="Svelte demo app" />
</svelte:head>
<section class="flex flex-grow justify-center items-center">
<div class="text-center max-w-prose mx-auto">
<Heading tag="h1" class="mb-4" customSize="text-4xl font-extrabold md:text-5xl lg:text-6xl"
>Reslate Systems Entertainment</Heading
>
<P class="mb-6 text-lg sm:px-16 lg:text-xl dark:text-gray-400"
>Reslate Systems Entertainment, a subsection of Reslate Systems, is the cloud gaming service sector designed for RealYHD and friends.</P
>
<Button href="/about">
Learn more
<ArrowRightOutline class="ms-2 h-6 w-6" />
</Button>
</div>
</section>

View File

@ -0,0 +1,9 @@
import { dev } from '$app/environment';
// we don't need any JS on this page, though we'll load
// it in dev so that we get hot module replacement
export const csr = dev;
// since there's no dynamic data here, we can prerender
// it so that it gets served as a static asset in production
export const prerender = true;

View File

@ -0,0 +1,30 @@
<script>
import { Heading, Hr, P, Button } from "flowbite-svelte";
import { ArrowRightOutline } from "flowbite-svelte-icons";
</script>
<svelte:head>
<title>About</title>
<meta name="description" content="About this app" />
</svelte:head>
<section class="flex flex-grow items-center">
<div class="max-w-prose min-w-96 mb-5 mx-auto">
<div class="text-center">
<Heading tag="h1" class="mt-4 mb-6">What is RS Entertainment?</Heading>
<P class="mb-2">
Reslate Systems Entertainment is a private network of video game related servers and services set-up, and maintained by RealYHD. This website serves as a portal to gameplay interface, such as a live map for a Minecraft server, and control interfaces, such as a PufferPanel instance for easier control over servers.
</P>
<P>
Reslate Systems Entertainment is a subnetwork of the wider Reslate Systems services fleet developed and maintained by RealYHD to serve their development and entertainment needs.
</P>
</div>
<div class="text-center mt-4">
<Heading tag="h2" class="mt-4 mb-6">Special Thanks to our Donors!</Heading>
<P class="mb-5">Reslate Systems Entertainment would not be possible if it were not for our communities donations. Our servers are not funded by any commercial entity and completely run for personal use. All donations from members of our private community are welcomed and appreciated. See RealYHD's supporters by checking out RealYHD's Ko-fi page!</P>
<Button href="https://ko-fi.com/realyhd">Take a look <ArrowRightOutline class="w-6 h-6 ms-2"></ArrowRightOutline></Button>
</div>
</div>
</section>

View File

@ -0,0 +1,24 @@
<script>
// @ts-nocheck
import { page } from '$app/stores';
import { BottomNav, BottomNavItem } from 'flowbite-svelte';
import { MapPinSolid, TrackingSolid, InfoCircleSolid } from 'flowbite-svelte-icons';
$: activeUrl = $page.url.pathname;
</script>
<div class="flex flex-grow">
<slot />
</div>
<BottomNav {activeUrl} position="sticky" classInner="grid-cols-3">
<BottomNavItem btnName="Info" href="/minecraft/info">
<InfoCircleSolid class="mb-1 h-6 w-6" />
</BottomNavItem>
<BottomNavItem btnName="Map" href="/minecraft/bluemap">
<MapPinSolid class="mb-1 h-6 w-6" />
</BottomNavItem>
<BottomNavItem btnName="Railway" href="/minecraft/railway">
<TrackingSolid class="mb-1 h-6 w-6" />
</BottomNavItem>
</BottomNav>

View File

@ -0,0 +1,3 @@
// since there's no dynamic data here, we can prerender
// it so that it gets served as a static asset in production
export const prerender = true;

View File

@ -0,0 +1,3 @@
// since there's no dynamic data here, we can prerender
// it so that it gets served as a static asset in production
export const prerender = true;

View File

@ -0,0 +1,8 @@
<svelte:head>
<title>Minecraft Map</title>
<meta name="description" content="A live map of the Minecraft server." />
</svelte:head>
<div class="mx-auto flex-grow py-4">
<iframe class="border-none w-full h-full" src="https://game.reslate.systems/bluemap/" title="BlueMap"/>
</div>

View File

@ -0,0 +1,3 @@
// since there's no dynamic data here, we can prerender
// it so that it gets served as a static asset in production
export const prerender = true;

View File

@ -0,0 +1,14 @@
<script>
import { Button, Heading, P } from 'flowbite-svelte';
import { ArrowRightOutline } from 'flowbite-svelte-icons';
</script>
<svelte:head>
<title>Minecraft Info</title>
<meta name="description" content="Information about the Minecraft server." />
</svelte:head>
<section class="flex flex-row flex-grow justify-center items-center">
<!-- TODO implement status from api.mcsrvstat.us -->
</section>

View File

@ -0,0 +1,3 @@
// since there's no dynamic data here, we can prerender
// it so that it gets served as a static asset in production
export const prerender = true;

View File

@ -0,0 +1,9 @@
<svelte:head>
<title>Minecraft Railway</title>
<meta name="description" content="Information about the railway on the Minecraft server." />
</svelte:head>
<section class="flex flex-row flex-grow justify-center items-center">
<!-- TODO implement display of railway system and status -->
</section>

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

3
static/robots.txt Normal file
View File

@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

13
svelte.config.js Normal file
View File

@ -0,0 +1,13 @@
import adapter from '@sveltejs/adapter-auto';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter()
}
};
export default config;

27
tailwind.config.js Normal file
View File

@ -0,0 +1,27 @@
/** @type {import('tailwindcss').Config} */
import flowbitePlugin from 'flowbite/plugin'
export default {
content: ['./src/**/*.{html,js,svelte,ts}', './node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}'],
darkMode: 'selector',
theme: {
extend: {
colors: {
// flowbite-svelte
primary: {
50: '#FFF5F2',
100: '#FFF1EE',
200: '#FFE4DE',
300: '#FFD5CC',
400: '#FFBCAD',
500: '#FE795D',
600: '#EF562F',
700: '#EB4F27',
800: '#CC4522',
900: '#A5371B'
}
}
}
},
plugins: [flowbitePlugin]
};

6
tests/test.js Normal file
View File

@ -0,0 +1,6 @@
import { expect, test } from '@playwright/test';
test('home page has expected h1', async ({ page }) => {
await page.goto('/');
await expect(page.locator('h1')).toBeVisible();
});

9
vite.config.js Normal file
View File

@ -0,0 +1,9 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ['src/**/*.{test,spec}.{js,ts}']
}
});