Add re size when clicking on map
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
5bcd76d099
commit
8f17da9da2
3 changed files with 15 additions and 6 deletions
|
@ -49,6 +49,7 @@
|
||||||
<style>
|
<style>
|
||||||
#container {
|
#container {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
height: 80%;
|
||||||
}
|
}
|
||||||
#tabs {
|
#tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -76,6 +77,7 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active {
|
.active {
|
||||||
|
|
|
@ -72,7 +72,10 @@
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await watchPosition();
|
await watchPosition();
|
||||||
leaflet = await import('leaflet');
|
leaflet = await import('leaflet');
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
renderMap()
|
renderMap()
|
||||||
|
}, 500);
|
||||||
});
|
});
|
||||||
|
|
||||||
onDestroy(async () => {
|
onDestroy(async () => {
|
||||||
|
|
|
@ -7,17 +7,17 @@
|
||||||
|
|
||||||
let divider;
|
let divider;
|
||||||
|
|
||||||
const tabClick = (event) => {
|
let isMap = false;
|
||||||
if (event.detail.component === MapTab) {
|
|
||||||
|
|
||||||
}
|
const tabClick = (event) => {
|
||||||
|
isMap = event.detail.component === MapTab;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Header></Header>
|
<Header></Header>
|
||||||
<img src="/images/splash-background.webp" alt="splash" />
|
<img src="/images/splash-background.webp" alt="splash" />
|
||||||
|
|
||||||
<div bind:this={divider} id="divider">
|
<div bind:this={divider} id="divider" class:move-to-top={isMap}>
|
||||||
<div id="banner">
|
<div id="banner">
|
||||||
<p class='path-name'>Percorso <b>{data.name_it}</b></p>
|
<p class='path-name'>Percorso <b>{data.name_it}</b></p>
|
||||||
<p id="duration">Dislivello {data?.route_sport_details[0]?.elevation_gain} m</p>
|
<p id="duration">Dislivello {data?.route_sport_details[0]?.elevation_gain} m</p>
|
||||||
|
@ -30,10 +30,14 @@
|
||||||
background: white;
|
background: white;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
transition: transform 400ms;
|
|
||||||
align-self: end;
|
align-self: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.move-to-top {
|
||||||
|
align-self: start !important;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 10vh - 10px);
|
height: calc(100% - 10vh - 10px);
|
||||||
|
|
Loading…
Reference in a new issue