diff --git a/frontend/src/lib/components/Route.svelte b/frontend/src/lib/components/Route.svelte index b2b23c0..e7ddd16 100644 --- a/frontend/src/lib/components/Route.svelte +++ b/frontend/src/lib/components/Route.svelte @@ -6,11 +6,11 @@
Percorso
-

{route.name}

+

{route.title_it}

-
Durata
-

{Math.floor(Number(route.duration) / 60)}'

+
Dislivello
+

{route.elevation_gain}

diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index d4174bf..079a159 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -2,15 +2,22 @@ import BottomAppBar from '$lib/components/BottomAppBar.svelte'; import Path from '$lib/components/Path.svelte'; import Splash from '$lib/components/Splash.svelte'; + import { onMount } from 'svelte'; + import {getRouteCategories} from '$lib/repo'; + + let categories = []; + onMount(async () => { + categories = await getRouteCategories(); + })
Benvenuti a Pianello Val Tidone
- - - + {#each categories as category} + + {/each}