Merge pull request #586 from lkiesow/collection-dropdown
Collection view selection on mobile devices
This commit is contained in:
@@ -308,6 +308,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeHash(event) {
|
||||||
|
window.location.hash = '#' + event.target.value;
|
||||||
|
}
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (data.props.adventure) {
|
if (data.props.adventure) {
|
||||||
collection = data.props.adventure;
|
collection = data.props.adventure;
|
||||||
@@ -772,7 +776,17 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if collection.id}
|
{#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 -->
|
<!-- svelte-ignore a11y-missing-attribute -->
|
||||||
<div role="tablist" class="tabs tabs-boxed tabs-lg max-w-full">
|
<div role="tablist" class="tabs tabs-boxed tabs-lg max-w-full">
|
||||||
<!-- svelte-ignore a11y-missing-attribute -->
|
<!-- svelte-ignore a11y-missing-attribute -->
|
||||||
|
|||||||
Reference in New Issue
Block a user