mobile optimize popups and notifications

This commit is contained in:
2023-09-29 16:03:32 +02:00
parent 7e4b04570e
commit bcc32f9b28
4 changed files with 126 additions and 83 deletions

View File

@@ -22,6 +22,11 @@ module.exports = ( app, settings ) => {
} );
app.get( '/startPage/assets/:image', ( req, res ) => {
res.sendFile( path.join( __dirname + '/../assets/' + settings.startPage + '/assets/' + req.param.image ) );
res.sendFile( path.join( __dirname + '/../assets/' + settings.startPage + '/assets/' + req.params.image ) );
} );
app.get( '/startPage/preview/:template', ( req, res ) => {
// TODO: only allow when logged in
res.sendFile( path.join( __dirname + '/../ui/home/templates/' + req.params.template + '/index.html' ) );
} );
};

File diff suppressed because one or more lines are too long

View File

@@ -130,52 +130,12 @@
z-index: 10;
color: white;
transition: all 0.5s;
}
.default {
width: 95vw;
right: 2.5vw;
top: 1vh;
height: 10vh;
width: 15vw;
}
.small {
height: 7vh;
width: 11vw;
}
.big {
height: 12vh;
width: 17vw;
}
.bigger {
height: 15vh;
width: 20vw;
}
.huge {
height: 20vh;
width: 25vw;
}
.topleft {
top: 3vh;
left: 0.5vw;
}
.topright {
top: 3vh;
right: 0.5vw;
}
.bottomright {
bottom: 3vh;
right: 0.5vw;
}
.bottomleft {
top: 3vh;
right: 0.5vw;
}
.message-container {
display: flex;
@@ -238,4 +198,80 @@
transform: rotate( 720deg );
}
}
@media only screen and (min-width: 750px) {
.default {
height: 10vh;
width: 32vw;
}
.small {
height: 7vh;
width: 27vw;
}
.big {
height: 12vh;
width: 38vw;
}
.bigger {
height: 15vh;
width: 43vw;
}
.huge {
height: 20vh;
width: 50vw;
}
.topleft {
top: 3vh;
left: 0.5vw;
}
.topright {
top: 3vh;
right: 0.5vw;
}
.bottomright {
bottom: 3vh;
right: 0.5vw;
}
.bottomleft {
top: 3vh;
right: 0.5vw;
}
}
@media only screen and (min-width: 1500px) {
.default {
height: 10vh;
width: 15vw;
}
.small {
height: 7vh;
width: 11vw;
}
.big {
height: 12vh;
width: 17vw;
}
.bigger {
height: 15vh;
width: 20vw;
}
.huge {
height: 20vh;
width: 25vw;
}
}
</style>

View File

@@ -170,8 +170,6 @@
}
</script>
<!-- TODO: optimize for mobile -->
<style scoped>
#popup-backdrop {
position: fixed;
@@ -222,6 +220,8 @@
border: none;
border-radius: 20px;
background-color: var( --popup-color );
width: 90vw;
height: 80vh;
}
.popup-iframe {
@@ -233,31 +233,6 @@
height: 100%;
}
.small {
width: 40%;
height: 40%;
}
.normal {
width: 50%;
height: 50%;
}
.big {
width: 60%;
height: 60%;
}
.bigger {
width: 70%;
height: 70%;
}
.huge {
width: 80%;
height: 80%;
}
.message-container {
height: 90%;
width: 90%;
@@ -309,4 +284,31 @@
border: solid var( --primary-color ) 1px;
border-radius: 100%;
}
@media only screen and (min-width: 999px) {
.small {
width: 40%;
height: 40%;
}
.normal {
width: 50%;
height: 50%;
}
.big {
width: 60%;
height: 60%;
}
.bigger {
width: 70%;
height: 70%;
}
.huge {
width: 80%;
height: 80%;
}
}
</style>