aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2023-09-15 13:54:56 -0500
committerMatt Strapp <matt@mattstrapp.net>2023-09-15 13:56:50 -0500
commit2074c9c732f6d279f5153688b9e33bdc8c9c7674 (patch)
tree0ae640f9966cc8ae74abe28a1520b23ac610c604
parentCreate dependabot.yml (diff)
downloadtrinkets-2074c9c732f6d279f5153688b9e33bdc8c9c7674.tar
trinkets-2074c9c732f6d279f5153688b9e33bdc8c9c7674.tar.gz
trinkets-2074c9c732f6d279f5153688b9e33bdc8c9c7674.tar.bz2
trinkets-2074c9c732f6d279f5153688b9e33bdc8c9c7674.tar.lz
trinkets-2074c9c732f6d279f5153688b9e33bdc8c9c7674.tar.xz
trinkets-2074c9c732f6d279f5153688b9e33bdc8c9c7674.tar.zst
trinkets-2074c9c732f6d279f5153688b9e33bdc8c9c7674.zip
Here goes nothing!
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r--.vscode/launch.json30
-rw-r--r--app/.gitignore1
-rw-r--r--app/package.json5
-rw-r--r--app/pnpm-lock.yaml59
-rw-r--r--app/src/app.d.ts3
-rw-r--r--app/src/app.html4
-rw-r--r--app/src/lib/index.ts1
-rw-r--r--app/src/lib/svelte/Navigation.svelte11
-rw-r--r--app/src/lib/ts/crc32.worker.ts8
-rw-r--r--app/src/routes/+layout.svelte117
-rw-r--r--app/src/routes/+page.svelte64
-rw-r--r--app/src/routes/crc32/+page.svelte55
-rw-r--r--app/static/favicon.pngbin15086 -> 0 bytes
-rw-r--r--app/static/favicon.svg1
-rw-r--r--app/tailwind.config.ts2
-rw-r--r--app/tsconfig.json2
-rw-r--r--app/vite.config.ts25
-rw-r--r--pnpm-lock.yaml4
18 files changed, 241 insertions, 151 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..8b550f9
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,30 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Launch server",
+ "request": "launch",
+ "runtimeArgs": ["-F", "website", "dev"],
+ "runtimeExecutable": "pnpm",
+ "skipFiles": ["<node_internals>/**"],
+ "type": "node"
+ },
+ {
+ "type": "msedge",
+ "version": "dev",
+ "request": "launch",
+ "name": "Launch Edge",
+ "url": "http://localhost:5173",
+ "webRoot": "${workspaceFolder}/app"
+ }
+ ],
+ "compounds": [
+ {
+ "name": "Both",
+ "configurations": ["Launch server", "Launch Edge"]
+ }
+ ]
+} \ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
index 6635cf5..ef995c0 100644
--- a/app/.gitignore
+++ b/app/.gitignore
@@ -3,6 +3,7 @@ node_modules
/build
/.svelte-kit
/package
+/dev-dist
.env
.env.*
!.env.example
diff --git a/app/package.json b/app/package.json
index 379d87b..857d367 100644
--- a/app/package.json
+++ b/app/package.json
@@ -18,6 +18,7 @@
"@typescript-eslint/parser": "^6.7.0",
"@vite-pwa/sveltekit": "^0.2.7",
"autoprefixer": "10.4.15",
+ "crc": "^4.3.2",
"eslint": "^8.49.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-svelte": "^2.33.1",
@@ -36,10 +37,10 @@
},
"private": true,
"scripts": {
- "build": "vite build && mv .svelte-kit/output/server/sw.js.map .svelte-kit/output/server/workbox-*.map build/",
+ "build": "vite build && cp .svelte-kit/output/server/sw.js.map .svelte-kit/output/server/workbox-*.map build/",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
- "dev": "vite dev",
+ "dev": "vite dev && rm -rf dev-dist",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"preview": "vite preview"
diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml
index 4f11aeb..c6e2d2c 100644
--- a/app/pnpm-lock.yaml
+++ b/app/pnpm-lock.yaml
@@ -1,5 +1,9 @@
lockfileVersion: '6.0'
+settings:
+ autoInstallPeers: true
+ excludeLinksFromLockfile: false
+
dependencies:
'@floating-ui/dom':
specifier: 1.5.2
@@ -45,6 +49,9 @@ devDependencies:
autoprefixer:
specifier: 10.4.15
version: 10.4.15(postcss@8.4.29)
+ crc:
+ specifier: ^4.3.2
+ version: 4.3.2
eslint:
specifier: ^8.49.0
version: 8.49.0
@@ -234,7 +241,7 @@ packages:
'@babel/helper-plugin-utils': 7.22.5
debug: 4.3.4
lodash.debounce: 4.0.8
- resolve: 1.22.4
+ resolve: 1.22.5
transitivePeerDependencies:
- supports-color
dev: true
@@ -1512,8 +1519,8 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
- /@floating-ui/core@1.4.2:
- resolution: {integrity: sha512-olUakR5nr9v2ueVr1yomoJnBTkHGqHzL/iK4AhforiJS/wKJgFphAYpZHZzADLv/zNUFuQwqLH3bcoUhFh2E1Q==}
+ /@floating-ui/core@1.5.0:
+ resolution: {integrity: sha512-kK1h4m36DQ0UHGj5Ah4db7R0rHemTqqO0QLvUqi1/mUUp3LuAWbWxdxSIf/XsnH9VS6rRVPLJCncjRzUvyCLXg==}
dependencies:
'@floating-ui/utils': 0.1.3
dev: false
@@ -1521,7 +1528,7 @@ packages:
/@floating-ui/dom@1.5.2:
resolution: {integrity: sha512-6ArmenS6qJEWmwzczWyhvrXRdI/rI78poBcW0h/456+onlabit+2G+QxHx5xTOX60NBJQXjsCLFbW2CmsXpUog==}
dependencies:
- '@floating-ui/core': 1.4.2
+ '@floating-ui/core': 1.5.0
'@floating-ui/utils': 0.1.3
dev: false
@@ -1639,7 +1646,7 @@ packages:
builtin-modules: 3.3.0
deepmerge: 4.3.1
is-module: 1.0.0
- resolve: 1.22.4
+ resolve: 1.22.5
rollup: 2.79.1
dev: true
@@ -1717,7 +1724,7 @@ packages:
svelte: ^3.54.0 || ^4.0.0-next.0
vite: ^4.0.0
dependencies:
- '@sveltejs/vite-plugin-svelte': 2.4.5(svelte@4.2.0)(vite@4.4.9)
+ '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.0)(vite@4.4.9)
'@types/cookie': 0.5.2
cookie: 0.5.0
devalue: 4.3.2
@@ -1736,7 +1743,7 @@ packages:
- supports-color
dev: true
- /@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.4.5)(svelte@4.2.0)(vite@4.4.9):
+ /@sveltejs/vite-plugin-svelte-inspector@1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.0)(vite@4.4.9):
resolution: {integrity: sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==}
engines: {node: ^14.18.0 || >= 16}
peerDependencies:
@@ -1744,7 +1751,7 @@ packages:
svelte: ^3.54.0 || ^4.0.0
vite: ^4.0.0
dependencies:
- '@sveltejs/vite-plugin-svelte': 2.4.5(svelte@4.2.0)(vite@4.4.9)
+ '@sveltejs/vite-plugin-svelte': 2.4.6(svelte@4.2.0)(vite@4.4.9)
debug: 4.3.4
svelte: 4.2.0
vite: 4.4.9(@types/node@20.6.0)
@@ -1752,14 +1759,14 @@ packages:
- supports-color
dev: true
- /@sveltejs/vite-plugin-svelte@2.4.5(svelte@4.2.0)(vite@4.4.9):
- resolution: {integrity: sha512-UJKsFNwhzCVuiZd06jM/psscyNJNDwjQC+qIeb7GBJK9iWeQCcIyfcPWDvbCudfcJggY9jtxJeeaZH7uny93FQ==}
+ /@sveltejs/vite-plugin-svelte@2.4.6(svelte@4.2.0)(vite@4.4.9):
+ resolution: {integrity: sha512-zO79p0+DZnXPnF0ltIigWDx/ux7Ni+HRaFOw720Qeivc1azFUrJxTl0OryXVibYNx1hCboGia1NRV3x8RNv4cA==}
engines: {node: ^14.18.0 || >= 16}
peerDependencies:
svelte: ^3.54.0 || ^4.0.0
vite: ^4.0.0
dependencies:
- '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.4.5)(svelte@4.2.0)(vite@4.4.9)
+ '@sveltejs/vite-plugin-svelte-inspector': 1.0.4(@sveltejs/vite-plugin-svelte@2.4.6)(svelte@4.2.0)(vite@4.4.9)
debug: 4.3.4
deepmerge: 4.3.1
kleur: 4.1.5
@@ -2186,7 +2193,7 @@ packages:
hasBin: true
dependencies:
caniuse-lite: 1.0.30001534
- electron-to-chromium: 1.4.520
+ electron-to-chromium: 1.4.522
node-releases: 2.0.13
update-browserslist-db: 1.0.11(browserslist@4.21.10)
dev: true
@@ -2347,6 +2354,16 @@ packages:
browserslist: 4.21.10
dev: true
+ /crc@4.3.2:
+ resolution: {integrity: sha512-uGDHf4KLLh2zsHa8D8hIQ1H/HtFQhyHrc0uhHBcoKGol/Xnb+MPYfUMw7cvON6ze/GUESTudKayDcJC5HnJv1A==}
+ engines: {node: '>=12'}
+ peerDependencies:
+ buffer: '>=6.0.3'
+ peerDependenciesMeta:
+ buffer:
+ optional: true
+ dev: true
+
/cross-spawn@7.0.3:
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
engines: {node: '>= 8'}
@@ -2465,8 +2482,8 @@ packages:
jake: 10.8.7
dev: true
- /electron-to-chromium@1.4.520:
- resolution: {integrity: sha512-Frfus2VpYADsrh1lB3v/ft/WVFlVzOIm+Q0p7U7VqHI6qr7NWHYKe+Wif3W50n7JAFoBsWVsoU0+qDks6WQ60g==}
+ /electron-to-chromium@1.4.522:
+ resolution: {integrity: sha512-KGKjcafTpOxda0kqwQ72M0tDmX6RsGhUJTy0Hr7slt0+CgHh9Oex8JdjY9Og68dUkTLUlBOJC0A5W5Mw3QSGCg==}
dev: true
/entities@4.5.0:
@@ -3687,7 +3704,7 @@ packages:
postcss: 8.4.29
postcss-value-parser: 4.2.0
read-cache: 1.0.0
- resolve: 1.22.4
+ resolve: 1.22.5
dev: true
/postcss-js@4.0.1(postcss@8.4.29):
@@ -3860,8 +3877,8 @@ packages:
picomatch: 2.3.1
dev: true
- /regenerate-unicode-properties@10.1.0:
- resolution: {integrity: sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==}
+ /regenerate-unicode-properties@10.1.1:
+ resolution: {integrity: sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==}
engines: {node: '>=4'}
dependencies:
regenerate: 1.4.2
@@ -3896,7 +3913,7 @@ packages:
dependencies:
'@babel/regjsgen': 0.8.0
regenerate: 1.4.2
- regenerate-unicode-properties: 10.1.0
+ regenerate-unicode-properties: 10.1.1
regjsparser: 0.9.1
unicode-match-property-ecmascript: 2.0.0
unicode-match-property-value-ecmascript: 2.1.0
@@ -3924,8 +3941,8 @@ packages:
engines: {node: '>=4'}
dev: true
- /resolve@1.22.4:
- resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==}
+ /resolve@1.22.5:
+ resolution: {integrity: sha512-qWhv7PF1V95QPvRoUGHxOtnAlEvlXBylMZcjUR9pAumMmveFtcHJRXGIr+TkjfNJVQypqv2qcDiiars2y1PsSg==}
hasBin: true
dependencies:
is-core-module: 2.13.0
@@ -4386,7 +4403,7 @@ packages:
postcss-load-config: 4.0.1(postcss@8.4.29)
postcss-nested: 6.0.1(postcss@8.4.29)
postcss-selector-parser: 6.0.13
- resolve: 1.22.4
+ resolve: 1.22.5
sucrase: 3.34.0
transitivePeerDependencies:
- ts-node
diff --git a/app/src/app.d.ts b/app/src/app.d.ts
index 3e4ed20..bf2855f 100644
--- a/app/src/app.d.ts
+++ b/app/src/app.d.ts
@@ -1,6 +1,9 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
// and what to do when importing types
+
+import 'vite-plugin-pwa/info';
+
declare namespace App {
// interface Locals {}
// interface PageData {}
diff --git a/app/src/app.html b/app/src/app.html
index 4480bed..54f3529 100644
--- a/app/src/app.html
+++ b/app/src/app.html
@@ -2,11 +2,11 @@
<html lang="en" class="dark">
<head>
<meta charset="utf-8" />
- <link rel="icon" href="%sveltekit.assets%/favicon.png" />
+ <link rel="icon" href="%sveltekit.assets%/favicon.svg" />
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
- <body data-sveltekit-preload-data="hover" data-theme="crimson">
+ <body data-sveltekit-preload-data="hover" data-theme="wintry">
<div style="display: contents" class="h-full overflow-hidden">%sveltekit.body%</div>
</body>
</html>
diff --git a/app/src/lib/index.ts b/app/src/lib/index.ts
deleted file mode 100644
index 856f2b6..0000000
--- a/app/src/lib/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-// place files you want to import through the `$lib` alias in this folder.
diff --git a/app/src/lib/svelte/Navigation.svelte b/app/src/lib/svelte/Navigation.svelte
new file mode 100644
index 0000000..20c7d8b
--- /dev/null
+++ b/app/src/lib/svelte/Navigation.svelte
@@ -0,0 +1,11 @@
+<script lang="ts">
+ import { AppRail, AppRailAnchor } from '@skeletonlabs/skeleton';
+ import { page } from '$app/stores';
+</script>
+
+<AppRail>
+ <svelte:fragment slot="lead">
+ <AppRailAnchor href="/" selected={$page.url.pathname === '/'}>Home!</AppRailAnchor>
+ </svelte:fragment>
+ <AppRailAnchor href="/crc32" selected={$page.url.pathname === '/crc32'}>CRC32</AppRailAnchor>
+</AppRail>
diff --git a/app/src/lib/ts/crc32.worker.ts b/app/src/lib/ts/crc32.worker.ts
new file mode 100644
index 0000000..0d04c7c
--- /dev/null
+++ b/app/src/lib/ts/crc32.worker.ts
@@ -0,0 +1,8 @@
+import crc32 from 'crc/crc32';
+
+onmessage = async (message: MessageEvent<File>) => {
+ const file = message.data;
+ const buffer = await file.arrayBuffer();
+ const crc = crc32(buffer, 517762881);
+ postMessage(crc);
+};
diff --git a/app/src/routes/+layout.svelte b/app/src/routes/+layout.svelte
index 8a70575..a0dd68a 100644
--- a/app/src/routes/+layout.svelte
+++ b/app/src/routes/+layout.svelte
@@ -1,76 +1,75 @@
<script lang="ts">
- import { registerSW } from 'virtual:pwa-register'
- import { pwaInfo } from 'virtual:pwa-info';
- import { onMount } from 'svelte'
+ import { useRegisterSW } from 'virtual:pwa-register/svelte';
+ import { pwaInfo } from 'virtual:pwa-info';
+ import { onMount } from 'svelte';
- import '../app.postcss';
- import { AppShell, AppBar } from '@skeletonlabs/skeleton';
+ import '../app.postcss';
+ import { AppShell, AppBar, getToastStore, initializeStores, Toast } from '@skeletonlabs/skeleton';
+ import Navigation from '$lib/svelte/Navigation.svelte';
- // Floating UI for Popups
- // import { computePosition, autoUpdate, flip, shift, offset, arrow } from '@floating-ui/dom';
- // import { storePopup } from '@skeletonlabs/skeleton';
- // storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
+ // Floating UI for Popups
+ // import { computePosition, autoUpdate, flip, shift, offset, arrow } from '@floating-ui/dom';
+ // import { storePopup } from '@skeletonlabs/skeleton';
+ // storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
- onMount(async () => {
+ initializeStores();
+
+ const toastStore = getToastStore();
+
+ onMount(async () => {
if (pwaInfo) {
- registerSW({
+ useRegisterSW({
immediate: true,
- onRegistered(r: ServiceWorkerRegistration) {
- console.log(`SW Registered: ${r}`)
+ onRegistered(r) {
+ console.log(`SW Registered: ${r?.active?.scriptURL}`);
},
onRegisterError(error: Error) {
- console.log('SW registration error', error)
+ console.error('SW registration error', error);
},
- onOfflineReady() {
- console.log('SW Offline Ready')
- }
- })
+ onOfflineReady() {
+ toastStore.trigger({
+ background: 'variant-filled-success',
+ hideDismiss: true,
+ message: 'Now ready for offline use!',
+ timeout: 5000
+ });
+ }
+ });
}
- })
-
- $: webManifestLink = pwaInfo ? pwaInfo.webManifest.linkTag : ''
+ });
+
+ $: webManifestLink = pwaInfo ? pwaInfo.webManifest.linkTag : '';
</script>
-<svelte:head>
- {@html webManifestLink}
+<svelte:head>
+ {@html webManifestLink}
</svelte:head>
+<Toast position="br" />
+
<!-- App Shell -->
<AppShell>
- <svelte:fragment slot="header">
- <!-- App Bar -->
- <AppBar>
- <svelte:fragment slot="lead">
- <strong class="text-xl uppercase">Skeleton</strong>
- </svelte:fragment>
- <svelte:fragment slot="trail">
- <a
- class="btn btn-sm variant-ghost-surface"
- href="https://discord.gg/EXqV7W8MtY"
- target="_blank"
- rel="noreferrer"
- >
- Discord
- </a>
- <a
- class="btn btn-sm variant-ghost-surface"
- href="https://twitter.com/SkeletonUI"
- target="_blank"
- rel="noreferrer"
- >
- Twitter
- </a>
- <a
- class="btn btn-sm variant-ghost-surface"
- href="https://github.com/skeletonlabs/skeleton"
- target="_blank"
- rel="noreferrer"
- >
- GitHub
- </a>
- </svelte:fragment>
- </AppBar>
- </svelte:fragment>
- <!-- Page Route Content -->
- <slot />
+ <svelte:fragment slot="header">
+ <!-- App Bar -->
+ <AppBar>
+ <svelte:fragment slot="lead">
+ <strong class="text-xl uppercase">A!</strong>
+ </svelte:fragment>
+ <svelte:fragment slot="trail">
+ <a
+ class="btn btn-sm variant-ghost-surface"
+ href="https://github.com/rosstheross/rosstheross.github.io"
+ target="_blank"
+ rel="noreferrer"
+ >
+ Frontend Source
+ </a>
+ </svelte:fragment>
+ </AppBar>
+ </svelte:fragment>
+ <svelte:fragment slot="sidebarLeft">
+ <Navigation />
+ </svelte:fragment>
+ <!-- Page Route Content -->
+ <slot />
</AppShell>
diff --git a/app/src/routes/+page.svelte b/app/src/routes/+page.svelte
index 7cd11ed..1f0a15d 100644
--- a/app/src/routes/+page.svelte
+++ b/app/src/routes/+page.svelte
@@ -1,5 +1,5 @@
<svelte:head>
- <title>Coming Soon(TM)</title>
+ <title>Coming Soon(TM)</title>
</svelte:head>
<!-- YOU CAN DELETE EVERYTHING IN THIS PAGE -->
@@ -7,69 +7,9 @@
<div class="container h-full mx-auto flex justify-center items-center">
<div class="space-y-10 text-center flex flex-col items-center">
<h2 class="h2">Welcome to a placeholder.</h2>
- <!-- Animated Logo -->
- <figure>
- <section class="img-bg" />
- <svg
- class="fill-token -scale-x-[100%]"
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 200 200"
- >
- <path
- fill-rule="evenodd"
- d="M98.77 50.95c25.1 0 46.54 8.7 61.86 23a41.34 41.34 0 0 0 5.19-1.93c4.35-2.02 10.06-6.17 17.13-12.43-1.15 10.91-2.38 18.93-3.7 24.04-.7 2.75-1.8 6.08-3.3 10a80.04 80.04 0 0 1 8.42 23.33c6.04 30.3-4.3 43.7-28.33 51.18.18.9.32 1.87.42 2.9.86 8.87-3.62 23.19-9 23.19-3.54 0-5.84-4.93-8.3-12.13-.78 8.34-4.58 17.9-8.98 17.9-4.73 0-7.25-8.84-10.93-20.13a214 214 0 0 1-.64 2.93l-.16.71-.16.71-.17.71c-1.84 7.58-4.46 15.07-8.5 15.07-5.06 0-2.29-15.9-10.8-22.63-43.14 2.36-79.43-13.6-79.43-59.62 0-8.48 2-16.76 5.69-24.45a93.72 93.72 0 0 1-1.77-3.68c-2.87-6.32-6.3-15.88-10.31-28.7 10.26 7.66 18.12 12.22 23.6 13.68.5.14 1.02.26 1.57.36 14.36-14.44 35.88-24.01 60.6-24.01Zm-9.99 62.3c-14.57 0-26.39 11.45-26.39 25.58 0 14.14 11.82 25.6 26.39 25.6s26.39-11.46 26.39-25.6c0-13.99-11.58-25.35-25.95-25.58Zm37.45 31.95c-4.4 0-6.73 9.4-6.73 13.62 0 3.3 1.1 5.12 2.9 5.45 4.39.4 3.05-5.97 5.23-5.97 1.06 0 2.2 1.35 3.34 2.73l.34.42c1.25 1.52 2.5 2.93 3.64 2.49 2.7-1.61 1.67-5.12.74-7.88-3.3-6.96-5.05-10.86-9.46-10.86Zm-36.85-28.45c12.57 0 22.76 9.78 22.76 21.85 0 12.07-10.2 21.85-22.76 21.85-.77 0-1.53-.04-2.29-.11 11.5-1.1 20.46-10.42 20.46-21.74 0-11.32-8.97-20.63-20.46-21.74.76-.07 1.52-.1 2.3-.1Zm65.54-5c-10.04 0-18.18 10.06-18.18 22.47 0 12.4 8.14 22.47 18.18 22.47s18.18-10.06 18.18-22.47c0-12.41-8.14-22.48-18.18-22.48Zm.6 3.62c8.38 0 15.16 8.4 15.16 18.74 0 10.35-6.78 18.74-15.16 18.74-.77 0-1.54-.07-2.28-.21 7.3-1.36 12.89-9.14 12.89-18.53 0-9.4-5.6-17.17-12.89-18.53.74-.14 1.5-.2 2.28-.2Zm3.34-72.27.12.07c.58.38.75 1.16.37 1.74l-2.99 4.6c-.35.55-1.05.73-1.61.44l-.12-.07a1.26 1.26 0 0 1-.37-1.74l2.98-4.6a1.26 1.26 0 0 1 1.62-.44ZM39.66 42l.08.1 2.76 3.93a1.26 1.26 0 0 1-2.06 1.45l-2.76-3.94A1.26 1.26 0 0 1 39.66 42Zm63.28-42 2.85 24.13 10.62-11.94.28 29.72-2.1-.47a77.8 77.8 0 0 0-16.72-2.04c-4.96 0-9.61.67-13.96 2l-2.34.73L83.5 4.96l9.72 18.37L102.94 0Zm-1.87 13.39-7.5 17.96-7.3-13.8-1.03 19.93.22-.06a51.56 51.56 0 0 1 12.1-1.45h.31c4.58 0 9.58.54 15 1.61l.35.07-.15-16.54-9.79 11-2.21-18.72Zm38.86 19.23c.67.2 1.05.89.86 1.56l-.38 1.32c-.17.62-.8 1-1.42.89l-.13-.03a1.26 1.26 0 0 1-.86-1.56l.38-1.32c.19-.66.88-1.05 1.55-.86ZM63.95 31.1l.05.12.7 2.17a1.26 1.26 0 0 1-2.34.9l-.04-.12-.71-2.17a1.26 1.26 0 0 1 2.34-.9Z"
- />
- </svg>
- </figure>
- <!-- / -->
- <div class="flex justify-center space-x-2">
- <a
- class="btn variant-filled"
- href="https://skeleton.dev/"
- target="_blank"
- rel="noreferrer"
- >
- Launch Documentation
- </a>
</div>
- <div class="space-y-2">
- <p>Try editing the following:</p>
- <p><code class="code">/src/routes/+layout.svelte</code></p>
- <p><code class="code">/src/routes/+page.svelte</code></p>
- </div>
- </div>
</div>
<style lang="postcss">
- figure {
- @apply flex relative flex-col;
- }
- figure svg,
- .img-bg {
- @apply w-64 h-64 md:w-80 md:h-80;
- }
- .img-bg {
- @apply absolute z-[-1] rounded-full blur-[50px] transition-all;
- animation: pulse 5s cubic-bezier(0, 0, 0, 0.5) infinite,
- glow 5s linear infinite;
- }
- @keyframes glow {
- 0% {
- @apply bg-primary-400/50;
- }
- 33% {
- @apply bg-secondary-400/50;
- }
- 66% {
- @apply bg-tertiary-400/50;
- }
- 100% {
- @apply bg-primary-400/50;
- }
- }
- @keyframes pulse {
- 50% {
- transform: scale(1.5);
- }
- }
+
</style>
diff --git a/app/src/routes/crc32/+page.svelte b/app/src/routes/crc32/+page.svelte
new file mode 100644
index 0000000..18cc515
--- /dev/null
+++ b/app/src/routes/crc32/+page.svelte
@@ -0,0 +1,55 @@
+<script lang="ts">
+ import { FileDropzone, ProgressBar } from '@skeletonlabs/skeleton';
+ import { onMount } from 'svelte';
+
+ let disableInput = false;
+ let files: FileList;
+ let form: HTMLFormElement;
+ let worker: Worker;
+
+ function onUpload() {
+ disableInput = true;
+ worker.postMessage(files[0]);
+ form.reset();
+ }
+
+ onMount(async () => {
+ worker = new (await import('$lib/ts/crc32.worker?worker')).default();
+ worker.onmessage = (e: MessageEvent<Number>) => {
+ disableInput = false;
+ console.log(e.data);
+ };
+ });
+</script>
+
+<svelte:head>
+ <title>CRC32</title>
+</svelte:head>
+
+<div class="container h-full mx-auto flex justify-center items-center">
+ <div class="space-y-10 text-center flex flex-col items-center">
+ <form bind:this={form} on:submit|preventDefault={onUpload} method="POST" action="?/TODO">
+ <FileDropzone
+ name="checksumMe"
+ bind:files
+ on:change={() => form.requestSubmit()}
+ required
+ disabled={disableInput}
+ >
+ <svelte:fragment slot="lead">
+ <h2 class="h2">Drop a file here to get its CRC32 checksum.</h2>
+ </svelte:fragment>
+ </FileDropzone>
+ <br />
+ <noscript>
+ <button type="submit" class="btn variant-filled"
+ >After adding a file, click to submit! (Not yet implemented)</button
+ >
+ </noscript>
+ {#if disableInput}
+ <h3 class="h3">Calculating the checksum, this may take time!</h3> <br />
+ <ProgressBar />
+ {/if}
+ </form>
+ </div>
+</div>
diff --git a/app/static/favicon.png b/app/static/favicon.png
deleted file mode 100644
index c4e3735..0000000
--- a/app/static/favicon.png
+++ /dev/null
Binary files differ
diff --git a/app/static/favicon.svg b/app/static/favicon.svg
new file mode 100644
index 0000000..da48ab8
--- /dev/null
+++ b/app/static/favicon.svg
@@ -0,0 +1 @@
+<svg fill="none" height="15" viewBox="0 0 15 15" width="15" xmlns="http://www.w3.org/2000/svg"><g fill="#151515"><path d="m1.5 1c-.27614 0-.5.22386-.5.5v2c0 .27614.22386.5.5.5s.5-.22386.5-.5v-1.5h1.5c.27614 0 .5-.22386.5-.5s-.22386-.5-.5-.5z"/><path d="m11.5 1c-.2761 0-.5.22386-.5.5s.2239.5.5.5h1.5v1.5c0 .27614.2239.5.5.5s.5-.22386.5-.5v-2c0-.27614-.2239-.5-.5-.5z"/><path d="m2 11.5c0-.2761-.22386-.5-.5-.5s-.5.2239-.5.5v2c0 .2761.22386.5.5.5h2c.27614 0 .5-.2239.5-.5s-.22386-.5-.5-.5h-1.5z"/><path d="m14 11.5c0-.2761-.2239-.5-.5-.5s-.5.2239-.5.5v1.5h-1.5c-.2761 0-.5.2239-.5.5s.2239.5.5.5h2c.2761 0 .5-.2239.5-.5z"/><g clip-rule="evenodd" fill-rule="evenodd"><path d="m7.85355 2.14645c-.19526-.19527-.51184-.19527-.7071 0l-2 2c-.19527.19526-.19527.51184 0 .7071l2 2c.19526.19527.51184.19527.7071 0l2-2c.19525-.19526.19525-.51184 0-.7071zm.93934 2.35355-1.29289 1.29289-1.29289-1.29289 1.29289-1.29289z"/><path d="m4.85355 5.14645c-.19526-.19527-.51184-.19527-.7071 0l-2 2c-.19527.19526-.19527.51184 0 .7071l2 2c.19526.19525.51184.19525.7071 0l2-2c.19527-.19526.19527-.51184 0-.7071zm-.35355 3.64644-1.29289-1.29289 1.29289-1.29289 1.29289 1.29289z"/><path d="m10.8536 5.14645c-.1953-.19527-.5119-.19527-.7072 0l-1.99995 2c-.19527.19526-.19527.51184 0 .7071l1.99995 2c.1953.19525.5119.19525.7072 0l2-2c.1952-.19526.1952-.51184 0-.7071zm.9393 2.35355-1.2929 1.29289-1.29289-1.29289 1.29289-1.29289z"/><path d="m9.85355 10.1464-2-1.99995c-.19526-.19527-.51184-.19527-.7071 0l-2 1.99995c-.19527.1953-.19527.5119 0 .7072l2 2c.19526.1952.51184.1952.7071 0l2-2c.19525-.1953.19525-.5119 0-.7072zm-2.35355 1.6465-1.29289-1.2929 1.29289-1.29289 1.29289 1.29289z"/></g></g></svg> \ No newline at end of file
diff --git a/app/tailwind.config.ts b/app/tailwind.config.ts
index 57f3822..5bb3fde 100644
--- a/app/tailwind.config.ts
+++ b/app/tailwind.config.ts
@@ -20,7 +20,7 @@ export default {
themes: {
preset: [
{
- name: 'crimson',
+ name: 'wintry',
enhancements: true
}
]
diff --git a/app/tsconfig.json b/app/tsconfig.json
index dd9fd5d..a25e61a 100644
--- a/app/tsconfig.json
+++ b/app/tsconfig.json
@@ -9,7 +9,7 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
- "types": ["vite-plugin-pwa/info", "vite-plugin-pwa"]
+ "types": ["vite-plugin-pwa/client"]
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
diff --git a/app/vite.config.ts b/app/vite.config.ts
index 9837a67..00d8472 100644
--- a/app/vite.config.ts
+++ b/app/vite.config.ts
@@ -8,13 +8,34 @@ export default defineConfig({
sourcemap: true
},
css: {
- devSourcemap: true,
+ devSourcemap: true
},
plugins: [
sveltekit(),
purgeCss(),
SvelteKitPWA({
- registerType: 'autoUpdate'
+ devOptions: {
+ enabled: true,
+ type: 'module'
+ },
+ manifest: {
+ name: "RossTheRoss' Personal Tools",
+ short_name: 'Dumping Ground',
+ display: 'fullscreen',
+ display_override: ['window-controls-overlay', 'standalone', 'minimal-ui'],
+ icons: [
+ {
+ src: '/favicon.svg',
+ sizes: 'any',
+ type: 'image/svg+xml'
+ }
+ ]
+ },
+ registerType: 'autoUpdate',
+ workbox: {
+ globPatterns: ['**/*.{js,css,html,svg}'],
+ cleanupOutdatedCaches: true,
+ }
})
]
});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4230777..f924705 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1,5 +1,9 @@
lockfileVersion: '6.0'
+settings:
+ autoInstallPeers: true
+ excludeLinksFromLockfile: false
+
devDependencies:
syncpack:
specifier: ^11.2.1