mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-02 19:55:18 +02:00
Merge pull request #586 from lkiesow/collection-dropdown
Collection view selection on mobile devices
This commit is contained in:
commit
b74fe90512
1 changed files with 15 additions and 1 deletions
|
@ -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}
|
||||
<div class="flex justify-center mx-auto">
|
||||
<select class="select select-bordered border-primary md:hidden w-full"
|
||||
value={currentView}
|
||||
on:change={changeHash}
|
||||
>
|
||||
<option value="itinerary">📅 Itinerary</option>
|
||||
<option value="all">🗒️ All Linked Items</option>
|
||||
<option value="calendar">🗓️ Calendar</option>
|
||||
<option value="map">🗺️ Map</option>
|
||||
<option value="recommendations">👍️ Recommendations</option>
|
||||
</select>
|
||||
<div class="md:flex justify-center mx-auto hidden">
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
<div role="tablist" class="tabs tabs-boxed tabs-lg max-w-full">
|
||||
<!-- svelte-ignore a11y-missing-attribute -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue