diff options
chore: things
-rw-r--r-- | deno.lock | 8 | ||||
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | src/app.css | 2 | ||||
-rw-r--r-- | src/lib/Timetable.svelte | 3 | ||||
-rw-r--r-- | src/lib/assets/LineGlyph.svelte | 6 | ||||
-rw-r--r-- | svelte.config.js | 13 |
6 files changed, 24 insertions, 9 deletions
@@ -3,6 +3,7 @@ "specifiers": { "npm:@inlang/paraglide-js@2": "2.2.0", "npm:@sveltejs/adapter-node@^5.2.12": "5.2.13_@sveltejs+kit@2.25.1__@sveltejs+vite-plugin-svelte@6.1.0___svelte@5.36.8____acorn@8.15.0___vite@7.0.5____picomatch@4.0.3__svelte@5.36.8___acorn@8.15.0__vite@7.0.5___picomatch@4.0.3__acorn@8.15.0_rollup@4.45.1_@sveltejs+vite-plugin-svelte@6.1.0__svelte@5.36.8___acorn@8.15.0__vite@7.0.5___picomatch@4.0.3_svelte@5.36.8__acorn@8.15.0_vite@7.0.5__picomatch@4.0.3", + "npm:@sveltejs/adapter-static@^3.0.8": "3.0.8_@sveltejs+kit@2.25.1__@sveltejs+vite-plugin-svelte@6.1.0___svelte@5.36.8____acorn@8.15.0___vite@7.0.5____picomatch@4.0.3__svelte@5.36.8___acorn@8.15.0__vite@7.0.5___picomatch@4.0.3__acorn@8.15.0_@sveltejs+vite-plugin-svelte@6.1.0__svelte@5.36.8___acorn@8.15.0__vite@7.0.5___picomatch@4.0.3_svelte@5.36.8__acorn@8.15.0_vite@7.0.5__picomatch@4.0.3", "npm:@sveltejs/kit@^2.22.0": "2.25.1_@sveltejs+vite-plugin-svelte@6.1.0__svelte@5.36.8___acorn@8.15.0__vite@7.0.5___picomatch@4.0.3_svelte@5.36.8__acorn@8.15.0_vite@7.0.5__picomatch@4.0.3_acorn@8.15.0", "npm:@sveltejs/vite-plugin-svelte@6": "6.1.0_svelte@5.36.8__acorn@8.15.0_vite@7.0.5__picomatch@4.0.3", "npm:@tailwindcss/vite@4": "4.1.11_vite@7.0.5__picomatch@4.0.3", @@ -426,6 +427,12 @@ "rollup" ] }, + "@sveltejs/adapter-static@3.0.8_@sveltejs+kit@2.25.1__@sveltejs+vite-plugin-svelte@6.1.0___svelte@5.36.8____acorn@8.15.0___vite@7.0.5____picomatch@4.0.3__svelte@5.36.8___acorn@8.15.0__vite@7.0.5___picomatch@4.0.3__acorn@8.15.0_@sveltejs+vite-plugin-svelte@6.1.0__svelte@5.36.8___acorn@8.15.0__vite@7.0.5___picomatch@4.0.3_svelte@5.36.8__acorn@8.15.0_vite@7.0.5__picomatch@4.0.3": { + "integrity": "sha512-YaDrquRpZwfcXbnlDsSrBQNCChVOT9MGuSg+dMAyfsAa1SmiAhrA5jUYUiIMC59G92kIbY/AaQOWcBdq+lh+zg==", + "dependencies": [ + "@sveltejs/kit" + ] + }, "@sveltejs/kit@2.25.1_@sveltejs+vite-plugin-svelte@6.1.0__svelte@5.36.8___acorn@8.15.0__vite@7.0.5___picomatch@4.0.3_svelte@5.36.8__acorn@8.15.0_vite@7.0.5__picomatch@4.0.3_acorn@8.15.0": { "integrity": "sha512-8H+fxDEp7Xq6tLFdrGdS5fLu6ONDQQ9DgyjboXpChubuFdfH9QoFX09ypssBpyNkJNZFt9eW3yLmXIc9CesPCA==", "dependencies": [ @@ -1202,6 +1209,7 @@ "dependencies": [ "npm:@inlang/paraglide-js@2", "npm:@sveltejs/adapter-node@^5.2.12", + "npm:@sveltejs/adapter-static@^3.0.8", "npm:@sveltejs/kit@^2.22.0", "npm:@sveltejs/vite-plugin-svelte@6", "npm:@tailwindcss/vite@4", diff --git a/package.json b/package.json index 23a876f..1b00f3b 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ }, "dependencies": { "@inlang/paraglide-js": "^2.0.0", + "@sveltejs/adapter-static": "^3.0.8", "svelte": "^5.0.0", "svgo": "^4.0.0" } diff --git a/src/app.css b/src/app.css index 2d40759..fbcaa23 100644 --- a/src/app.css +++ b/src/app.css @@ -4,7 +4,7 @@ --font-sans: 'Adwaita Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - --font-sbb-typo: SBB, 'Helvetica_Neue', Helvetica, Inter, var(--font-sans), + --font-sbb-typo: SBB, 'Helvetica Neue', Helvetica, Inter, var(--font-sans), system-ui, sans-serif; } diff --git a/src/lib/Timetable.svelte b/src/lib/Timetable.svelte index 307b68b..9a99ca9 100644 --- a/src/lib/Timetable.svelte +++ b/src/lib/Timetable.svelte @@ -98,7 +98,8 @@ ? 'relative-offset-time' : 'offset-time' ) ?? '0') - : ((typeof process !== 'undefined' ? process.env : undefined)?.env[ + : // @ts-ignore + ((typeof process !== 'undefined' ? process.env : undefined)?.env[ isRelativeTime && !forceAbsolute ? 'PRIVATE_RELATIVE_TIME_OFFSET' : 'PRIVATE_SERVER_TIMEZONE' diff --git a/src/lib/assets/LineGlyph.svelte b/src/lib/assets/LineGlyph.svelte index ac8a0d6..bfbf838 100644 --- a/src/lib/assets/LineGlyph.svelte +++ b/src/lib/assets/LineGlyph.svelte @@ -139,14 +139,14 @@ {#if line !== undefined && line !== ''} <text xml:space="preserve" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;line-height:0;font-family:SBB;-inkscape-font-specification:'SBB Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#ffffff;stroke-width:0.0264583" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;line-height:0;{sbbFontFamilySvgDeclaration};-inkscape-font-specification:'SBB Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#ffffff;stroke-width:0.0264583" x="9.5329876" y="4.1801271" id="text1-9" data-inkscape-label="Number" ><tspan id="tspan1-8" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.28625px;line-height:0;font-family:SBB;-inkscape-font-specification:'SBB, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;text-anchor:start;fill:#ffffff;stroke-width:0.0264583" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.28625px;line-height:0;{sbbFontFamilySvgDeclaration};-inkscape-font-specification:'SBB, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;text-anchor:start;fill:#ffffff;stroke-width:0.0264583" x="9.5329876" y="4.1801271" data-sodipodi-role="line">{line}</tspan @@ -226,7 +226,7 @@ ><tspan data-sodipodi-role="line" id="tspan1" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.32594px;font-family:SBB;-inkscape-font-specification:'SBB, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.0264583" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.32594px;{sbbFontFamilySvgDeclaration};-inkscape-font-specification:'SBB, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.0264583" x="0.80801982" y="4.2193737">{routeShortName}</tspan ></text diff --git a/svelte.config.js b/svelte.config.js index df0fdce..b625c8b 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,5 @@ -import adapter from '@sveltejs/adapter-node'; +import adapterNode from '@sveltejs/adapter-node'; +import adapterStatic from '@sveltejs/adapter-static'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; /** @type {import('@sveltejs/kit').Config} */ @@ -7,9 +8,13 @@ const config = { // for more information about preprocessors preprocess: vitePreprocess(), kit: { - adapter: adapter({ - precompress: true, - }), + adapter: process.env.STATIC + ? adapterStatic({ + fallback: '404.html', + }) + : adapterNode({ + precompress: true, + }), }, }; |