mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-28 17:29:36 +02:00
refactor: Remove unused toast functionality and map marker code
This commit is contained in:
parent
c5cbea1c20
commit
9c6fcea589
3 changed files with 0 additions and 291 deletions
|
@ -1,26 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
// @ts-nocheck
|
|
||||||
|
|
||||||
import { DefaultMarker, MapEvents, MapLibre, Popup } from 'svelte-maplibre';
|
|
||||||
function addMarker(e: CustomEvent<MapMouseEvent>) {
|
|
||||||
markers = [];
|
|
||||||
markers = [...markers, { lngLat: e.detail.lngLat }];
|
|
||||||
console.log(markers);
|
|
||||||
}
|
|
||||||
let markers = [];
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<MapLibre
|
|
||||||
style="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"
|
|
||||||
class="relative aspect-[9/16] max-h-[70vh] w-full sm:aspect-video sm:max-h-full"
|
|
||||||
standardControls
|
|
||||||
>
|
|
||||||
<!-- MapEvents gives you access to map events even from other components inside the map,
|
|
||||||
where you might not have access to the top-level `MapLibre` component. In this case
|
|
||||||
it would also work to just use on:click on the MapLibre component itself. -->
|
|
||||||
<MapEvents on:click={addMarker} />
|
|
||||||
|
|
||||||
{#each markers as marker}
|
|
||||||
<DefaultMarker lngLat={marker.lngLat} />
|
|
||||||
{/each}
|
|
||||||
</MapLibre>
|
|
|
@ -1,12 +0,0 @@
|
||||||
<script>
|
|
||||||
import { addToast } from '$lib/toasts';
|
|
||||||
|
|
||||||
const showToast = () => {
|
|
||||||
addToast('success', 'This is a success message!');
|
|
||||||
addToast('error', 'This is an error message!');
|
|
||||||
addToast('info', 'This is an info message!');
|
|
||||||
addToast('warning', 'This is a warning message!');
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<button on:click={showToast}>Show Toast</button>
|
|
|
@ -1,253 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="flex flex-col min-h-dvh">
|
|
||||||
<main class="flex-1">
|
|
||||||
<div class="max-w-5xl mx-auto p-4 md:p-6 lg:p-8">
|
|
||||||
<div class="grid gap-8">
|
|
||||||
<div>
|
|
||||||
<img
|
|
||||||
src="https://mauioceancenter.com/wp-content/uploads/2017/05/beach-1630540_1920-1-1024x683.jpg"
|
|
||||||
alt="Trip"
|
|
||||||
width="1200"
|
|
||||||
height="600"
|
|
||||||
class="w-full h-auto object-cover rounded-lg"
|
|
||||||
style="aspect-ratio: 1200 / 600; object-fit: cover;"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="grid gap-4">
|
|
||||||
<div class="flex items-center justify-between">
|
|
||||||
<div>
|
|
||||||
<h1 class="text-4xl mt-2 font-bold">Maui, Hawaii</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center gap-1">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 fill-primary"
|
|
||||||
>
|
|
||||||
<polygon
|
|
||||||
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
|
|
||||||
></polygon>
|
|
||||||
</svg>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 fill-primary"
|
|
||||||
>
|
|
||||||
<polygon
|
|
||||||
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
|
|
||||||
></polygon>
|
|
||||||
</svg>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 fill-primary"
|
|
||||||
>
|
|
||||||
<polygon
|
|
||||||
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
|
|
||||||
></polygon>
|
|
||||||
</svg>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 fill-muted stroke-muted-foreground"
|
|
||||||
>
|
|
||||||
<polygon
|
|
||||||
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
|
|
||||||
></polygon>
|
|
||||||
</svg>
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 fill-muted stroke-muted-foreground"
|
|
||||||
>
|
|
||||||
<polygon
|
|
||||||
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
|
|
||||||
></polygon>
|
|
||||||
</svg>
|
|
||||||
<span class="text-sm font-medium">4.3</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="grid gap-2">
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 text-muted-foreground"
|
|
||||||
>
|
|
||||||
<rect width="18" height="11" x="3" y="11" rx="2" ry="2"></rect>
|
|
||||||
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
|
|
||||||
</svg>
|
|
||||||
<span class="text-sm text-muted-foreground">Public</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 text-muted-foreground"
|
|
||||||
>
|
|
||||||
<path d="M8 2v4"></path>
|
|
||||||
<path d="M16 2v4"></path>
|
|
||||||
<rect width="18" height="18" x="3" y="4" rx="2"></rect>
|
|
||||||
<path d="M3 10h18"></path>
|
|
||||||
</svg>
|
|
||||||
<span class="text-sm text-muted-foreground">June 1 - June 10, 2024</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 text-muted-foreground"
|
|
||||||
>
|
|
||||||
<path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z"></path>
|
|
||||||
<circle cx="12" cy="10" r="3"></circle>
|
|
||||||
</svg>
|
|
||||||
<span class="text-sm text-muted-foreground">Maui, Hawaii, USA</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 text-muted-foreground"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"
|
|
||||||
></path>
|
|
||||||
</svg>
|
|
||||||
<span class="text-sm text-muted-foreground">Snorkeling, Hiking, Relaxing</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
class="w-5 h-5 text-muted-foreground"
|
|
||||||
>
|
|
||||||
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
|
|
||||||
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
|
|
||||||
</svg>
|
|
||||||
<a href="#" class="text-sm text-muted-foreground hover:underline">
|
|
||||||
www.example.com/maui-trip
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="grid gap-2">
|
|
||||||
<p class="text-sm text-muted-foreground">
|
|
||||||
Enjoy the beautiful beaches, lush tropical forests, and stunning waterfalls of Maui.
|
|
||||||
This trip is perfect for those looking to relax, explore, and create lasting memories.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
data-orientation="horizontal"
|
|
||||||
role="none"
|
|
||||||
class="shrink-0 bg-border h-[1px] w-full my-8"
|
|
||||||
></div>
|
|
||||||
<div class="grid gap-8">
|
|
||||||
<div>
|
|
||||||
<h2 class="text-2xl font-bold mt-4">Trip Details</h2>
|
|
||||||
<div class="grid gap-4 mt-4">
|
|
||||||
<div class="grid md:grid-cols-2 gap-4">
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-muted-foreground">Trip Type</p>
|
|
||||||
<p class="text-base font-medium">Beach Vacation</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-muted-foreground">Collection</p>
|
|
||||||
<p class="text-base font-medium">Summer Getaways</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="grid md:grid-cols-2 gap-4">
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-muted-foreground">Latitude</p>
|
|
||||||
<p class="text-base font-medium">20.7984° N</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-muted-foreground">Longitude</p>
|
|
||||||
<p class="text-base font-medium">156.3319° W</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
<footer
|
|
||||||
class="flex flex-col gap-2 sm:flex-row py-6 w-full shrink-0 items-center px-4 md:px-6 border-t"
|
|
||||||
>
|
|
||||||
<p class="text-xs text-muted-foreground">© 2024 Travel App. All rights reserved.</p>
|
|
||||||
<nav class="sm:ml-auto flex gap-4 sm:gap-6"></nav>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
Loading…
Add table
Add a link
Reference in a new issue