Compare commits

..

103 commits

Author SHA1 Message Date
35f16b9d09 Merge pull request 'Bump forgejo-release to v2' (#50) from actions-update into main
All checks were successful
Run Tests on Code / test (push) Successful in 23s
Reviewed-on: https://forgejo.neshweb.net///Neshweb-Sites/main-site/pulls/50
2024-08-06 17:31:41 +00:00
8d84391acc Bump forgejo-release to v2
Some checks failed
Run Tests on Code / test (push) Successful in 49s
Build Docker Image on Pull Request / test (pull_request) Failing after 3m27s
2024-08-06 17:03:06 +00:00
a897e5bb03
Prettier Linting
All checks were successful
Run Tests on Code / test (push) Successful in 3m46s
2024-08-06 19:02:16 +02:00
6ac9e68827
Version Info in Footer; Various formatting fixes; Removed WS debugging; Removed Gitlab from Services
Some checks failed
Run Tests on Code / test (push) Failing after 30s
2024-07-31 22:31:52 +02:00
8392c7885d
Release 1.0.0
All checks were successful
Run Tests on Code / test (push) Successful in 21s
Build and Release Docker Image / test (push) Successful in 4m55s
Build and Release Docker Image / build (push) Successful in 1m27s
Build and Release Docker Image / release (push) Successful in 1m14s
2024-01-06 15:12:49 +01:00
b0fc76ccdf Merge pull request 'Rewrite page in Svelte 5' (#49) from rewrite/svelte into main
All checks were successful
Run Tests on Code / test (push) Successful in 21s
Reviewed-on: #49
2024-01-06 14:12:09 +00:00
ea8e759f6a
Prettier linting
All checks were successful
Run Tests on Code / test (push) Successful in 25s
Build Docker Image on Pull Request / test (pull_request) Successful in 3m26s
2024-01-06 15:03:39 +01:00
23bd323bf8
Edit About page contents 2024-01-06 15:03:39 +01:00
b36c2bc082
Release Candidate 1.0.0-rc.7 2024-01-06 15:03:39 +01:00
9eb15db026
Cosmetic Fixes 2024-01-06 15:03:39 +01:00
528055fca0
Fix Pull Request CI comparing Tag against package.json 2024-01-06 15:03:39 +01:00
9aa8ca05f4
Release Candidate 1.0.0-rc.6 2024-01-06 15:03:39 +01:00
a4806e13ea
Prettier Linting 2024-01-06 15:03:39 +01:00
3734b89970
Added sanitize-html to prevent XSS attacks on Mastodon Feed 2024-01-06 15:03:39 +01:00
7ba92af617
Add Mastodon Feed to Home Page + Mastodon Embed component + Adjust Muted color 2024-01-06 15:03:39 +01:00
ff8448a561
Cleaned About page by moving CSS test to separate route 2024-01-06 15:03:39 +01:00
678fbb76bd
Add content to Home Page 2024-01-06 15:03:39 +01:00
4ce3e29f57
Optimize Socket.io connections for fewer open requests at any one time 2024-01-06 15:03:39 +01:00
2d74a1eb89
Extend services list 2024-01-06 15:03:39 +01:00
0f50c43782
Adjust ServerCard for usage with Server list 2024-01-06 15:03:39 +01:00
c715471a9a
Remove erroneous connection details from read or not 2024-01-06 15:03:39 +01:00
d6dac5a2b8
Version bump 2024-01-06 15:03:39 +01:00
5ffb5f95f7
Release Candidate 1.0.0-rc.5 2024-01-06 15:03:39 +01:00
3525fdfcd1
Linting changes 2024-01-06 15:03:39 +01:00
abea3f1be9
Add initial /servers route 2024-01-06 15:03:39 +01:00
99679cc45b
Close Socket.io connection after fetching data on server 2024-01-06 15:03:39 +01:00
d150c6cdba
Including Version number on about page 2024-01-06 15:03:39 +01:00
d774bb169b
CSS tests on about page 2024-01-06 15:03:39 +01:00
6670dc4430
reduce box size for pages, reducing need for manual overrides in page components 2024-01-06 15:03:39 +01:00
c71684b7d9
Simplify css 2024-01-06 15:03:39 +01:00
7632941962
Reduce need for css overrides by rearanging values in pcss 2024-01-06 15:03:39 +01:00
f78e7ce6e1
linting changes 2024-01-06 15:03:39 +01:00
7ae357cf2f
this belongs to e67c19d688 2024-01-06 15:03:39 +01:00
3b017673b3
Return token promise instead of token, speeds up page loading a lot 2024-01-06 15:03:39 +01:00
fbe9f89c0f
remove debug logging 2024-01-06 15:03:39 +01:00
d9e0bae305
Fix display issues 2024-01-06 15:03:39 +01:00
85a722e160
Release Candidate 1.0.0-rc.4 2024-01-06 15:03:39 +01:00
9357cd84d5
Apply env var approach to CI and Dockerfile 2024-01-06 15:03:39 +01:00
1872b42d5d
Use env vars instead of file contents (also allows for easier ci testing) 2024-01-06 15:03:39 +01:00
e6cbae1bd6
Fix Syntax Error 2024-01-06 15:03:39 +01:00
536e7e6588
Restart Server after first lighthouse run if it crashed or closed 2024-01-06 15:03:37 +01:00
84f45fa16a
Fix crash on /services page when credentials file not present 2024-01-06 15:03:34 +01:00
9b476c6478
Release Candidate 1.0.0-rc.3 2024-01-06 15:03:34 +01:00
8e4bf3b409
linting changes 2024-01-06 15:03:34 +01:00
98e9a21f92
Add socket.io to package.json 2024-01-06 15:03:34 +01:00
3c1938af80
Integrate with Uptime Kuma Socket.io API 2024-01-06 15:03:34 +01:00
4523de1217
Add credentials.json to gitignore 2024-01-06 15:03:34 +01:00
2f02f7cabb
Split up Unlighthouse Runs + Build Site in release test step + fix pull request actions 2024-01-06 15:03:34 +01:00
a819351b26
Fix --no-sandbox export 2024-01-06 15:03:33 +01:00
98c015856f
Verbose export of --no-sandbox flag 2024-01-06 15:03:33 +01:00
1dee471ea5
Add Chromium --no-sandbox flag 2024-01-06 15:03:31 +01:00
af2762028b
Add urls to unlighthouse config 2024-01-06 15:03:30 +01:00
45f39399fe
Fix bash process spawning 2024-01-06 15:03:30 +01:00
71b981e036
Start server for unlighthouse in dev mode 2024-01-06 15:03:27 +01:00
ed9eadd31d
Revert 1263f7b984 2024-01-06 15:03:22 +01:00
f5d8ae4a46
Add apt update to dependency install step 2024-01-06 15:03:20 +01:00
a5381c5ba2
Correct apt package from chromium to chromium-browser 2024-01-06 15:03:18 +01:00
73ccdf5cac
Fix apt install step 2024-01-06 15:03:16 +01:00
b510f2c576
Add chromium dependency to Unlighthouse install step 2024-01-06 15:03:15 +01:00
5bd01c3a22
Prettier Changes 2024-01-06 15:03:12 +01:00
829e911674
Release Candidate 1.0.0-rc.2 2024-01-06 15:03:12 +01:00
8cadf96116
Add unlighthouse to Release + Pull Request Actions, Add Unlighthouse config file 2024-01-06 15:03:12 +01:00
ab0346b95c
Add title and description to placeholder pages 2024-01-06 15:03:09 +01:00
b1a2471841
Add Skeleton UI component from shadcn 2024-01-06 15:03:09 +01:00
b685f5e771
Apply renaming of Card -> ServiceCard to the services page 2024-01-06 15:03:09 +01:00
0a22ba5e08
Rename Card to ServiceCard. Add proper icon handling 2024-01-06 15:03:09 +01:00
0eb25708a0
Dynamically fetch list of icons and services and pass both to the ServiceCard 2024-01-06 15:03:09 +01:00
225b120ea0
Split pages.json to severs.json and services.json, move to /static/data/ 2024-01-06 15:03:09 +01:00
7f25f40fe6
API endpoint returning /data/services.json 2024-01-06 15:03:09 +01:00
ee5d6e947a
API endpoint listing all icons in icons directory 2024-01-06 15:03:09 +01:00
08282e07f0
Add IconType enum, make Service fields readonly 2024-01-06 15:03:09 +01:00
097d2e9e5e
Add separate -36 variants for 36px avifs 2024-01-06 15:03:09 +01:00
803aa95feb
Add unlighthouse to gitignore 2024-01-06 15:03:09 +01:00
c451e92745
Add .idea directory to gitignore, add pages for About and Servers 2024-01-06 15:03:09 +01:00
f05b68f820
Remove dummy data on Home page 2024-01-06 15:03:09 +01:00
159c78f9cc
USe node:20-bookworm for faster Actions 2024-01-06 15:03:05 +01:00
b2afbe35ec
Fix Dockerfile 2024-01-06 15:03:05 +01:00
74ab3328d2
Add correct type to Card prop 2024-01-06 15:02:54 +01:00
6ae4141b8c
Remove Eslint from linting job due to likely incompat with Svelte 5 2024-01-06 15:02:54 +01:00
3d31710c3f
Add service type 2024-01-06 15:02:54 +01:00
8aa858a49e
Prettier overwritten changes revert + eslint ignore ui components 2024-01-06 15:02:54 +01:00
eeaeca1006
Prettier changes 2024-01-06 15:02:54 +01:00
d99d508bd6
only check src directory 2024-01-06 15:02:54 +01:00
d9f6f2d0be
Release Candidate 1.0.0-rc.1 2024-01-06 15:02:54 +01:00
256f432c22
Add AGPLv3 License 2024-01-06 15:02:52 +01:00
3d87538aea
Add accessibility fields 2024-01-06 15:02:52 +01:00
090b97a3f6
Use avif instead of png/jpg 2024-01-06 15:02:52 +01:00
bfd9dcaa7d
Add Link Icon to card 2024-01-06 15:02:52 +01:00
6c2f29afa6
Added services page with unfinished service card element 2024-01-06 15:02:52 +01:00
0d1f4cd766
Switched port to 8000 2024-01-06 15:02:52 +01:00
7ec403841b
Added colors to tailwind config 2024-01-06 15:02:52 +01:00
be892d00c1
Adjusted pending color 2024-01-06 15:02:52 +01:00
bd0b102d02
Update gitignore 2024-01-06 15:02:51 +01:00
60710322b8
Delete config templates 2024-01-06 15:02:51 +01:00
c7317324ab
Add Navbar using shadcn Button 2024-01-06 15:02:51 +01:00
e4607afd22
Add postcss/tailwind/shadcn 2024-01-06 15:02:51 +01:00
0292f34504
Move icons to svelte ordering 2024-01-06 15:02:51 +01:00
3cd2a0f5af
Add Svelte 5/SvelteKit 2 2024-01-06 15:02:51 +01:00
04a1cd1580
Remove next.js 2024-01-06 15:02:51 +01:00
0824de8df1
Adopt Actions changes from other repos 2024-01-06 15:02:51 +01:00
d2206cbb72
Update build Action to resolve merge conflict with svelte rewrite branch
Some checks failed
Run Tests on Code / test (push) Has been cancelled
2024-01-06 15:01:32 +01:00
64632df708
Adjust build actions indenting
Some checks failed
Run Tests on Code / test (push) Has been cancelled
2024-01-06 14:51:57 +01:00
622c8539fe Update .forgejo/workflows/build+release.yml
All checks were successful
Run Tests on Code / test (push) Successful in 1m31s
2023-12-20 21:27:35 +00:00
29 changed files with 976 additions and 128 deletions

View file

@ -125,7 +125,7 @@ jobs:
runs-on: docker runs-on: docker
steps: steps:
- name: Release New Version - name: Release New Version
uses: actions/forgejo-release@v1 uses: actions/forgejo-release@v2
with: with:
direction: upload direction: upload
url: https://forgejo.neshweb.net url: https://forgejo.neshweb.net

View file

@ -44,17 +44,6 @@ jobs:
- name: Run Linter - name: Run Linter
run: yarn lint run: yarn lint
- name: Check if Version in package.json matches Tag
run: |
echo "Test"
VERSION=$(cat package.json | grep "version" | sed 's/.*://' | tr -d , | tr -d \" )
if test $VERSION != "${{ github.ref_name }}"; then
echo "Expected Version is: '${{ github.ref_name }}' actual Version is: '$VERSION'";
exit 1
else
echo "Version is: '$VERSION'";
fi
- name: Build Site - name: Build Site
run: yarn build run: yarn build

View file

@ -2,7 +2,7 @@
"name": "main-site", "name": "main-site",
"author": "Neshura", "author": "Neshura",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"version": "1.0.0-rc.4", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",
@ -41,9 +41,10 @@
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"bits-ui": "^0.13.0", "bits-ui": "^0.13.2",
"clsx": "^2.1.0", "clsx": "^2.1.0",
"radix-icons-svelte": "^1.2.1", "radix-icons-svelte": "^1.2.1",
"sanitize-html": "^2.11.0",
"socket.io": "^4.7.2", "socket.io": "^4.7.2",
"socket.io-client": "^4.7.2", "socket.io-client": "^4.7.2",
"tailwind-merge": "^2.2.0", "tailwind-merge": "^2.2.0",

View file

@ -69,9 +69,9 @@
.nordlys { .nordlys {
--background: 0 0% 0%; /* #000000 */ --background: 0 0% 0%; /* #000000 */
--foreground: 173 80% 40%; /* #14b8a6 */ --foreground: 183 100% 96%; /* #14b8a6 */
--muted: 183 100% 96%; /* #ecfeff */ --muted: 180 10% 66%; /* #ecfeff */
--muted-foreground: 176 61% 19%; /* #134e4a */ --muted-foreground: 176 61% 19%; /* #134e4a */
--popover: 0 0% 0%; /* #000000 */ --popover: 0 0% 0%; /* #000000 */
@ -83,10 +83,10 @@
--border: 183 100% 96%; /* #ecfeff */ --border: 183 100% 96%; /* #ecfeff */
--input: 183 100% 96%; /* #ecfeff */ --input: 183 100% 96%; /* #ecfeff */
--primary: 173 80% 40%; /* #14b8a6 */ --primary: 183 100% 96%; /* #14b8a6 */
--primary-foreground: 221 39% 11%; /* #111827 */ --primary-foreground: 221 39% 11%; /* #111827 */
--secondary: 183 100% 96%; /* #ecfeff */ --secondary: 173 80% 40%; /* #ecfeff */
--secondary-foreground: 173 80% 40%; /* #14b8a6 */ --secondary-foreground: 173 80% 40%; /* #14b8a6 */
--accent: 183 100% 96%; /* #ecfeff */ --accent: 183 100% 96%; /* #ecfeff */

View file

@ -0,0 +1,193 @@
<svelte:options runes={true} />
<script lang="ts">
import { onMount } from 'svelte';
import sanitizeHtml from 'sanitize-html';
import { Skeleton } from '$lib/components/ui/skeleton/index.js';
import { DoubleArrowUp } from 'radix-icons-svelte';
let {
account,
maxToots,
accountId,
excludeReplies
}: { account: string; maxToots?: number; accountId?: string; excludeReplies: boolean } = $props();
let toots: Toot[] = $state([]);
let loading = $state(false);
onMount(() => {
loading = true;
loadToots(account, accountId, maxToots, excludeReplies);
});
interface Toot {
created_at: string;
in_reply_to_id: string | null;
content: string;
url: string;
account: {
username: string;
display_name: string;
avatar: string;
url: string;
};
reblog?: Toot;
media_attachments: {
type: 'unknown' | 'image' | 'gifv' | 'video' | 'audio';
url: string;
preview_url: string;
description: string;
blurhash: string;
}[];
}
export async function getToots(
userURL: string,
limit: number,
excludeReplies: boolean,
accountId?: string
): Promise<Toot[]> {
const url = new URL(userURL);
// Either use the account id specified or look it up based on the username
// in the link.
const userId: string =
accountId ??
(await (async () => {
// Extract username from URL.
const parts = /@(\w+)$/.exec(url.pathname);
if (!parts) {
throw 'not a Mastodon user URL';
}
const username = parts[1];
// Look up user ID from username.
const lookupURL = Object.assign(new URL(url), {
pathname: '/api/v1/accounts/lookup',
search: `?acct=${username}`
});
return (await (await fetch(lookupURL)).json())['id'];
})());
// Fetch toots.
const tootURL = Object.assign(new URL(url), {
pathname: `/api/v1/accounts/${userId}/statuses`,
search: `?limit=${limit ?? 5}&exclude_replies=${!!excludeReplies}`
});
return await (await fetch(tootURL)).json();
}
function loadToots() {
getToots(account, maxToots ?? 5, excludeReplies === true, accountId).then((data) => {
toots = data;
loading = false;
});
}
</script>
{#snippet avatar(toot)}
<a class="flex flex-row gap-2" href={toot.account.url}>
<img
class="rounded-md"
width="48px"
height="48px"
src={toot.account.avatar}
alt="{toot.account.username} avatar"
/>
<div class="flex flex-col items-start">
<span class="h-6 font-bold hover:underline">{toot.account.display_name}</span>
<span class="h-4 text-sm text-muted">@{toot.account.username}</span>
</div>
</a>
{/snippet}
{#snippet body(toot)}
<div>
<div class="[&>p>span>a]:hover:underline">
{@html sanitizeHtml(toot.content)}
</div>
{#each toot.media_attachments.filter((att) => att.type === 'image') as image}
<a
class="block aspect-16/9 w-full overflow-hidden rounded-md"
href={image.url}
target="_blank"
rel="noopener noreferrer"
>
<img class="h-full w-full object-cover" src={image.preview_url} alt={image.description} />
</a>
{/each}
</div>
{/snippet}
<ol class="h-[40rem] w-full overflow-y-auto">
{#if loading}
{#each Array(maxToots ?? 5) as placeholder}
<li class="flex flex-col gap-3 px-4 py-3">
<div class="flex flex-row justify-between">
<div class="flex flex-row gap-2">
<Skeleton class="h-12 w-12 rounded-md" />
<div class="flex flex-col items-start gap-1">
<Skeleton class="h-6 w-24"></Skeleton>
<Skeleton class="h-4 w-20"></Skeleton>
</div>
</div>
<Skeleton class="h-10 w-16" />
</div>
<Skeleton class="h-36 w-full"></Skeleton>
</li>
{/each}
{:else}
{#each toots as toot}
<li class="flex flex-col gap-3 px-4 py-3">
{#if toot.reblog}
<div class="flex flex-row justify-between">
<div class="flex flex-col gap-1">
<a class="flex flex-row items-center gap-1" href={toot.account.url}>
<DoubleArrowUp />
<img
class="rounded-md"
width="23px"
height="23px"
src={toot.account.avatar}
alt="{toot.account.username} avatar"
/>
<span class="h-6 font-bold hover:underline">{toot.account.display_name}</span>
</a>
{@render avatar(toot.reblog)}
</div>
<a
class="flex flex-col items-center text-sm text-muted hover:underline"
href={toot.url}
>
<time datetime={toot.created_at}>
{new Date(toot.created_at).toLocaleDateString()}
</time>
<time datetime={toot.created_at}>
{new Date(toot.created_at).toLocaleTimeString()}
</time>
</a>
</div>
{@render body(toot.reblog)}
{:else}
<div class="flex flex-row justify-between">
{@render avatar(toot)}
<a
class="flex flex-col items-center text-sm text-muted hover:underline"
href={toot.url}
>
<time datetime={toot.created_at}>
{new Date(toot.created_at).toLocaleDateString()}
</time>
<time datetime={toot.created_at}>
{new Date(toot.created_at).toLocaleTimeString()}
</time>
</a>
</div>
{@render body(toot)}
{/if}
</li>
{/each}
{/if}
</ol>

View file

@ -0,0 +1,212 @@
<svelte:options runes={true} />
<script lang="ts">
import { Clipboard, Copy, OpenInNewWindow } from 'radix-icons-svelte';
import { quintInOut } from 'svelte/easing';
import { slide } from 'svelte/transition';
import { IconType, type Server } from '$lib/types/data-types';
import { Skeleton } from '$lib/components/ui/skeleton';
import type { Heartbeat } from '$lib/types/uptime-kuma-types';
import { Button } from '$lib/components/ui/button';
let { server, icons, monitor } = $props<{
server: Server;
icons: Array<string>;
monitor?: Heartbeat;
}>();
let status = $state(4);
let hover = $state({
title: false,
link: false,
ext: false
});
let img_source: string = $state('');
function copyToClipboard(value: string) {
navigator.clipboard.writeText(value);
}
function checkForImage(server: Server) {
const rootSplit = server.icon.split('/');
const root = rootSplit[rootSplit.length - 1];
if (icons.includes(`${root}.${server.iconType}`)) {
img_source = `${server.icon}.${server.iconType}`;
} else {
img_source = '';
}
}
$effect(() => {
if (typeof server.id === 'undefined') {
status = 99;
}
if (typeof monitor !== 'undefined') {
status = monitor.status;
}
if (icons.length != 0 && typeof server.icon !== 'undefined') {
const rootSplit = server.icon.split('/');
const root = rootSplit[rootSplit.length - 1];
if (server.iconType === IconType.SVG) {
checkForImage(server);
} else {
if (icons.includes(`${root}-36.${server.iconType}`)) {
img_source = `${server.icon}-36.${server.iconType}`;
} else {
checkForImage(server);
}
}
}
});
</script>
<div
class="flex h-48 w-[28rem] flex-col gap-y-3 rounded-xl border-t-4
{status == 99
? 'border-primary'
: status == 0
? 'border-offline'
: status == 1
? 'border-online'
: status == 2
? 'border-pending'
: status == 3
? 'border-maintenance'
: 'border-maintenance'}
z-0 bg-black/55 p-4 backdrop-blur-sm"
>
<div class="flex flex-row justify-between">
<div
class="flex flex-row items-center gap-1"
on:mouseover={() => (hover.title = true)}
on:mouseleave={() => (hover.title = false)}
>
{#if typeof server.icon !== 'undefined'}
{#if img_source != ''}
<img
width="24px"
class="h-6 w-6 cursor-pointer"
src={img_source}
alt="{server.name} Logo"
/>
{:else}
<Skeleton class="h-6 w-6 rounded-full" />
{/if}
{:else}{/if}
{#if typeof server.href !== 'undefined'}
<a href={server.href} class="font-bold {!hover.title || 'text-secondary'}">{server.name}</a>
{#if hover.title}
<div
transition:slide={{ delay: 100, duration: 200, easing: quintInOut, axis: 'x' }}
class="grid items-center"
>
<OpenInNewWindow
color={hover.title ? 'hsl(var(--secondary))' : 'hsl(var(--primary)'}
class="self-center"
/>
</div>
{/if}
{:else}
<h2 class="font-bold">{server.name}</h2>
{/if}
</div>
{#if typeof server.id !== 'undefined'}
<h1
class="w-16 rounded-md border-b-2
{status == 0
? 'border-offline'
: status == 1
? 'border-online'
: status == 2
? 'border-pending'
: status == 3
? 'border-maintenance'
: 'border-maintenance'}
text-center text-sm
{status == 0
? 'text-offline'
: status == 1
? 'text-online'
: status == 2
? 'text-pending'
: status == 3
? 'text-maintenance'
: 'text-maintenance'}"
>
{status == 0
? 'Offline'
: status == 1
? 'Online'
: status == 2
? 'Pending'
: status == 3
? 'Maint.'
: 'Loading'}
</h1>
{/if}
</div>
<p class="text-wrap text-center text-sm">{server.desc}</p>
{#if typeof server.connection !== 'undefined'}
<div class="flex w-full flex-col items-center">
<Button
variant="ghost"
class=" flex w-fit flex-row items-center gap-1 rounded-sm border px-2 py-1 text-center font-mono text-sm font-bold
hover:border-primary hover:bg-transparent hover:text-primary/60
active:border-secondary active:bg-black/70 active:text-secondary"
on:click={() => copyToClipboard(server.connection)}
>
{server.connection}
<Copy />
</Button>
</div>
{/if}
<div class="grid {server.extLink ? 'grid-cols-2' : 'grid-cols-1'} mt-auto justify-items-center">
{#if typeof server.href !== 'undefined'}
<a
class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary"
href={server.href}
on:mouseover={() => (hover.link = true)}
on:mouseleave={() => (hover.link = false)}
>
Open
{#if hover.link}
<div
transition:slide={{ delay: 100, duration: 200, easing: quintInOut, axis: 'x' }}
class="grid items-center pl-1 pr-0"
>
<OpenInNewWindow
color={hover.link ? 'hsl(var(--secondary))' : 'hsl(var(--primary)'}
class="self-center"
/>
</div>
{/if}
</a>
{/if}
{#if server.extLink}
<a
class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary"
href={server.extLink}
on:mouseover={() => (hover.ext = true)}
on:mouseleave={() => (hover.ext = false)}
>
Official Site
{#if hover.ext}
<div
transition:slide={{ delay: 100, duration: 200, easing: quintInOut, axis: 'x' }}
class="grid items-center pl-1 pr-0"
>
<OpenInNewWindow
color={hover.ext ? 'hsl(var(--secondary))' : 'hsl(var(--primary)'}
class="self-center"
/>
</div>
{/if}
</a>
{/if}
</div>
</div>

View file

@ -37,9 +37,6 @@
$effect(() => { $effect(() => {
if (typeof monitor !== 'undefined') { if (typeof monitor !== 'undefined') {
if (monitor.monitorID == 9) {
console.log('Vaultwarden: ', monitor.status);
}
status = monitor.status; status = monitor.status;
} }
if (icons.length != 0) { if (icons.length != 0) {
@ -60,7 +57,7 @@
</script> </script>
<div <div
class="flex h-48 w-[28rem] flex-col gap-y-2 rounded-xl border-t-4 class="flex h-48 w-[28rem] flex-col gap-y-3 rounded-xl border-t-4
{status == 0 {status == 0
? 'border-offline' ? 'border-offline'
: status == 1 : status == 1
@ -70,9 +67,9 @@
: status == 3 : status == 3
? 'border-maintenance' ? 'border-maintenance'
: 'border-maintenance'} : 'border-maintenance'}
bg-black/55 p-4" z-0 bg-black/55 p-4 backdrop-blur-sm"
> >
<div class="flex flex-row justify-between pb-4"> <div class="flex flex-row justify-between">
<div <div
class="flex flex-row items-center gap-1" class="flex flex-row items-center gap-1"
on:mouseover={() => (hover.title = true)} on:mouseover={() => (hover.title = true)}
@ -90,18 +87,14 @@
<Skeleton class="h-6 w-6 rounded-full" /> <Skeleton class="h-6 w-6 rounded-full" />
{/if} {/if}
{:else}{/if} {:else}{/if}
<a <a href={service.href} class="font-bold {!hover.title || 'text-secondary'}">{service.name}</a>
href={service.href}
class="font-bold text-accent {hover.title ? 'text-primary' : 'text-secondary'}"
>{service.name}</a
>
{#if hover.title} {#if hover.title}
<div <div
transition:slide={{ delay: 100, duration: 200, easing: quintInOut, axis: 'x' }} transition:slide={{ delay: 100, duration: 200, easing: quintInOut, axis: 'x' }}
class="grid items-center" class="grid items-center"
> >
<OpenInNewWindow <OpenInNewWindow
color={hover.title ? 'hsl(var(--primary))' : 'hsl(var(--secondary)'} color={hover.title ? 'hsl(var(--secondary))' : 'hsl(var(--primary)'}
class="self-center" class="self-center"
/> />
</div> </div>
@ -141,11 +134,11 @@
: 'Loading'} : 'Loading'}
</h1> </h1>
</div> </div>
<p class="text-wrap text-center text-sm text-accent">{service.desc}</p> <p class="text-wrap text-center text-sm">{service.desc}</p>
<p class="text-center text-sm font-bold text-destructive">{service.warn}</p> <p class="text-center text-sm font-bold text-destructive">{service.warn}</p>
<div class="grid {service.extLink ? 'grid-cols-2' : 'grid-cols-1'} mt-auto justify-items-center"> <div class="grid {service.extLink ? 'grid-cols-2' : 'grid-cols-1'} mt-auto justify-items-center">
<a <a
class="flex flex-row rounded-md border-x-2 px-2 text-sm text-accent hover:border-primary hover:text-primary" class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary"
href={service.href} href={service.href}
on:mouseover={() => (hover.link = true)} on:mouseover={() => (hover.link = true)}
on:mouseleave={() => (hover.link = false)} on:mouseleave={() => (hover.link = false)}
@ -157,7 +150,7 @@
class="grid items-center pl-1 pr-0" class="grid items-center pl-1 pr-0"
> >
<OpenInNewWindow <OpenInNewWindow
color={hover.link ? 'hsl(var(--primary))' : 'hsl(var(--secondary)'} color={hover.link ? 'hsl(var(--secondary))' : 'hsl(var(--primary)'}
class="self-center" class="self-center"
/> />
</div> </div>
@ -165,7 +158,7 @@
</a> </a>
{#if service.extLink} {#if service.extLink}
<a <a
class="flex flex-row rounded-md border-x-2 px-2 text-sm text-accent hover:border-primary hover:text-primary" class="flex flex-row rounded-md border-x-2 px-2 text-sm hover:border-secondary hover:text-secondary"
href={service.extLink} href={service.extLink}
on:mouseover={() => (hover.ext = true)} on:mouseover={() => (hover.ext = true)}
on:mouseleave={() => (hover.ext = false)} on:mouseleave={() => (hover.ext = false)}
@ -177,7 +170,7 @@
class="grid items-center pl-1 pr-0" class="grid items-center pl-1 pr-0"
> >
<OpenInNewWindow <OpenInNewWindow
color={hover.ext ? 'hsl(var(--primary))' : 'hsl(var(--secondary)'} color={hover.ext ? 'hsl(var(--secondary))' : 'hsl(var(--primary)'}
class="self-center" class="self-center"
/> />
</div> </div>

View file

@ -0,0 +1,7 @@
import Root from './separator.svelte';
export {
Root,
//
Root as Separator
};

View file

@ -0,0 +1,22 @@
<script lang="ts">
import { Separator as SeparatorPrimitive } from 'bits-ui';
import { cn } from '$lib/utils';
type $$Props = SeparatorPrimitive.Props;
let className: $$Props['class'] = undefined;
export let orientation: $$Props['orientation'] = 'horizontal';
export let decorative: $$Props['decorative'] = undefined;
export { className as class };
</script>
<SeparatorPrimitive.Root
class={cn(
'shrink-0 bg-border',
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
className
)}
{orientation}
{decorative}
{...$$restProps}
/>

View file

@ -0,0 +1,4 @@
import { writable } from 'svelte/store';
import { io } from 'socket.io-client';
export let socketStore = writable(io('https://status.neshweb.net/'));

View file

@ -0,0 +1,4 @@
import { type Writable, writable } from 'svelte/store';
import type { Heartbeat } from '$lib/types/uptime-kuma-types';
export let uptimeStore: Writable<Map<number, Heartbeat>> = writable(new Map());

View file

@ -1,7 +1,7 @@
export type Service = { export type Service = {
readonly name: string; readonly name: string;
readonly icon: string; readonly icon?: string;
readonly iconType: IconType; readonly iconType?: IconType;
readonly href: string; readonly href: string;
readonly desc: string; readonly desc: string;
readonly warn: string; readonly warn: string;
@ -9,6 +9,17 @@ export type Service = {
readonly id: number; readonly id: number;
}; };
export type Server = {
readonly name: string;
readonly icon?: string;
readonly iconType?: IconType;
readonly connection?: string;
readonly href?: string;
readonly desc?: string;
readonly extLink?: string;
readonly id?: number;
};
export enum IconType { export enum IconType {
SVG = 'svg', SVG = 'svg',
AVIF = 'avif', AVIF = 'avif',

View file

@ -1,7 +1,29 @@
<svelte:options runes={true} />
<script> <script>
import '../app.pcss'; import '../app.pcss';
import Header from './Header.svelte'; import Header from './Header.svelte';
import { socketStore } from '$lib/stores/socketStore';
import { beforeNavigate } from '$app/navigation';
import Footer from './Footer.svelte';
$effect(() => {
beforeNavigate((navigation) => {
const servers =
navigation.to.url.pathname === '/servers' || navigation.from.url.pathname === '/servers';
const services =
navigation.to.url.pathname === '/services' || navigation.from.url.pathname === '/services';
if (!(servers && services)) {
$socketStore.close();
}
});
});
</script> </script>
<Header /> <Header />
<div class="h-full pb-8 pt-16">
<slot /> <slot />
</div>
<Footer />

View file

@ -1,8 +1,65 @@
<script lang="ts">
import { Separator } from '$lib/components/ui/separator';
import { OpenInNewWindow } from 'radix-icons-svelte';
import Emfed from '$lib/components/Emfed.svelte';
</script>
<svelte:head> <svelte:head>
<title>Home</title> <title>Home</title>
<meta name="description" content="Landing Page for neshweb.net" /> <meta name="description" content="Landing Page for neshweb.net" />
</svelte:head> </svelte:head>
<div class="h-full overflow-auto"> <div
<h1>Home Page</h1> class="flex max-h-full flex-row flex-wrap justify-center justify-around gap-4 overflow-auto p-8"
>
<div class="flex w-[22rem] flex-1 flex-col items-center">
<div class="flex flex-col gap-y-2 rounded-xl border bg-black/55 p-4 backdrop-blur-sm">
<h1 class="text-center text-2xl">Home Page</h1>
<p>
I'm not sure what to put here quite yet, maybe I'll think of something eventually. In the
meantime I've linked some of my accounts in the sidebar to the right
</p>
</div>
</div>
<div
class="flex w-[22rem] flex-col items-center gap-y-1 overflow-auto rounded-xl border bg-black/55 py-1 backdrop-blur-sm"
>
<p class="font-bold">Fediverse Accounts</p>
<Separator class="max-w-80" />
<a
rel="me"
href="https://mastodon.neshweb.net/@neshura"
target="_blank"
class="flex flex-row items-center gap-1 hover:text-secondary"
>
Mastodon
<OpenInNewWindow />
</a>
<a
rel="noopener noreferrer"
href="https://bookwormstory.social/u/Neshura"
target="_blank"
class="flex flex-row items-center gap-1 hover:text-secondary"
>
Lemmy
<OpenInNewWindow />
</a>
<a
rel="noopener noreferrer"
href="https://neshweb.tv/c/neshura_ch/videos"
target="_blank"
class="flex flex-row items-center gap-1 hover:text-secondary"
>
PeerTube
<OpenInNewWindow />
</a>
<Separator class="max-w-80" />
<p class="font-bold">Mastodon Feed</p>
<Separator class="max-w-80" />
<Emfed
account="https://mastodon.neshweb.net/@neshura"
maxToots={4}
accountId="109199738141333007"
/>
</div>
</div> </div>

17
src/routes/Footer.svelte Normal file
View file

@ -0,0 +1,17 @@
<script lang="ts">
import { version } from '$app/environment';
</script>
<div
class="absolute bottom-0 z-50 flex h-8 w-full flex-row items-center gap-3 border-t bg-black/40 backdrop-blur-sm"
>
<p class="px-4">
Version:
<a
href="https://forgejo.neshweb.net/Neshweb-Sites/main-site/releases/tag/{version}"
class="text-secondary hover:underline"
>
{version}
</a>
</p>
</div>

View file

@ -2,19 +2,17 @@
import { page } from '$app/stores'; import { page } from '$app/stores';
import { Button } from '$lib/components/ui/button'; import { Button } from '$lib/components/ui/button';
const button = 'border-t-2 bg-black/55 hover:bg-black/70 hover:border-primary w-28'; const button = 'border-t-2 bg-black/55 hover:bg-black/70 hover:border-secondary w-28';
</script> </script>
<ul <ul
class="sticky flex h-16 w-full flex-row items-center justify-center gap-3 border-b bg-black/40 backdrop-blur-sm" class="absolute z-50 flex h-16 w-full flex-row items-center gap-3 overflow-x-auto border-b bg-black/40 backdrop-blur-sm"
> >
<li> <li class="ml-auto">
<Button <Button
variant="ghost" variant="ghost"
href="/" href="/"
class="{button} + {$page.url.pathname === '/' class="{button} + {!($page.url.pathname === '/') || 'border-secondary text-secondary'}"
? 'border-primary text-primary'
: 'text-accent'}"
> >
Home Home
</Button> </Button>
@ -23,9 +21,8 @@
<Button <Button
variant="ghost" variant="ghost"
href="/servers" href="/servers"
class="{button} + {$page.url.pathname.startsWith('/servers') class="{button} + {!$page.url.pathname.startsWith('/servers') ||
? 'border-primary text-primary' 'border-secondary text-secondary'}"
: 'text-accent'}"
> >
Servers Servers
</Button> </Button>
@ -34,20 +31,18 @@
<Button <Button
variant="ghost" variant="ghost"
href="/services" href="/services"
class="{button} + {$page.url.pathname.startsWith('/services') class="{button} + {!$page.url.pathname.startsWith('/services') ||
? 'border-primary text-primary' 'border-secondary text-secondary'}"
: 'text-accent'}"
> >
Services Services
</Button> </Button>
</li> </li>
<li> <li class="mr-auto">
<Button <Button
variant="ghost" variant="ghost"
href="/about" href="/about"
class="{button} + {$page.url.pathname.startsWith('/about') class="{button} + {!$page.url.pathname.startsWith('/about') ||
? 'border-primary text-primary' 'border-secondary text-secondary'}"
: 'text-accent'}"
> >
About About
</Button> </Button>

View file

@ -2,3 +2,10 @@
<title>About</title> <title>About</title>
<meta name="description" content="Information about this Website" /> <meta name="description" content="Information about this Website" />
</svelte:head> </svelte:head>
<div class="flex max-h-full flex-row flex-wrap justify-center gap-10 overflow-auto p-8">
<p>
This is just a small Website I built to organize all of the Services I am self-hosting. Maybe
I'll eventually add something actually useful to the site but until then this is all you'll get.
</p>
</div>

View file

@ -0,0 +1,29 @@
<svelte:head>
<title>CSS Test</title>
<meta name="description" content="CSS playground" />
</svelte:head>
<p class="text-background">Background</p>
<p class="text-foreground">Foreground</p>
<p class="text-muted">Muted</p>
<p class="text-muted-foreground">Muted Foreground</p>
<p class="text-popover">Popover</p>
<p class="text-popover-foreground">Popover Foreground</p>
<p class="text-card">card</p>
<p class="text-card-foreground">card-foreground</p>
<p class="text-border">border</p>
<p class="text-input">input</p>
<p class="text-primary">Primary</p>
<p class="text-primary-foreground">primary-foreground</p>
<p class="text-secondary">secondary</p>
<p class="text-secondary-foreground">secondary-foreground</p>
<p class="text-accent">accent</p>
<p class="text-secondary-foreground">secondary-foreground</p>
<p class="text-accent">accent</p>
<p class="text-accent-foreground">accent-foreground</p>
<p class="text-destructive">destructive</p>
<p class="text-destructive-foreground">destructive-foreground</p>
<p class="text-offline">offline</p>
<p class="text-online">online</p>
<p class="text-pending">pending</p>
<p class="text-maintenance">maintenance</p>

View file

@ -0,0 +1,10 @@
import * as fs from 'fs';
import { json } from '@sveltejs/kit';
export function GET() {
const content = fs.readFileSync('static/data/servers.json').toString();
const data = JSON.parse(content);
return json(data);
}

View file

@ -4,7 +4,7 @@ import { json } from '@sveltejs/kit';
export function GET() { 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); const data = JSON.parse(content);
return json(data); return json(data);
} }

View file

@ -0,0 +1,62 @@
import { io, Socket } from 'socket.io-client';
import * as fs from 'fs';
export async function load() {
const promise = getJwt();
return {
promise
};
}
async function getJwt(): Promise<string> {
const socket = io('https://status.neshweb.net/');
const credFile = './credentials.json';
let token = '';
let valid = false;
if (fs.existsSync(credFile)) {
const content = fs.readFileSync(credFile);
token = content.toString();
}
socket.on('connect', async () => {
if (token == '') {
token = await login(socket);
valid = true;
} else {
socket.emit('loginByToken', token, async (res) => {
if (!res.ok) {
token = await login(socket);
}
valid = true;
});
}
});
while (!valid) {
await new Promise((resolve) => setTimeout(resolve, 10));
}
fs.writeFileSync(credFile, token);
return token;
}
async function login(socket: Socket): Promise<string> {
let token = '';
socket.emit(
'login',
{ username: process.env.KUMA_USERNAME, password: process.env.KUMA_PASSWORD, token: '' },
(res: { token: string }) => {
token = res.token;
socket.close();
}
);
while (token == '') {
await new Promise((resolve) => setTimeout(resolve, 10));
}
return token;
}

View file

@ -1,4 +1,97 @@
<svelte:options runes={true} />
<script lang="ts">
import type { Server } from '$lib/types/data-types';
import { io } from 'socket.io-client';
import type { Heartbeat } from '$lib/types/uptime-kuma-types';
import ServerCard from '$lib/components/ServerCard.svelte';
import { socketStore } from '$lib/stores/socketStore';
import { uptimeStore } from '$lib/stores/uptimeStore';
let { data }: { data: { promise: Promise<string> } } = $props();
let token = $state();
data.promise.then((jwt) => {
token = jwt;
});
let servers: readonly Server[] = $state.frozen([]);
let icons: readonly string[] = $state.frozen([]);
let monitorList = $state($uptimeStore);
let socket = $socketStore;
$effect(() => {
if (token) {
if (!socket.connected) {
socket.connect();
}
socket.on('connect', () => {
socket.emit('loginByToken', token, () => {});
});
socket.on('heartbeatList', (_, data) => {
let recent = data[data.length - 1];
let monitor: Heartbeat = {
monitorID: recent.monitor_id,
status: recent.status,
time: recent.time,
msg: recent.msg,
ping: recent.ping,
important: recent.important,
duration: recent.duration
};
monitorList.set(monitor.monitorID, monitor);
monitorList = new Map(monitorList.entries());
$uptimeStore = monitorList;
});
socket.on('heartbeat', (data) => {
monitorList.set(data.monitorID, data);
monitorList = new Map(monitorList.entries());
$uptimeStore = monitorList;
});
}
});
async function get(url: string): Promise<any> {
let res = await fetch(url);
if (res.ok) {
let data = await res.json();
return data;
} else {
return Promise.reject();
}
}
$effect(() => {
get('/data/servers').then((data: Server[]) => {
servers = data;
});
});
$effect(() => {
get('/assets/icons').then((data: string[]) => {
icons = data;
});
});
</script>
<svelte:head> <svelte:head>
<title>Servers</title> <title>Servers</title>
<meta name="description" content="Overview of Game Servers running on neshweb.net" /> <meta name="description" content="Overview of Game Servers running on neshweb.net" />
</svelte:head> </svelte:head>
<div class="flex max-h-full flex-row flex-wrap justify-center gap-10 overflow-auto p-8">
{#each servers as server}
{#if typeof server.id === 'undefined'}
<ServerCard {server} {icons} />
{:else}
<ServerCard {server} {icons} monitor={monitorList.get(server.id)} />
{/if}
{/each}
</div>

View file

@ -1,27 +1,62 @@
import { io } from 'socket.io-client'; import { io, Socket } from 'socket.io-client';
import * as fs from 'fs'; import * as fs from 'fs';
export async function load() { export async function load() {
const credFile = './credentials.json'; const promise = getJwt();
return {
promise
};
}
async function getJwt(): Promise<string> {
const socket = io('https://status.neshweb.net/'); const socket = io('https://status.neshweb.net/');
const credFile = './credentials.json';
let token = ''; let token = '';
let valid = false;
socket.on('connect', () => { if (fs.existsSync(credFile)) {
const content = fs.readFileSync(credFile);
token = content.toString();
}
socket.on('connect', async () => {
if (token == '') {
token = await login(socket);
valid = true;
} else {
socket.emit('loginByToken', token, async (res) => {
if (!res.ok) {
token = await login(socket);
}
valid = true;
});
}
});
while (!valid) {
await new Promise((resolve) => setTimeout(resolve, 10));
}
fs.writeFileSync(credFile, token);
return token;
}
async function login(socket: Socket): Promise<string> {
let token = '';
socket.emit( socket.emit(
'login', 'login',
{ username: process.env.KUMA_USERNAME, password: process.env.KUMA_PASSWORD, token: '' }, { username: process.env.KUMA_USERNAME, password: process.env.KUMA_PASSWORD, token: '' },
(res) => { (res: { token: string }) => {
token = res.token; token = res.token;
socket.close();
} }
); );
});
while (token == '') { while (token == '') {
await new Promise((resolve) => setTimeout(resolve, 10)); await new Promise((resolve) => setTimeout(resolve, 10));
} }
return { return token;
token
};
} }

View file

@ -5,33 +5,37 @@
import type { Service } from '$lib/types/data-types'; import type { Service } from '$lib/types/data-types';
import { io } from 'socket.io-client'; import { io } from 'socket.io-client';
import type { Heartbeat } from '$lib/types/uptime-kuma-types'; import type { Heartbeat } from '$lib/types/uptime-kuma-types';
import { socketStore } from '$lib/stores/socketStore';
import { onDestroy } from 'svelte';
import { uptimeStore } from '$lib/stores/uptimeStore';
let { data }: { data: { token: string } } = $props(); let { data }: { data: { promise: Promise<string> } } = $props();
$effect(() => { let token = $state();
console.log('Data:', data.token);
data.promise.then((jwt) => {
token = jwt;
}); });
let services: readonly Service[] = $state.frozen([]); let services: readonly Service[] = $state.frozen([]);
let icons: readonly string[] = $state.frozen([]); let icons: readonly string[] = $state.frozen([]);
let monitorList: Map<number, Heartbeat> = $state(new Map()); let monitorList = $state($uptimeStore);
//let token = $props(); let socket = $socketStore;
$effect(() => { $effect(() => {
if (data.token) { if (token) {
const socket = io('https://status.neshweb.net/'); if (!socket.connected) {
socket.connect();
}
socket.on('connect', () => { socket.on('connect', () => {
socket.emit('loginByToken', data.token, (res) => { socket.emit('loginByToken', token, () => {});
console.log(data.token);
console.log(res);
});
}); });
socket.on('heartbeatList', (idString: string, data) => { socket.on('heartbeatList', (_, data) => {
let recent = data[data.length - 1]; let recent = data[data.length - 1];
let monitor: Heartbeat = { let monitor: Heartbeat = {
monitorID: recent.monitor_id, monitorID: recent.monitor_id,
@ -44,11 +48,13 @@
}; };
monitorList.set(monitor.monitorID, monitor); monitorList.set(monitor.monitorID, monitor);
monitorList = new Map(monitorList.entries()); monitorList = new Map(monitorList.entries());
$uptimeStore = monitorList;
}); });
socket.on('heartbeat', (data) => { socket.on('heartbeat', (data) => {
monitorList.set(data.monitorID, data); monitorList.set(data.monitorID, data);
monitorList = new Map(monitorList.entries()); monitorList = new Map(monitorList.entries());
$uptimeStore = monitorList;
}); });
} }
}); });

View file

@ -3,8 +3,10 @@
"name": "Minecraft", "name": "Minecraft",
"icon": "/assets/icons/minecraft-logo", "icon": "/assets/icons/minecraft-logo",
"iconType": "avif", "iconType": "avif",
"connection": "minecraft.neshweb.net",
"href": "https://minecraft.neshweb.net/", "href": "https://minecraft.neshweb.net/",
"desc": "View all currently available Minecraft Servers and their mods" "desc": "View all currently available Minecraft Servers and their mods",
"id": 38
}, },
{ {
"name": "Ready or Not", "name": "Ready or Not",
@ -14,18 +16,10 @@
"desc": "Collection of Floor Plans for the Game 'Ready or Not'" "desc": "Collection of Floor Plans for the Game 'Ready or Not'"
}, },
{ {
"name": "Zomboid", "name": "Factorio"
"icon": "/assets/icons/zomboid-logo",
"iconType": "avif",
"ip": "91.13.248.30",
"status": "Online"
},
{
"name": "Factorio",
"status": "Online"
}, },
{ {
"name": "Space Engineers", "name": "Space Engineers",
"status": "Online" "id": 13
} }
] ]

View file

@ -13,7 +13,7 @@
"name": "Kavita", "name": "Kavita",
"icon": "/assets/icons/kavita-logo", "icon": "/assets/icons/kavita-logo",
"iconType": "svg", "iconType": "svg",
"href": "https://kavita.neshweb.net", "href": "https://kavita.neshweb.net/",
"desc": "Self-hosted Manga Library", "desc": "Self-hosted Manga Library",
"warn": "Registration via Admin invite", "warn": "Registration via Admin invite",
"id": 5 "id": 5
@ -41,7 +41,7 @@
"name": "PeerTube", "name": "PeerTube",
"icon": "/assets/icons/peertube-logo", "icon": "/assets/icons/peertube-logo",
"iconType": "svg", "iconType": "svg",
"href": "https://tube.neshweb.net/", "href": "https://neshweb.tv/",
"desc": "Self-hosted PeerTube Instance", "desc": "Self-hosted PeerTube Instance",
"warn": "Note: Registration only via Admin", "warn": "Note: Registration only via Admin",
"id": 8 "id": 8
@ -59,7 +59,7 @@
"name": "Vaultwarden", "name": "Vaultwarden",
"icon": "/assets/icons/vaultwarden-logo", "icon": "/assets/icons/vaultwarden-logo",
"iconType": "svg", "iconType": "svg",
"href": "https://vault.neshweb.net", "href": "https://vault.neshweb.net/",
"desc": "Self-hosted Password Manager", "desc": "Self-hosted Password Manager",
"warn": "Note: Invite only", "warn": "Note: Invite only",
"id": 9 "id": 9
@ -68,7 +68,7 @@
"name": "Jellyfin", "name": "Jellyfin",
"icon": "/assets/icons/jellyfin-logo", "icon": "/assets/icons/jellyfin-logo",
"iconType": "svg", "iconType": "svg",
"href": "https://jellyfin.neshweb.net/", "href": "https://mov.neshweb.tv/",
"desc": "Open-Source, Self-Hosted Media Platform", "desc": "Open-Source, Self-Hosted Media Platform",
"warn": "Note: Registration only via Admin", "warn": "Note: Registration only via Admin",
"id": 37 "id": 37
@ -82,15 +82,6 @@
"warn": "Note: Registration only via Admin", "warn": "Note: Registration only via Admin",
"id": 10 "id": 10
}, },
{
"name": "Gitlab",
"icon": "/assets/icons/gitlab-logo",
"iconType": "svg",
"href": "https://gitlab.neshweb.net/",
"desc": "Self-hosted Git Service",
"warn": "Note: Registration only via Admin",
"id": 2
},
{ {
"name": "Forgejo", "name": "Forgejo",
"icon": "/assets/icons/forgejo-logo", "icon": "/assets/icons/forgejo-logo",
@ -135,5 +126,13 @@
"desc": "Docker Compose WebUI", "desc": "Docker Compose WebUI",
"warn": "Note: Admin Only", "warn": "Note: Admin Only",
"id": 35 "id": 35
},
{
"name": "bookwormstory.social",
"icon": "/assets/icons/bookworm-logo",
"iconType": "avif",
"href": "https://bookwormstory.social/",
"desc": "Lemmy Instance hosted for the community around Ascendance of a Bookworm",
"id": 19
} }
] ]

View file

@ -1,6 +1,10 @@
import adapter from '@sveltejs/adapter-auto'; import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import path from "path"; import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
const path = fileURLToPath(new URL('package.json', import.meta.url));
const pkg = JSON.parse(readFileSync(path, 'utf8'));
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {
@ -13,6 +17,9 @@ const config = {
// If your environment is not supported or you settled on a specific environment, switch out the adapter. // 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. // See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(), adapter: adapter(),
version: {
name: pkg.version
}
} }
}; };

View file

@ -4,7 +4,7 @@ import { fontFamily } from "tailwindcss/defaultTheme";
const config = { const config = {
darkMode: ["class"], darkMode: ["class"],
content: ["./src/**/*.{html,js,svelte,ts}"], content: ["./src/**/*.{html,js,svelte,ts}"],
safelist: ["dark"], safelist: ["dark", "nordlys"],
theme: { theme: {
container: { container: {
center: true, center: true,
@ -68,6 +68,9 @@ const config = {
}, },
fontFamily: { fontFamily: {
sans: [...fontFamily.sans] sans: [...fontFamily.sans]
},
aspectRatio: {
'16/9': '16 / 9',
} }
} }
}, },

View file

@ -702,10 +702,10 @@ binary-extensions@^2.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
bits-ui@^0.13.0: bits-ui@^0.13.2:
version "0.13.0" version "0.13.2"
resolved "https://registry.yarnpkg.com/bits-ui/-/bits-ui-0.13.0.tgz#dff61c8b4a95b1f589105444da74396bdc6702e7" resolved "https://registry.yarnpkg.com/bits-ui/-/bits-ui-0.13.2.tgz#caf47bfed774c7f28600b1d41ac69db0509ec347"
integrity sha512-XMvGKhJQMvSWqaan0eaIx1uAVcFBpImgO6xf+XTb7UhqdzbH0//6be4DeR1nRUpIU70XoU1B7i3lMPrTWg37ng== integrity sha512-hSxj/BDazR49j2QkgsAnWjHsWdG6OvprCF0IagQm4mDf1pwiunXXJMnSciNxocvaZ/HAkKQRf8R6orwDPO/HYg==
dependencies: dependencies:
"@internationalized/date" "^3.5.1" "@internationalized/date" "^3.5.1"
"@melt-ui/svelte" "0.67.0" "@melt-ui/svelte" "0.67.0"
@ -857,7 +857,7 @@ deep-is@^0.1.3:
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
deepmerge@^4.3.1: deepmerge@^4.2.2, deepmerge@^4.3.1:
version "4.3.1" version "4.3.1"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a"
integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==
@ -901,6 +901,36 @@ doctrine@^3.0.0:
dependencies: dependencies:
esutils "^2.0.2" esutils "^2.0.2"
dom-serializer@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53"
integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==
dependencies:
domelementtype "^2.3.0"
domhandler "^5.0.2"
entities "^4.2.0"
domelementtype@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d"
integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==
domhandler@^5.0.2, domhandler@^5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31"
integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==
dependencies:
domelementtype "^2.3.0"
domutils@^3.0.1:
version "3.1.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e"
integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==
dependencies:
dom-serializer "^2.0.0"
domelementtype "^2.3.0"
domhandler "^5.0.3"
eastasianwidth@^0.2.0: eastasianwidth@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
@ -953,6 +983,11 @@ engine.io@~6.5.2:
engine.io-parser "~5.2.1" engine.io-parser "~5.2.1"
ws "~8.11.0" ws "~8.11.0"
entities@^4.2.0, entities@^4.4.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
es6-promise@^3.1.2: es6-promise@^3.1.2:
version "3.3.1" version "3.3.1"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613"
@ -1320,6 +1355,16 @@ hasown@^2.0.0:
dependencies: dependencies:
function-bind "^1.1.2" function-bind "^1.1.2"
htmlparser2@^8.0.0:
version "8.0.2"
resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21"
integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==
dependencies:
domelementtype "^2.3.0"
domhandler "^5.0.3"
domutils "^3.0.1"
entities "^4.4.0"
ignore@^5.2.0, ignore@^5.2.4: ignore@^5.2.0, ignore@^5.2.4:
version "5.3.0" version "5.3.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78"
@ -1397,6 +1442,11 @@ is-path-inside@^3.0.3:
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283"
integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==
is-plain-object@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==
is-reference@^3.0.1: is-reference@^3.0.1:
version "3.0.2" version "3.0.2"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-3.0.2.tgz#154747a01f45cd962404ee89d43837af2cba247c" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-3.0.2.tgz#154747a01f45cd962404ee89d43837af2cba247c"
@ -1696,6 +1746,11 @@ parent-module@^1.0.0:
dependencies: dependencies:
callsites "^3.0.0" callsites "^3.0.0"
parse-srcset@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1"
integrity sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==
path-exists@^4.0.0: path-exists@^4.0.0:
version "4.0.0" version "4.0.0"
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
@ -1819,6 +1874,15 @@ postcss-value-parser@^4.0.0, postcss-value-parser@^4.2.0:
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
postcss@^8.3.11:
version "8.4.33"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.33.tgz#1378e859c9f69bf6f638b990a0212f43e2aaa742"
integrity sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==
dependencies:
nanoid "^3.3.7"
picocolors "^1.0.0"
source-map-js "^1.0.2"
postcss@^8.4.23, postcss@^8.4.29, postcss@^8.4.32, postcss@^8.4.5: postcss@^8.4.23, postcss@^8.4.29, postcss@^8.4.32, postcss@^8.4.5:
version "8.4.32" version "8.4.32"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.32.tgz#1dac6ac51ab19adb21b8b34fd2d93a86440ef6c9" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.32.tgz#1dac6ac51ab19adb21b8b34fd2d93a86440ef6c9"
@ -1959,6 +2023,18 @@ sander@^0.5.0:
mkdirp "^0.5.1" mkdirp "^0.5.1"
rimraf "^2.5.2" rimraf "^2.5.2"
sanitize-html@^2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.11.0.tgz#9a6434ee8fcaeddc740d8ae7cd5dd71d3981f8f6"
integrity sha512-BG68EDHRaGKqlsNjJ2xUB7gpInPA8gVx/mvjO743hZaeMCZ2DwzW7xvsqZ+KNU4QKwj86HJ3uu2liISf2qBBUA==
dependencies:
deepmerge "^4.2.2"
escape-string-regexp "^4.0.0"
htmlparser2 "^8.0.0"
is-plain-object "^5.0.0"
parse-srcset "^1.0.2"
postcss "^8.3.11"
semver@^7.5.3, semver@^7.5.4: semver@^7.5.3, semver@^7.5.4:
version "7.5.4" version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
@ -2167,9 +2243,9 @@ svelte-preprocess@^5.1.0:
strip-indent "^3.0.0" strip-indent "^3.0.0"
svelte@^5.0.0-next.1: svelte@^5.0.0-next.1:
version "5.0.0-next.27" version "5.0.0-next.28"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-5.0.0-next.27.tgz#e7e48490032d64234780b453271406af87edef52" resolved "https://registry.yarnpkg.com/svelte/-/svelte-5.0.0-next.28.tgz#6ebcf3da041f9ec60ffffa38dfbc6b262813d2ba"
integrity sha512-5I4JrmEWVPu4ALEskqU/xdz6PsJYnRaWiIN/s7BCvtuwHjy2mbclSfC+VzgCxEN0AEJxdsPXsxYkIfwXch3AyQ== integrity sha512-a9Nqq8eczeJMrOlDL24LMI1MKXMZhDhH33tL8lkPilUJyTjk4W97zYC/hKlZOeAFKdSOBZPIeLFH+NHR2iNSRQ==
dependencies: dependencies:
"@ampproject/remapping" "^2.2.1" "@ampproject/remapping" "^2.2.1"
"@jridgewell/sourcemap-codec" "^1.4.15" "@jridgewell/sourcemap-codec" "^1.4.15"