do not register service worker on development
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Alessio Davoli 2023-07-24 12:37:10 +02:00
parent 0135d749f0
commit b09aca2c20
5 changed files with 8 additions and 13 deletions

View file

@ -22,6 +22,7 @@
box-shadow: 0 0 50px #ccc;
border-radius: 30px;
width: calc((100% - 50px) / 2);
height: calc(100vh/3 - 10vh );
font-size: 18px;
}

View file

@ -6,6 +6,8 @@
let node;
onMount(() => {
if(import.meta.env.DEV) return;
if ('serviceWorker' in navigator) {
addEventListener('load', function () {
navigator.serviceWorker.register('/service-worker.js');

View file

@ -16,13 +16,10 @@
<style>
main {
width: 100%;
display: grid;
margin: 0 auto;
height: 100%;
margin: 0px;
font-family: 'Roboto-Regular';
display: flex;
flex-direction: column;
place-items: center;
}
.bold {
@ -31,7 +28,6 @@
}
#welcome-message {
font-size: 18px;
height: 15%;
display: grid;
width: 100%;
place-content: center;
@ -40,11 +36,7 @@
}
#route-cards {
height: 80%;
display: flex;
flex-direction: column;
height: 100%;
display: grid;
width: 100%;
align-items: center;
}
</style>

View file

@ -20,7 +20,7 @@
gap: 15px;
padding-top: 10px;
margin-top: 70px;
height: calc(100% - 140px - 10vh);
height: calc(100% - 70px - 10vh);
overflow-y: scroll;
}
</style>

View file

@ -38,7 +38,7 @@
img {
width: 100%;
height: 100%;
height: calc(100% - 10vh);
position: absolute;
z-index: -1;
}