share: added background image
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Artem Anufrij 2023-02-18 00:16:08 +01:00
parent e61b1fac01
commit 813b1c09fc
7 changed files with 84 additions and 37 deletions

View File

@ -1,5 +1,5 @@
{ {
"backend_dev": "http://localhost:31204", "backend_de": "http://localhost:31204",
"backend_de": "https://webplay.rocks", "backend_dev": "https://webplay.rocks",
"backend": "https://webplay.rocks" "backend": "https://webplay.rocks"
} }

View File

@ -89,7 +89,9 @@ td.fillCell>* {
#artistViewer #background, #artistViewer #background,
#albumViewer #background, #albumViewer #background,
#boxViewer #background { #boxViewer #background,
#albumContent #background,
#boxContent #background {
background-size: cover; background-size: cover;
background-position: center; background-position: center;
top: -16px; top: -16px;
@ -591,6 +593,10 @@ td.fillCell>* {
animation: glow 1s infinite alternate; animation: glow 1s infinite alternate;
} }
.z-1 {
z-index: -1;
}
.z1 { .z1 {
z-index: 1; z-index: 1;
} }

View File

@ -136,6 +136,10 @@ h6.slim {
font-weight: normal; font-weight: normal;
} }
.relative {
position: relative;
}
input { input {
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
@ -511,6 +515,14 @@ label.yellow50 {
border-color: var(--yellow); border-color: var(--yellow);
} }
button.faded {
opacity: 0.25;
}
button.faded:hover {
opacity: 1;
}
button.medium { button.medium {
padding: 8px; padding: 8px;
} }

View File

@ -1,21 +1,24 @@
<template> <template>
<div id="content" class="flex-column"> <div id="albumContent" class="flex-column">
<div class="flex-column pa-horizontal border-bottom hideOnMobile"> <div class="flex-column pa-horizontal border-bottom hideOnMobile">
<h1>{{ album.title }}</h1> <h1>{{ album.title }}</h1>
<h2>{{ album.artist_name }}</h2> <h2>{{ album.artist_name }}</h2>
</div> </div>
<div id="tracks" class="flex-row"> <div id="album" class="flex-row">
<div class="flex-column"> <div id="header" class="flex-column relative">
<img id="cover" class="shadow ma24" :src="cover" /> <div id="background" :style="coverBackground" />
<img id="cover" class="shadow ma24 z1" :src="cover" />
<p class="center ma-off hideOnMobile"> <p class="center ma-off hideOnMobile">
<b>{{ album.tracks.length }}</b> Tracks <b>{{ album.tracks.length }}</b> Tracks
</p> </p>
</div> </div>
<ul id="trackList" class="tracks"> <div id="tracks" class="flex-column grow">
<li v-for="track in album.tracks" :key="track._id"> <ul id="trackList" class="tracks">
<TrackItem :track="track" :showCover="false" /> <li v-for="track in album.tracks" :key="track._id">
</li> <TrackItem :track="track" :showCover="false" />
</ul> </li>
</ul>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -43,6 +46,9 @@ export default {
} }
return this.album.covers.cover256; return this.album.covers.cover256;
}, },
coverBackground() {
return "background-image: url('" + this.cover + "'); z-index: -1";
},
}, },
components: { components: {
TrackItem, TrackItem,
@ -56,16 +62,27 @@ export default {
width: 256px; width: 256px;
} }
#content, #albumContent {
#tracks { overflow: hidden;
}
#album {
overflow: auto; overflow: auto;
} }
#header {
overflow: hidden;
}
#tracks {
background-color: var(--white);
overflow-y: auto;
}
@media (max-width: 480px) { @media (max-width: 480px) {
#tracks { #album {
flex-direction: column; flex-direction: column;
max-height: 100%;
} }
#trackList { #tracks {
border-top: 1px solid var(--light-border); border-top: 1px solid var(--light-border);
} }
} }

View File

@ -1,20 +1,23 @@
<template> <template>
<div id="content" class="flex-column"> <div id="boxContent" class="flex-column">
<div class="flex-column pa-horizontal border-bottom hideOnMobile"> <div class="flex-column pa-horizontal border-bottom hideOnMobile">
<h1>{{ box.title }}</h1> <h1>{{ box.title }}</h1>
</div> </div>
<div id="videos" class="flex-row"> <div id="box" class="flex-row">
<div class="flex-column"> <div id="header" class="flex-column relative">
<div id="background" :style="coverBackground" />
<img id="cover" class="shadow ma24" :src="cover" /> <img id="cover" class="shadow ma24" :src="cover" />
<p class="center ma-off hideOnMobile"> <p class="center ma-off hideOnMobile">
<b>{{ box.videos.length }}</b> Videos <b>{{ box.videos.length }}</b> Videos
</p> </p>
</div> </div>
<ul id="videoList" class="videos"> <div id="videos" class="flex-column grow">
<li v-for="video in box.videos" :key="video._id"> <ul id="videoList" class="videos">
<VideoItem :video="video" /> <li v-for="video in box.videos" :key="video._id">
</li> <VideoItem :video="video" />
</ul> </li>
</ul>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -42,6 +45,9 @@ export default {
} }
return this.box.covers.cover256; return this.box.covers.cover256;
}, },
coverBackground() {
return "background-image: url('" + this.cover + "'); z-index: -1";
},
}, },
components: { components: {
VideoItem, VideoItem,
@ -55,20 +61,32 @@ export default {
width: 256px; width: 256px;
} }
#content, #boxContent {
#videos { overflow: hidden;
}
#box {
overflow: auto; overflow: auto;
} }
#header {
overflow: hidden;
}
#videos {
background-color: var(--white);
overflow-y: auto;
}
.video { .video {
max-width: 256px; max-width: 256px;
} }
@media (max-width: 480px) { @media (max-width: 480px) {
#videos { #box {
flex-direction: column; flex-direction: column;
max-height: 100%;
} }
#videoList { #videos {
border-top: 1px solid var(--light-border); border-top: 1px solid var(--light-border);
} }
.video { .video {

View File

@ -21,8 +21,8 @@
<p class="grow ma-off"> <p class="grow ma-off">
{{ share.title }} {{ share.title }}
</p> </p>
<button class="flat danger" @click="shareDisable(share)"> <button class="flat danger faded" @click="shareDisable(share)" title="Disable Sharing">
<awesome-icon icon="trash" /> <awesome-icon icon="trash-alt" />
</button> </button>
</div> </div>
</li> </li>

View File

@ -87,7 +87,7 @@
<button <button
@click="deleteUser(user)" @click="deleteUser(user)"
title="Remove Useraccount" title="Remove Useraccount"
class="flat danger" class="flat danger faded"
v-if="user._id != me._id" v-if="user._id != me._id"
> >
<awesome-icon icon="trash-alt" /> <awesome-icon icon="trash-alt" />
@ -198,12 +198,6 @@ export default {
#usersBody .me { #usersBody .me {
font-weight: bold; font-weight: bold;
} }
#usersBody table button {
opacity: 0.25;
}
#usersBody table button:hover {
opacity: 1;
}
#usersBody .user-role { #usersBody .user-role {
display: flex; display: flex;
align-items: center; align-items: center;