aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/lib/components/Navigation.svelte11
-rw-r--r--app/svelte.config.js3
-rw-r--r--app/vite.config.ts6
3 files changed, 12 insertions, 8 deletions
diff --git a/app/src/lib/components/Navigation.svelte b/app/src/lib/components/Navigation.svelte
index 2e5ba98..c895cbb 100644
--- a/app/src/lib/components/Navigation.svelte
+++ b/app/src/lib/components/Navigation.svelte
@@ -1,5 +1,6 @@
<script lang="ts">
import { page } from '$app/stores'
+ import { base } from "$app/paths";
import Icon from '@iconify/svelte'
import homeIcon from '@iconify/icons-carbon/home'
@@ -33,8 +34,8 @@
{/if}
</svelte:fragment>
<AppRailAnchor
- href="/"
- selected={$page.url.pathname === '/'}
+ href="{base}/"
+ selected={$page.url.pathname === base + '/'}
on:click={drawerClose}
title="Homepage"
>
@@ -44,8 +45,8 @@
Home!
</AppRailAnchor>
<AppRailAnchor
- href="/truncate"
- selected={$page.url.pathname === '/truncate'}
+ href="{base}/truncate"
+ selected={$page.url.pathname === base + '/truncate'}
on:click={drawerClose}
title="Truncate Files"
>
@@ -56,7 +57,7 @@
</AppRailAnchor>
<svelte:fragment slot="trail">
<AppRailAnchor
- href="https://github.com/rosstheross/rosstheross.github.io"
+ href="https://github.com/rosstheross/random-stuff"
rel="noreferrer"
on:click={drawerClose}
title="Source Code"
diff --git a/app/svelte.config.js b/app/svelte.config.js
index 9484cb8..6200fb3 100644
--- a/app/svelte.config.js
+++ b/app/svelte.config.js
@@ -10,6 +10,9 @@ const config = {
kit: {
adapter: adapter(),
+ paths: {
+ base: process.env.NODE_ENV === "production" ? "/random-stuff" : "",
+ }
},
}
export default config
diff --git a/app/vite.config.ts b/app/vite.config.ts
index 5e5fa9f..5c5c0a2 100644
--- a/app/vite.config.ts
+++ b/app/vite.config.ts
@@ -26,18 +26,18 @@ export default defineConfig({
display_override: ['window-controls-overlay', 'standalone', 'minimal-ui'],
icons: [
{
- src: '/favicon.svg',
+ src: 'favicon.svg',
sizes: 'any',
type: 'image/svg+xml',
purpose: 'maskable',
},
{
- src: '/pwa-512x512.png',
+ src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
- id: '/',
+ id: '.',
theme_color: '#000000',
},
registerType: 'prompt',