From 2543390c3a909df4446102930b5677d7746b9b51 Mon Sep 17 00:00:00 2001 From: Christian Beutel <> Date: Thu, 22 Feb 2024 18:05:01 +0100 Subject: [PATCH] remodels start page --- web/src/routes/+page.svelte | 54 ++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index e0084473..a06fae03 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -15,7 +15,7 @@ let searchDropdownItems: SearchItem[] = []; - async function search(q: string) { + async function search(q: string) { const response = await ms.multiSearch({ queries: [ { @@ -50,10 +50,10 @@ } function handleSearchClick(item: SearchItem) { - - if(item.icon == "city") { + if (item.icon == "city") { goto(`/map/?lat=${item.value._geo.lat}&lon=${item.value._geo.lng}`); - } if (item.icon == "route") { + } + if (item.icon == "route") { goto(`/trail/view/${item.value}`); } } @@ -63,7 +63,9 @@ class="hero grid grid-cols-1 md:grid-cols-2" style="height: calc(100vh - 112px)" > -
+

Welcome to wanderer

@@ -85,27 +87,41 @@
-
-

- {$currentUser ? "Your" : "Explore"} trails -

-
+
+
{#each $trails as trail} {/each}
+
+

+ {$currentUser ? "Trails for you" : "Explore some trails"} +

+
+ Here are some trails you might like. Or you can just go to the full + list right now. +
+ All Trails +
-
-

By category

-
+
+
+

Categories

+
+ Did you know? You cannot only save you hiking trails. There are many categories for all your adventures. +
+
+
{#each $categories as category} {/each}