This commit is contained in:
parent
cb9ad9c15d
commit
efab65fa92
12 changed files with 41 additions and 9 deletions
10
frontend/src/app.d.ts
vendored
10
frontend/src/app.d.ts
vendored
|
@ -6,7 +6,15 @@ declare global {
|
|||
// interface Locals {}
|
||||
// interface PageData {}
|
||||
// interface Platform {}
|
||||
|
||||
interface Route {
|
||||
name: string;
|
||||
duration: number;
|
||||
image: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
export {
|
||||
Route
|
||||
};
|
||||
|
|
3
frontend/src/lib/components/Header.svelte
Normal file
3
frontend/src/lib/components/Header.svelte
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div>
|
||||
<img src='/images/white-back-arrow.png' alt=''>
|
||||
</div>
|
|
@ -1,10 +1,10 @@
|
|||
<script lang="ts">
|
||||
export let type: string;
|
||||
export let color: string;
|
||||
export const path = '/path'
|
||||
export const path = `/paths/${type}`;
|
||||
</script>
|
||||
|
||||
<a href='{path}' class="route-card" >
|
||||
<a href={path} class="route-card">
|
||||
<div class="route-card-left" style="background-color: {color}">
|
||||
<img src="/images/app-bar-logo.png" alt="logo" />
|
||||
</div>
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import BottomAppBar from './components/BottomAppBar.svelte';
|
||||
import BottomAppBar from '$lib/components/BottomAppBar.svelte';
|
||||
</script>
|
||||
<slot></slot>
|
||||
<footer>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import BottomAppBar from './components/BottomAppBar.svelte';
|
||||
import Path from './components/Path.svelte';
|
||||
import Splash from './components/Splash.svelte';
|
||||
import BottomAppBar from '$lib/components/BottomAppBar.svelte';
|
||||
import Path from '$lib/components/Path.svelte';
|
||||
import Splash from '$lib/components/Splash.svelte';
|
||||
</script>
|
||||
|
||||
<Splash></Splash>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Simple Path
|
|
@ -1 +0,0 @@
|
|||
Route Page
|
6
frontend/src/routes/paths/[slug]/+layout.svelte
Normal file
6
frontend/src/routes/paths/[slug]/+layout.svelte
Normal file
|
@ -0,0 +1,6 @@
|
|||
<script>
|
||||
import Header from "$lib/components/Header.svelte";
|
||||
</script>
|
||||
|
||||
<Header></Header>
|
||||
<slot></slot>
|
14
frontend/src/routes/paths/[slug]/+page.server.ts
Normal file
14
frontend/src/routes/paths/[slug]/+page.server.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { error } from "@sveltejs/kit";
|
||||
|
||||
export const prerender = false;
|
||||
|
||||
export async function load({ params }) {
|
||||
return {
|
||||
title: params.slug,
|
||||
routes: [
|
||||
{title: 'Percorso Pianello 1', image: '/images/test-1.jpg', duration: 123123123},
|
||||
{title: 'Percorso Pianello 1', image: '/images/test-1.jpg', duration: 123123123},
|
||||
{title: 'Percorso Pianello 1', image: '/images/test-1.jpg', duration: 123123123}
|
||||
]
|
||||
}
|
||||
}
|
3
frontend/src/routes/paths/[slug]/+page.svelte
Normal file
3
frontend/src/routes/paths/[slug]/+page.svelte
Normal file
|
@ -0,0 +1,3 @@
|
|||
<script lang="ts">
|
||||
export let data;
|
||||
</script>
|
Loading…
Reference in a new issue