Improvements on status image (avatar)

This commit is contained in:
Niko 2022-02-14 16:42:23 +01:00
parent 4ef4767318
commit 230b406722
3 changed files with 22 additions and 3 deletions

View File

@ -101,6 +101,16 @@ main {
height: 100vh;
filter: blur(30px);
}
.meet.item .status-avatar img {
max-width: 30em;
}
@media (max-width: 700px) {
.meet.item .status-avatar img {
max-width: 20em !important;
position: relative;
top: -3em;
}
}
.meet.item .black {
background: linear-gradient(to right, #00000082, #00000063, #00000063, #00000082);
}

8
web/src/app/js/media.js Normal file
View File

@ -0,0 +1,8 @@
app.media = {
view: function(url) {
if (url.matches(/.*\.(jpg|jpeg|png|ico|webp)$/)) {
// TODO: load a template (with overlay) and set image
console.log(url);
}
},
}

View File

@ -2,9 +2,10 @@
<div class="back-avatar" style="background-image:url({avatar})"></div>
<div class="absolute-top width-max height-max black"></div>
<div class="absolute-top width-max height-max content">
<div class="flex">
<img class="center" style="max-width: 20em"
src="{avatar}"/>
<div class="status-avatar flex">
<a class="center" href="javascript:app.media.view('{avatar}')"/>
<img src="{avatar}"/>
</a>
</div>
<div>
<div class="status fixed-bottom"