Update routes
This commit is contained in:
parent
2644aa37f0
commit
f1858c6fef
2 changed files with 13 additions and 6 deletions
|
@ -6,11 +6,11 @@
|
||||||
<div id="image" style="background-image: url(/images/test-1.jpg" />
|
<div id="image" style="background-image: url(/images/test-1.jpg" />
|
||||||
<div id='path-holder'>
|
<div id='path-holder'>
|
||||||
<div style='font-size: 20px;'>Percorso</div>
|
<div style='font-size: 20px;'>Percorso</div>
|
||||||
<p>{route.name}</p>
|
<p>{route.title_it}</p>
|
||||||
</div>
|
</div>
|
||||||
<div id='duration-holder'>
|
<div id='duration-holder'>
|
||||||
<div style='font-size: 15px;'>Durata</div>
|
<div style='font-size: 15px;'>Dislivello</div>
|
||||||
<p id="duration">{Math.floor(Number(route.duration) / 60)}'</p>
|
<p id="duration">{route.elevation_gain}</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,22 @@
|
||||||
import BottomAppBar from '$lib/components/BottomAppBar.svelte';
|
import BottomAppBar from '$lib/components/BottomAppBar.svelte';
|
||||||
import Path from '$lib/components/Path.svelte';
|
import Path from '$lib/components/Path.svelte';
|
||||||
import Splash from '$lib/components/Splash.svelte';
|
import Splash from '$lib/components/Splash.svelte';
|
||||||
|
import { onMount } from 'svelte';
|
||||||
|
import {getRouteCategories} from '$lib/repo';
|
||||||
|
|
||||||
|
let categories = [];
|
||||||
|
onMount(async () => {
|
||||||
|
categories = await getRouteCategories();
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Splash />
|
<Splash />
|
||||||
<main>
|
<main>
|
||||||
<div id="welcome-message">Benvenuti a <span class="bold">Pianello Val Tidone</span></div>
|
<div id="welcome-message">Benvenuti a <span class="bold">Pianello Val Tidone</span></div>
|
||||||
<div id="route-cards">
|
<div id="route-cards">
|
||||||
<Path color="#de0e1b" type="naturalistici" />
|
{#each categories as category}
|
||||||
<Path color="#f6ae04" type="storici" />
|
<Path color="#de0e1b" name="{category.name_it}" id="{category.id}" />
|
||||||
<Path color="#213c8b" type="tradizionalistici" />
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue