From b288daf251616b7b00d1ab99e0fd21e747bcb0a8 Mon Sep 17 00:00:00 2001 From: Vincent van der Wal Date: Wed, 22 Jul 2026 11:49:17 +0200 Subject: [PATCH] speed chart, old logo revival, softer hillshade, peaks as side feature --- README.md | 6 +- src/app.html | 2 +- src/lib/components/Map.svelte | 4 +- src/lib/components/SpeedChart.svelte | 245 +++++++++++++++++++++ src/lib/server/db.ts | 2 +- src/routes/+layout.svelte | 23 +- src/routes/+page.svelte | 99 +++------ src/routes/activities/[id]/+page.server.ts | 9 +- src/routes/activities/[id]/+page.svelte | 12 +- src/routes/upload/+page.svelte | 2 +- static/favicon.ico | Bin 0 -> 132633 bytes static/favicon.svg | 4 - static/logo.png | Bin 0 -> 60654 bytes 13 files changed, 314 insertions(+), 94 deletions(-) create mode 100644 src/lib/components/SpeedChart.svelte create mode 100644 static/favicon.ico delete mode 100644 static/favicon.svg create mode 100644 static/logo.png diff --git a/README.md b/README.md index 8c3725f..cd8eaa9 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Streba -The GPX analyser, reborn. A self-hosted web app for analysing GPX tracks and -bagging Alpine peaks. +The GPX analyser, reborn. A self-hosted web app for analysing GPX tracks - +with Alpine peak collecting on the side. - **Accounts** - anyone can sign up; activities and climbed peaks are per user. The home page is a public community overview: every member's tracks on one - worldmap plus a recent-activity feed. Uploading and peak bagging need an + worldmap plus a recent-activity feed. Uploading and peak tracking need an account. - **Upload** GPX files (drag & drop, multiple at once) - distance, ascent, moving time and an elevation profile are computed on the spot. diff --git a/src/app.html b/src/app.html index a15c06f..e71052d 100644 --- a/src/app.html +++ b/src/app.html @@ -2,7 +2,7 @@ - + + +
+ Rolling average +
+ {#each WINDOWS as option (option.w)} + + {/each} +
+
+ +
+ + {#each yTicks as tick (tick)} + + {tick} + {/each} + {#each xTicks as tick (tick)} + {tick} km + {/each} + + + + {#if hover} + + + {/if} + (hover = null)} + /> + + {#if hover} +
+ {hover.v.toFixed(1)} km/h + at {(hover.d / 1000).toFixed(2)} km +
+ {/if} +
+ + diff --git a/src/lib/server/db.ts b/src/lib/server/db.ts index 394af08..b948aad 100644 --- a/src/lib/server/db.ts +++ b/src/lib/server/db.ts @@ -300,7 +300,7 @@ export function recordAscent( return result.changes > 0; } -export function baggedPeaks(activityId: number, userId: number): (PeakRow & { climbed_at: string | null })[] { +export function reachedPeaks(activityId: number, userId: number): (PeakRow & { climbed_at: string | null })[] { return db .prepare( `SELECT p.*, a.climbed_at FROM ascents a JOIN peaks p ON p.id = a.peak_id diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index aacaea9..af6fde3 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -34,10 +34,7 @@