mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 14:59:36 +02:00
remove image
This commit is contained in:
parent
6b9cd48603
commit
b9ebbafd76
2 changed files with 409 additions and 422 deletions
|
@ -184,14 +184,14 @@
|
||||||
<dialog id="my_modal_1" class="modal">
|
<dialog id="my_modal_1" class="modal">
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||||
<div class="modal-box w-11/12 max-w-6xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
|
<div class="modal-box w-11/12 max-w-2xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
|
||||||
<h3 class="font-bold text-lg">Edit {adventureToEdit.type} Adventure</h3>
|
<h3 class="font-bold text-lg">Edit {adventureToEdit.type} Adventure</h3>
|
||||||
{#if adventureToEdit.id === '' || isDetails}
|
{#if adventureToEdit.id === '' || isDetails}
|
||||||
<div class="modal-action items-center">
|
<div class="modal-action items-center">
|
||||||
<form method="post" style="width: 100%;" on:submit={handleSubmit}>
|
<form method="post" style="width: 100%;" on:submit={handleSubmit}>
|
||||||
<!-- Grid layout for form fields -->
|
<!-- Grid layout for form fields -->
|
||||||
<h2 class="text-2xl font-semibold mb-2">Basic Information</h2>
|
<h2 class="text-2xl font-semibold mb-2">Basic Information</h2>
|
||||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3">
|
<!-- <div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3"> -->
|
||||||
<div>
|
<div>
|
||||||
<label for="name">Name</label><br />
|
<label for="name">Name</label><br />
|
||||||
<input
|
<input
|
||||||
|
@ -342,11 +342,11 @@
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<h2 class="text-2xl font-semibold mb-2 mt-4">Location Information</h2>
|
<h2 class="text-2xl font-semibold mb-2 mt-4">Location Information</h2>
|
||||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
|
<!-- <div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"> -->
|
||||||
<div>
|
<div>
|
||||||
<label for="latitude">Location</label><br />
|
<label for="latitude">Location</label><br />
|
||||||
<input
|
<input
|
||||||
|
@ -358,7 +358,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<form on:submit={geocode}>
|
<form on:submit={geocode} class="mt-2">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Seach for a location"
|
placeholder="Seach for a location"
|
||||||
|
@ -367,17 +367,18 @@
|
||||||
name="search"
|
name="search"
|
||||||
bind:value={query}
|
bind:value={query}
|
||||||
/>
|
/>
|
||||||
<button type="submit">Search</button>
|
<button class="btn btn-neutral -mt-1" type="submit">Search</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
{#if places.length > 0}
|
{#if places.length > 0}
|
||||||
<div class="mt-4">
|
<div class="mt-4 max-w-full">
|
||||||
<h3 class="font-bold text-lg mb-4">Search Results</h3>
|
<h3 class="font-bold text-lg mb-4">Search Results</h3>
|
||||||
<ul>
|
|
||||||
|
<div class="flex flex-wrap">
|
||||||
{#each places as place}
|
{#each places as place}
|
||||||
<li>
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-neutral mb-2"
|
class="btn btn-neutral mb-2 mr-2 max-w-full break-words whitespace-normal text-left"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
markers = [
|
markers = [
|
||||||
{
|
{
|
||||||
|
@ -391,15 +392,13 @@
|
||||||
>
|
>
|
||||||
{place.display_name}
|
{place.display_name}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<p class="text-error text-lg">No results found</p>
|
<p class="text-error text-lg">No results found</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<MapLibre
|
<MapLibre
|
||||||
style="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
style="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
||||||
|
|
|
@ -56,13 +56,12 @@
|
||||||
$: if (markers.length > 0) {
|
$: if (markers.length > 0) {
|
||||||
newAdventure.latitude = Math.round(markers[0].lngLat.lat * 1e6) / 1e6;
|
newAdventure.latitude = Math.round(markers[0].lngLat.lat * 1e6) / 1e6;
|
||||||
newAdventure.longitude = Math.round(markers[0].lngLat.lng * 1e6) / 1e6;
|
newAdventure.longitude = Math.round(markers[0].lngLat.lng * 1e6) / 1e6;
|
||||||
if (!newAdventure.location) {
|
// if (!newAdventure.location) {
|
||||||
newAdventure.location = markers[0].location;
|
newAdventure.location = markers[0].location;
|
||||||
}
|
// }
|
||||||
if (!newAdventure.name) {
|
|
||||||
newAdventure.name = markers[0].name;
|
newAdventure.name = markers[0].name;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
async function geocode(e: Event | null) {
|
async function geocode(e: Event | null) {
|
||||||
if (e) {
|
if (e) {
|
||||||
|
@ -176,7 +175,7 @@
|
||||||
<dialog id="my_modal_1" class="modal">
|
<dialog id="my_modal_1" class="modal">
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
||||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||||
<div class="modal-box w-11/12 max-w-6xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
|
<div class="modal-box w-11/12 max-w-2xl" role="dialog" on:keydown={handleKeydown} tabindex="0">
|
||||||
<h3 class="font-bold text-lg">New {type} Adventure</h3>
|
<h3 class="font-bold text-lg">New {type} Adventure</h3>
|
||||||
{#if newAdventure.id === ''}
|
{#if newAdventure.id === ''}
|
||||||
<div class="modal-action items-center">
|
<div class="modal-action items-center">
|
||||||
|
@ -188,7 +187,7 @@
|
||||||
>
|
>
|
||||||
<!-- Grid layout for form fields -->
|
<!-- Grid layout for form fields -->
|
||||||
<h2 class="text-2xl font-semibold mb-2">Basic Information</h2>
|
<h2 class="text-2xl font-semibold mb-2">Basic Information</h2>
|
||||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3">
|
<!-- <div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3"> -->
|
||||||
<div>
|
<div>
|
||||||
<label for="name">Name</label><br />
|
<label for="name">Name</label><br />
|
||||||
<input
|
<input
|
||||||
|
@ -222,16 +221,7 @@
|
||||||
on:click={() => (type = 'planned')}
|
on:click={() => (type = 'planned')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<label for="location">Location</label><br />
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
id="location"
|
|
||||||
name="location"
|
|
||||||
bind:value={newAdventure.location}
|
|
||||||
class="input input-bordered w-full"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<label for="date">Date</label><br />
|
<label for="date">Date</label><br />
|
||||||
<input
|
<input
|
||||||
|
@ -360,11 +350,11 @@
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<h2 class="text-2xl font-semibold mb-2 mt-4">Location Information</h2>
|
<h2 class="text-2xl font-semibold mb-2 mt-4">Location Information</h2>
|
||||||
<div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3">
|
<!-- <div class="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3"> -->
|
||||||
<div>
|
<div>
|
||||||
<label for="latitude">Location</label><br />
|
<label for="latitude">Location</label><br />
|
||||||
<input
|
<input
|
||||||
|
@ -376,7 +366,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<form on:submit={geocode}>
|
<form on:submit={geocode} class="mt-2">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Seach for a location"
|
placeholder="Seach for a location"
|
||||||
|
@ -385,17 +375,18 @@
|
||||||
name="search"
|
name="search"
|
||||||
bind:value={query}
|
bind:value={query}
|
||||||
/>
|
/>
|
||||||
<button type="submit">Search</button>
|
<button class="btn btn-neutral -mt-1" type="submit">Search</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
{#if places.length > 0}
|
{#if places.length > 0}
|
||||||
<div class="mt-4">
|
<div class="mt-4 max-w-full">
|
||||||
<h3 class="font-bold text-lg mb-4">Search Results</h3>
|
<h3 class="font-bold text-lg mb-4">Search Results</h3>
|
||||||
<ul>
|
|
||||||
|
<div class="flex flex-wrap">
|
||||||
{#each places as place}
|
{#each places as place}
|
||||||
<li>
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-neutral mb-2"
|
class="btn btn-neutral mb-2 mr-2 max-w-full break-words whitespace-normal text-left"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
markers = [
|
markers = [
|
||||||
{
|
{
|
||||||
|
@ -409,15 +400,12 @@
|
||||||
>
|
>
|
||||||
{place.display_name}
|
{place.display_name}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<p class="text-error text-lg">No results found</p>
|
<p class="text-error text-lg">No results found</p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<MapLibre
|
<MapLibre
|
||||||
style="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
style="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue