Compare commits

...

3 commits

Author SHA1 Message Date
dd4b3b5373 Update SvelteKitPWA config
All checks were successful
ci/woodpecker/push/build Pipeline was successful
2023-07-19 15:02:38 +02:00
69ec57cb0d Add kolorist 2023-07-19 15:02:25 +02:00
cc8bf87f3e Update MapTab component 2023-07-19 14:43:45 +02:00
11 changed files with 22 additions and 21 deletions

View file

@ -20,6 +20,7 @@
"eslint": "^8.45.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
"kolorist": "^1.8.0",
"prettier": "^3.0.0",
"prettier-plugin-svelte": "^3.0.0",
"svelte": "^4.0.0",

BIN
frontend/splash.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View file

@ -12,7 +12,7 @@
</script>
{#if visible}
<img transition:fade src="/splash.jpeg" alt="splash" />
<img transition:fade src="/splash.webp" alt="splash" />
{/if}
<style>

View file

@ -10,10 +10,13 @@
let latitude;
let longitude;
let accuracy;
const errorMessage = "Geolocation not available";
let errored = false;
const loadWorker = async () => {
const watchPosition = async () => {
if (!("geolocation" in navigator)) {
return;
errored = true;
throw new Error(errorMessage)
}
const options = {
@ -45,7 +48,7 @@
};
onMount(async () => {
await loadWorker();
await watchPosition();
leaflet = await import('leaflet');
layerGroup = leaflet.layerGroup();
@ -75,8 +78,11 @@
}
});
</script>
{#if !errored}
<div id="map" in:fade bind:this={mapElement} />
{:else}
{errorMessage}
{/if}
<style>
@import 'leaflet/dist/leaflet.css';

View file

@ -24,7 +24,7 @@
<Header></Header>
<img src='/splash.jpeg' alt='splash'>
<img src='/splash.webp' alt='splash'>
<div bind:this={divider} id='divider'>
<div id='banner'>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View file

@ -7,12 +7,6 @@ const config = {
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
files: {
serviceWorker: 'src/sw.ts',
},
serviceWorker: {
register: false
},
adapter: adapter({
precompress: false,
}),

View file

@ -5,12 +5,7 @@ import { SvelteKitPWA } from '@vite-pwa/sveltekit'
const config = {
plugins: [
sveltekit(),
SvelteKitPWA({
registerType: 'autoUpdate',
strategies: 'injectManifest',
srcDir: 'src',
filename: 'sw.ts',
})
SvelteKitPWA()
],
test: {
include: ["src/**/*.{test,spec}.{js,ts}"],

View file

@ -2741,6 +2741,11 @@ known-css-properties@^0.27.0:
resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.27.0.tgz#82a9358dda5fe7f7bd12b5e7142c0a205393c0c5"
integrity sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==
kolorist@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c"
integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==
leaflet@^1.9.4:
version "1.9.4"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.4.tgz#23fae724e282fa25745aff82ca4d394748db7d8d"