Fixed release banner, improved album layout.

This commit is contained in:
DebaucheryLibrarian 2021-01-23 23:03:21 +01:00
parent 0a7378feb4
commit 0f29151200
3 changed files with 36 additions and 32 deletions

View File

@ -11,7 +11,7 @@
/> />
</div> </div>
<div class="album"> <div class="album-items">
<div <div
v-for="item in items" v-for="item in items"
:key="item.id" :key="item.id"
@ -63,14 +63,12 @@ export default {
left: 0; left: 0;
background: var(--shadow-extreme); background: var(--shadow-extreme);
z-index: 10; z-index: 10;
overflow-y: auto;
} }
.album-header { .album-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-shrink: 0; flex-shrink: 0;
overflow: hidden;
} }
.album-title { .album-title {
@ -78,7 +76,7 @@ export default {
flex-grow: 1; flex-grow: 1;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 1rem; padding: .5rem 1rem;
margin: 0; margin: 0;
color: var(--text-light); color: var(--text-light);
white-space: nowrap; white-space: nowrap;
@ -87,8 +85,8 @@ export default {
} }
.close { .close {
width: 2rem; width: 1.5rem;
height: 2rem; height: 1.5rem;
padding: 1rem; padding: 1rem;
fill: var(--lighten); fill: var(--lighten);
@ -98,14 +96,15 @@ export default {
} }
} }
.album { .album-items {
display: grid; display: grid;
flex-grow: 1; flex-grow: 1;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
grid-gap: 1rem; grid-gap: 0 1rem;
padding: 1rem; padding: 1rem;
overflow-y: auto;
} }
.item-container { .item-container {
@ -114,13 +113,24 @@ export default {
justify-content: center; justify-content: center;
} }
.item-link {
height: 100%;
}
.item { .item {
height: 15rem; width: 100%;
margin: 0 0 1rem 0;
} }
@media(max-width: $breakpoint) { @media(max-width: $breakpoint) {
.album { .album-items {
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
} }
} }
@media(max-width: $breakpoint-nano) {
.album-items {
grid-template-columns: repeat(auto-fill, 1fr);
}
}
</style> </style>

View File

@ -1,5 +1,8 @@
<template> <template>
<div class="media"> <div
class="media"
:class="{ center: release.photos.length < 2 }"
>
<div <div
v-if="release.trailer || release.teaser" v-if="release.trailer || release.teaser"
class="trailer-container" class="trailer-container"
@ -161,12 +164,16 @@ export default {
@import 'breakpoints'; @import 'breakpoints';
.media { .media {
height: 18rem;
flex-shrink: 0; flex-shrink: 0;
white-space: nowrap; white-space: nowrap;
font-size: 0; font-size: 0;
} }
.media.center {
width: 1200px;
margin: 0 auto;
}
.poster-link { .poster-link {
position: absolute; position: absolute;
top: .5rem; top: .5rem;
@ -238,6 +245,7 @@ export default {
.item { .item {
max-width: 100%; max-width: 100%;
height: 18rem;
box-shadow: 0 0 3px var(--shadow-weak); box-shadow: 0 0 3px var(--shadow-weak);
background-size: cover; background-size: cover;
} }
@ -269,23 +277,7 @@ export default {
} }
} }
@media(max-width: $breakpoint-kilo) {
.media.expanded {
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}
}
@media(max-width: $breakpoint) {
.media.expanded {
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
}
@media(max-width: $breakpoint-micro) { @media(max-width: $breakpoint-micro) {
.media.expanded {
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}
.media:not(.expanded) .item, .media:not(.expanded) .item,
.trailer-container { .trailer-container {
height: 56vw; /* 16:9 ratio for full-width video */ height: 56vw; /* 16:9 ratio for full-width video */

View File

@ -8,8 +8,9 @@
class="scroll-light" class="scroll-light"
:expandable="false" :expandable="false"
> >
<Media <Banner
:release="release" :release="release"
class="media"
@load="slotProps.loaded" @load="slotProps.loaded"
/> />
</Scroll> </Scroll>
@ -17,6 +18,7 @@
<Details :release="release" /> <Details :release="release" />
<button <button
v-if="release.photos.length > 0"
class="album-toggle" class="album-toggle"
@click="showAlbum = true" @click="showAlbum = true"
><Icon icon="grid3" />View album</button> ><Icon icon="grid3" />View album</button>
@ -197,7 +199,7 @@
<script> <script>
import Details from './details.vue'; import Details from './details.vue';
import Media from './media.vue'; import Banner from './banner.vue';
import Album from '../album/album.vue'; import Album from '../album/album.vue';
import Tags from './tags.vue'; import Tags from './tags.vue';
import Clips from './clips.vue'; import Clips from './clips.vue';
@ -226,7 +228,7 @@ export default {
Actor, Actor,
Album, Album,
Details, Details,
Media, Banner,
Scroll, Scroll,
Releases, Releases,
Clips, Clips,