({
- width: undefined,
- height: undefined,
- });
-
- useEffect(() => {
- function handleResize() {
- setWindowSize({
- width: window.innerWidth,
- height: window.innerHeight,
- });
- }
-
- window.addEventListener("resize", handleResize);
-
- handleResize();
-
- return () => window.removeEventListener("resize", handleResize);
- }, []);
- if(typeof(windowSize.width) === "number") {
- return windowSize.width <= 1080 ? 1 : 0;
- }
- else {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/interfaces/CardTypes.ts b/interfaces/CardTypes.ts
deleted file mode 100644
index 04a8604..0000000
--- a/interfaces/CardTypes.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-export interface EntryList {
- services: Service[],
- games: Game[]
-}
-export interface Game {
- name: string,
- icon: string,
- href: string,
- desc: string,
- ip: string,
- status: Status,
-}
-
-export interface Service {
- name: string,
- icon?: string,
- href?: string,
- desc: string,
- warn?: string,
- extLink?: string,
- type: ServiceType,
- docker_container_name: string,
- location: ServiceLocation,
- status: Status,
-}
-
-export enum Status {
- online = "Online",
- offline = "Offline",
- loading = "Loading",
- error = "ERROR"
-}
-
-export enum ServiceLocation {
- brr7_4800u = "brr7-4800u",
- tower_0 = "tower-0",
- other = ""
-}
-
-export enum ServiceType {
- docker = "docker",
- app = "app"
-}
-
diff --git a/interfaces/DockerStatus.ts b/interfaces/DockerStatus.ts
deleted file mode 100644
index 910f222..0000000
--- a/interfaces/DockerStatus.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { ServiceLocation } from './CardTypes';
-export interface DockerInfo {
- name: string,
- status: DockerStatus,
- id: string
- location: ServiceLocation,
-}
-
-export enum DockerStatus {
- running = "running",
-}
diff --git a/next.config.js b/next.config.js
deleted file mode 100644
index 9170d12..0000000
--- a/next.config.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/** @type {import('next').NextConfig} */
-
-const nextConfig = {
- reactStrictMode: true,
- output: 'standalone',
- compiler: {
- styledComponents: true,
- },
- webpack(config) {
- config.module.rules.push({
- test: /\.svg$/,
- use: [{ loader: "@svgr/webpack", options: { icon: true } }]
- });
-
- return config;
- }
-};
-
-module.exports = nextConfig
\ No newline at end of file
diff --git a/package.json b/package.json
index 4117ff5..34b468b 100644
--- a/package.json
+++ b/package.json
@@ -1,32 +1,46 @@
{
- "name": "main-site",
- "version": "0.5.7",
- "private": true,
- "scripts": {
- "dev:debug": "NODE_OPTIONS='--inspect' next dev -H :: -p 8001",
- "dev": "next dev -H :: -p 8001",
- "build": "next build",
- "start": "next start -H :: -p 8001",
- "lint": "next lint"
- },
- "dependencies": {
- "@svgr/webpack": "^6.5.1",
- "eslint-config": "^0.3.0",
- "next": "^13.0.6",
- "react": "^18.2.0",
- "react-dom": "^18.2.0",
- "react-is": "^18.2.0",
- "sharp": "^0.31.2",
- "styled-components": "^5.3.6",
- "swr": "^1.3.0"
- },
- "devDependencies": {
- "@types/cookie": "^0.5.1",
- "@types/dockerode": "^3.3.14",
- "@types/react": "^18.0.14",
- "@types/styled-components": "^5.1.26",
- "eslint": "^8.23.1",
- "eslint-config-next": "12.2.0",
- "typescript": "^4.7.4"
- }
+ "name": "main-site",
+ "version": "0.0.1",
+ "private": true,
+ "scripts": {
+ "dev": "vite dev",
+ "build": "vite build",
+ "preview": "vite preview",
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
+ "lint": "prettier --check . && eslint .",
+ "format": "prettier --write .",
+ "ui": "npx shadcn-svelte@latest"
+ },
+ "devDependencies": {
+ "@sveltejs/adapter-auto": "^3.0.0",
+ "@sveltejs/kit": "^2.0.0",
+ "@sveltejs/vite-plugin-svelte": "^3.0.0",
+ "@types/eslint": "8.56.0",
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
+ "@typescript-eslint/parser": "^6.0.0",
+ "autoprefixer": "^10.4.16",
+ "eslint": "^8.56.0",
+ "eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-svelte": "^2.35.1",
+ "postcss": "^8.4.32",
+ "postcss-load-config": "^5.0.2",
+ "prettier": "^3.1.1",
+ "prettier-plugin-svelte": "^3.1.2",
+ "prettier-plugin-tailwindcss": "^0.5.9",
+ "svelte": "^5.0.0-next.1",
+ "svelte-check": "^3.6.0",
+ "tailwindcss": "^3.3.6",
+ "tslib": "^2.4.1",
+ "typescript": "^5.0.0",
+ "vite": "^5.0.3"
+ },
+ "type": "module",
+ "dependencies": {
+ "bits-ui": "^0.13.0",
+ "clsx": "^2.1.0",
+ "radix-icons-svelte": "^1.2.1",
+ "tailwind-merge": "^2.2.0",
+ "tailwind-variants": "^0.1.19"
+ }
}
diff --git a/pages/_app.tsx b/pages/_app.tsx
deleted file mode 100644
index 52c9c34..0000000
--- a/pages/_app.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import '/styles/globals.css'
-import { Fragment, ReactElement, ReactNode } from 'react'
-import Layout from '../components/layout'
-import type { NextPage } from 'next'
-import { AppProps } from 'next/app';
-import { DefaultTheme, ThemeProvider } from 'styled-components';
-import { createContext, useContext, useEffect, useState } from 'react'
-import { darkTheme, GlobalStyle } from '../components/themes';
-import { getTheme } from '../components/themeselector';
-import Themes from '../public/data/themes.json';
-
-export type NextPageWithLayout = NextPage
& {
- getLayout?: (page: ReactElement) => ReactNode
-}
-
-export type AppPropsWithLayout = AppProps & {
- Component: NextPageWithLayout
-}
-
-export const ThemeUpdateContext = createContext(
- (theme: DefaultTheme) => console.error("attempted to set theme outside of a ThemeUpdateContext.Provider")
-)
-
-export const useUpdateTheme = () => useContext(ThemeUpdateContext);
-
-
-export default function Website({ Component, pageProps }: AppPropsWithLayout) {
- const loadedThemes = Themes.themes;
- const [selectedTheme, setselectedTheme] = useState(darkTheme);
- const [themes, setThemes] = useState(loadedThemes);
-
-
- useEffect(() => {
- const storedThemeIdTemp = localStorage.getItem("theme");
- // get stored theme data
- // if theme data differs set it
- // if not just exit
- if (storedThemeIdTemp && parseInt(storedThemeIdTemp) !== selectedTheme.themeId) {
- setselectedTheme(getTheme(parseInt(storedThemeIdTemp), themes))
- }
- }, [selectedTheme, themes])
-
- // Use the layout defined at the page level, if available
- const getLayout = Component.getLayout ?? ((page) => (
- {page}))
-
- return (
-
-
-
-
- {getLayout()}
-
-
-
-
- )
-}
diff --git a/pages/_document.tsx b/pages/_document.tsx
deleted file mode 100644
index 2acf6be..0000000
--- a/pages/_document.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Html, Head, Main, NextScript } from 'next/document'
-import { StyledBody } from '../components/styles/generic'
-
-
-export default function Document() {
- return (
-
-
-