Restored old release tile layout.

This commit is contained in:
ThePendulum 2020-05-09 02:17:10 +02:00
parent f31aef6f5d
commit 70594156fd
1 changed files with 142 additions and 166 deletions

View File

@ -1,10 +1,10 @@
<template> <template>
<div <div
:id="`${release.type}-${release.id}`" :id="`${release.type}-${release.id}`"
:class="{ [release.type]: true }"
class="tile" class="tile"
> >
<div class="scene"> <span class="poster">
<div class="poster">
<span class="details"> <span class="details">
<router-link <router-link
v-if="release.site && release.site.independent" v-if="release.site && release.site.independent"
@ -44,7 +44,7 @@
v-tooltip.bottom="release.url && `View scene on ${release.site.name}`" v-tooltip.bottom="release.url && `View scene on ${release.site.name}`"
:title="release.url && `View scene on ${release.site.name}`" :title="release.url && `View scene on ${release.site.name}`"
:href="release.url" :href="release.url"
:class="{ upcoming: isUpcoming, new: release.isNew }" :class="{ upcoming: isAfter(release.date, new Date()), new: release.isNew }"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
class="date" class="date"
@ -95,7 +95,7 @@
class="thumbnail" class="thumbnail"
>No thumbnail available</div> >No thumbnail available</div>
</a> </a>
</div> </span>
<div class="info"> <div class="info">
<a <a
@ -148,7 +148,6 @@
</ul> </ul>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -166,15 +165,6 @@ export default {
type: String, type: String,
default: null, default: null,
}, },
index: {
type: Number,
default: null,
},
},
data() {
return {
isUpcoming: this.isAfter(this.release.date, new Date()),
};
}, },
computed: { computed: {
sfw, sfw,
@ -186,38 +176,23 @@ export default {
@import 'theme'; @import 'theme';
.tile { .tile {
width: 100%; background: $background;
position: relative;
background: var(--background);
box-shadow: 0 0 3px var(--shadow-weak);
&::before {
content: '';
display: inline-block;
padding: 45%;
}
}
.scene {
width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
box-sizing: border-box; box-sizing: border-box;
position: absolute; padding: 0 0 .5rem 0;
top: 0;
left: 0;
overflow: hidden; overflow: hidden;
box-shadow: 0 0 3px $shadow-weak;
height: 100%;
} }
.poster { .poster {
flex-grow: 1;
height: 0;
position: relative; position: relative;
margin: 0 0 .5rem 0;
} }
.covers { .covers {
background: var(--profile); background: $profile;
display: flex; display: flex;
.cover { .cover {
@ -227,15 +202,16 @@ export default {
.thumbnail { .thumbnail {
width: 100%; width: 100%;
height: 100%; height: 14rem;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
object-fit: cover; object-fit: cover;
background-position: center; background-position: center;
background-size: cover; background-size: cover;
background-color: var(--darken-hint); background-color: $shadow-hint;
color: var(--shadow); color: $shadow;
text-shadow: 1px 1px 0 $highlight;
} }
.row { .row {
@ -262,10 +238,10 @@ export default {
.site, .site,
.date { .date {
color: var(--text-light); color: $text-contrast;
display: flex; display: flex;
align-items: center; align-items: center;
background: var(--darken); background: $shadow;
position: relative; position: relative;
font-size: .8rem; font-size: .8rem;
padding: .25rem; padding: .25rem;
@ -275,7 +251,7 @@ export default {
.date { .date {
&.upcoming:before { &.upcoming:before {
content: ''; content: '';
background: var(--primary); background: $primary;
width: .5rem; width: .5rem;
display: inline-block; display: inline-block;
position: absolute; position: absolute;
@ -295,14 +271,14 @@ export default {
.site-link { .site-link {
display: flex; display: flex;
color: var(--text-light); color: $text-contrast;
text-decoration: none; text-decoration: none;
} }
.info { .info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: .5rem 0; flex-grow: 1;
} }
.link { .link {
@ -311,7 +287,7 @@ export default {
.title { .title {
margin: 0 .25rem .25rem 0; margin: 0 .25rem .25rem 0;
color: var(--text); color: $text;
max-height: 2.75rem; max-height: 2.75rem;
font-size: 1rem; font-size: 1rem;
line-height: 1.5; line-height: 1.5;
@ -359,26 +335,26 @@ export default {
text-decoration: none; text-decoration: none;
&:hover { &:hover {
color: var(--primary); color: $primary;
} }
} }
.actor-link { .actor-link {
color: var(--link); color: $link;
} }
.tag-link { .tag-link {
color: var(--shadow); color: $shadow;
display: inline-block; display: inline-block;
padding: .25rem; padding: .25rem;
font-size: .75rem; font-size: .75rem;
font-weight: bold; font-weight: bold;
text-decoration: none; text-decoration: none;
line-height: 1; line-height: 1;
border: solid 1px var(--shadow-hint); border: solid 1px $shadow-hint;
&:hover { &:hover {
color: var(--primary); color: $primary;
} }
} }
</style> </style>