Compare commits
8 commits
c9faabc945
...
ac97696c6a
Author | SHA1 | Date | |
---|---|---|---|
ac97696c6a | |||
a37f8a3f29 | |||
fbad879acb | |||
eac85ec934 | |||
eb69f00c26 | |||
9d940a29c3 | |||
5e23f48937 | |||
03ff5947fc |
8 changed files with 1030 additions and 118 deletions
1055
frontend/package-lock.json
generated
1055
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -32,6 +32,7 @@
|
|||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@sentry/sveltekit": "^7.90.0",
|
||||
"leaflet": "^1.9.4",
|
||||
"leaflet-gpx": "^1.7.0",
|
||||
"svelte-preprocess": "^5.1.3"
|
||||
|
|
41
frontend/src/error.html
Normal file
41
frontend/src/error.html
Normal file
|
@ -0,0 +1,41 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
background-image: url(/splash.webp);
|
||||
background-size: cover;
|
||||
display: grid;
|
||||
place-content: center;
|
||||
height: 100%;
|
||||
font-size: 24px;
|
||||
font-family: monospace;
|
||||
}
|
||||
.wrapper {
|
||||
display: flex;
|
||||
backdrop-filter: blur(5px);
|
||||
border-radius: 10px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
#status {
|
||||
border-right: 1px solid black;
|
||||
}
|
||||
p {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<p id="status">Code %sveltekit.status%</p>
|
||||
<p id="message">%sveltekit.error.message%</p>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
5
frontend/src/hooks.client.ts
Normal file
5
frontend/src/hooks.client.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
export async function handleError({ error, event, status, message }) {
|
||||
return {
|
||||
message
|
||||
};
|
||||
}
|
|
@ -1,4 +1,10 @@
|
|||
export async function handle({ event, resolve }) {
|
||||
const response = await resolve(event);
|
||||
return response;
|
||||
}
|
||||
|
||||
export async function handleError({ error, event, status, message }) {
|
||||
return {
|
||||
message
|
||||
};
|
||||
}
|
|
@ -5,12 +5,12 @@
|
|||
<div id="grid">
|
||||
<div>
|
||||
<p>Distanza</p>
|
||||
<p>{route.route_sport_details[1].distance} m</p>
|
||||
<p>{route?.route_sport_details[1]?.distance} m</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Dislivello Positivo</p>
|
||||
<p>{route.route_sport_details[1].elevation_gain}</p>
|
||||
<p>{route?.route_sport_details[1]?.elevation_gain}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@ -20,32 +20,32 @@
|
|||
|
||||
<div>
|
||||
<p>Difficolta</p>
|
||||
<p>{route.route_sport_details[1].difficulty_it}</p>
|
||||
<p>{route?.route_sport_details[1]?.difficulty_it}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Dislivello Negativo</p>
|
||||
<p>{route.route_sport_details[1].elevation_loss}</p>
|
||||
<p>{route?.route_sport_details[1]?.elevation_loss}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Durata</p>
|
||||
<p>{route.route_sport_details[1].duration}'</p>
|
||||
<p>{route?.route_sport_details[1]?.duration}'</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Altitudine max</p>
|
||||
<p>{route.route_sport_details[1].altitude_max}</p>
|
||||
<p>{route?.route_sport_details[1]?.altitude_max}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Altitudine min</p>
|
||||
<p>{route.route_sport_details[1].altitude_min}</p>
|
||||
<p>{route?.route_sport_details[1]?.altitude_min}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Tipo Percorso</p>
|
||||
<p>{route.route_sport_details[1].route_type_it}</p>
|
||||
<p>{route?.route_sport_details[1]?.route_type_it}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
<div id="grid">
|
||||
<div>
|
||||
<p>Distanza</p>
|
||||
<p>{route.route_sport_details[0].distance} m</p>
|
||||
<p>{route?.route_sport_details[0]?.distance} m</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Dislivello Positivo</p>
|
||||
<p>{route.route_sport_details[0].elevation_gain}</p>
|
||||
<p>{route?.route_sport_details[0]?.elevation_gain}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@ -20,32 +20,32 @@
|
|||
|
||||
<div>
|
||||
<p>Difficolta</p>
|
||||
<p>{route.route_sport_details[0].difficulty_it}</p>
|
||||
<p>{route?.route_sport_details[0]?.difficulty_it}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Dislivello Negativo</p>
|
||||
<p>{route.route_sport_details[0].elevation_loss}</p>
|
||||
<p>{route?.route_sport_details[0]?.elevation_loss}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Durata</p>
|
||||
<p>{route.route_sport_details[0].duration}'</p>
|
||||
<p>{route?.route_sport_details[0]?.duration}'</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Altitudine max</p>
|
||||
<p>{route.route_sport_details[0].altitude_max}</p>
|
||||
<p>{route?.route_sport_details[0]?.altitude_max}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Altitudine min</p>
|
||||
<p>{route.route_sport_details[0].altitude_min}</p>
|
||||
<p>{route?.route_sport_details[0]?.altitude_min}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Tipo Percorso</p>
|
||||
<p>{route.route_sport_details[0].route_type_it}</p>
|
||||
<p>{route?.route_sport_details[0]?.route_type_it}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
export const prerender = false;
|
||||
export const ssr = true;
|
||||
export const csr = true;
|
||||
|
||||
/**
|
||||
* This is a global configuration for using sveltekit
|
||||
* custom 'fetch' function that enables a lot of things
|
||||
*/
|
||||
export async function load({ fetch }) {
|
||||
window.fetch = fetch;
|
||||
}
|
Loading…
Reference in a new issue