From e40ea028d0d1abf121c91ebd26b34c248204f166 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Sat, 26 Apr 2025 22:53:45 +0200 Subject: [PATCH] Collection view selection on mobile devices The tab-based selection of views in a collection doesn't really work on mobile devices since it needs too much horizontal space. This leads to text overflowing buttons as well as half of the tab bar disappearing behind the right edge of the phone screen. This patch modifies the navigation by keeping the current tabs in desktop mode, but switching to a very compact dropdown on mobile devices. The functionality of both elements is identical. --- .../src/routes/collections/[id]/+page.svelte | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/collections/[id]/+page.svelte b/frontend/src/routes/collections/[id]/+page.svelte index ab12175..b57af12 100644 --- a/frontend/src/routes/collections/[id]/+page.svelte +++ b/frontend/src/routes/collections/[id]/+page.svelte @@ -308,6 +308,10 @@ } } + function changeHash(event) { + window.location.hash = '#' + event.target.value; + } + onMount(() => { if (data.props.adventure) { collection = data.props.adventure; @@ -772,7 +776,17 @@ {/if} {#if collection.id} -
+ +