2020-08-01 13:11:07 +00:00
|
|
|
<template>
|
|
|
|
<div class="tile">
|
2021-01-25 22:01:07 +00:00
|
|
|
<Details :release="movie" />
|
|
|
|
|
2020-08-08 16:10:59 +00:00
|
|
|
<div class="movie">
|
|
|
|
<router-link
|
2020-09-08 00:20:15 +00:00
|
|
|
:to="{ name: 'movie', params: { releaseId: movie.id, releaseSlug: movie.slug } }"
|
2020-08-08 16:10:59 +00:00
|
|
|
class="cover"
|
2020-08-02 01:44:14 +00:00
|
|
|
>
|
2020-08-08 16:10:59 +00:00
|
|
|
<img
|
|
|
|
v-if="movie.covers[0]"
|
2021-02-22 01:33:39 +00:00
|
|
|
:src="getPath(movie.covers[0], 'thumbnail')"
|
|
|
|
:style="{ 'background-image': getBgPath(movie.covers[0], 'lazy') }"
|
2020-12-27 22:10:11 +00:00
|
|
|
loading="lazy"
|
2020-08-08 16:10:59 +00:00
|
|
|
>
|
|
|
|
</router-link>
|
2020-08-02 01:44:14 +00:00
|
|
|
|
2020-08-08 16:10:59 +00:00
|
|
|
<div class="info">
|
|
|
|
<router-link
|
2020-09-08 00:20:15 +00:00
|
|
|
:to="{ name: 'movie', params: { releaseId: movie.id, releaseSlug: movie.slug } }"
|
2020-08-08 16:10:59 +00:00
|
|
|
class="title-link"
|
|
|
|
>
|
|
|
|
<h3 class="title">{{ movie.title }}</h3>
|
|
|
|
</router-link>
|
2020-08-10 19:39:55 +00:00
|
|
|
|
|
|
|
<ul
|
|
|
|
class="actors nolist"
|
|
|
|
:title="movie.actors.map(actor => actor.name).join(', ')"
|
|
|
|
>
|
|
|
|
<li
|
|
|
|
v-for="actor in movie.actors"
|
|
|
|
:key="`tag-${movie.id}-${actor.id}`"
|
|
|
|
class="actor"
|
|
|
|
><router-link
|
|
|
|
:to="`/actor/${actor.id}/${actor.slug}`"
|
|
|
|
class="actor-link"
|
|
|
|
>{{ actor.name }}</router-link></li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ul
|
|
|
|
class="tags nolist"
|
|
|
|
:title="movie.tags.map(tag => tag.name).join(', ')"
|
|
|
|
>
|
|
|
|
<li
|
|
|
|
v-for="tag in movie.tags"
|
|
|
|
:key="`tag-${movie.id}-${tag.id}`"
|
|
|
|
class="tag"
|
|
|
|
><router-link
|
|
|
|
:to="`/tag/${tag.slug}`"
|
|
|
|
class="tag-link"
|
|
|
|
>{{ tag.name }}</router-link></li>
|
|
|
|
</ul>
|
2020-08-08 16:10:59 +00:00
|
|
|
</div>
|
2020-08-02 01:44:14 +00:00
|
|
|
</div>
|
2020-08-01 13:11:07 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-08-12 01:30:20 +00:00
|
|
|
import Details from './tile-details.vue';
|
|
|
|
|
2020-12-27 22:10:11 +00:00
|
|
|
function sfw() {
|
|
|
|
return this.$store.state.ui.sfw;
|
|
|
|
}
|
|
|
|
|
2020-08-01 13:11:07 +00:00
|
|
|
export default {
|
2020-08-12 01:30:20 +00:00
|
|
|
components: {
|
|
|
|
Details,
|
|
|
|
},
|
2020-08-01 13:11:07 +00:00
|
|
|
props: {
|
|
|
|
movie: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
2020-12-27 22:10:11 +00:00
|
|
|
computed: {
|
|
|
|
sfw,
|
|
|
|
},
|
2020-08-01 13:11:07 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2020-08-12 01:30:20 +00:00
|
|
|
@import 'breakpoints';
|
|
|
|
|
2020-08-01 13:11:07 +00:00
|
|
|
.tile {
|
2020-08-02 01:44:14 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-08-01 13:11:07 +00:00
|
|
|
background: var(--background);
|
2020-08-10 19:39:55 +00:00
|
|
|
box-shadow: 0 0 3px var(--darken-weak);
|
2020-08-02 01:44:14 +00:00
|
|
|
font-size: 0;
|
2020-08-01 13:11:07 +00:00
|
|
|
}
|
|
|
|
|
2020-08-08 16:10:59 +00:00
|
|
|
.movie {
|
2021-02-10 02:00:17 +00:00
|
|
|
height: 16rem;
|
2020-08-08 16:10:59 +00:00
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title-link {
|
|
|
|
color: var(--text);
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
2020-08-02 01:44:14 +00:00
|
|
|
.cover {
|
2021-02-10 02:00:17 +00:00
|
|
|
height: 100%;
|
2020-08-10 19:39:55 +00:00
|
|
|
box-shadow: 0 0 3px var(--darken-weak);
|
2020-08-08 16:10:59 +00:00
|
|
|
|
2020-08-02 01:44:14 +00:00
|
|
|
img {
|
2020-08-10 19:39:55 +00:00
|
|
|
height: 100%;
|
|
|
|
max-width: 12rem;
|
2020-12-27 22:10:11 +00:00
|
|
|
background-position: center;
|
|
|
|
background-size: cover;
|
2020-08-10 19:39:55 +00:00
|
|
|
object-fit: cover;
|
2020-12-27 22:10:11 +00:00
|
|
|
object-position: center;
|
2020-08-02 01:44:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-10 19:39:55 +00:00
|
|
|
.info {
|
2021-02-10 02:00:17 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-08-10 19:39:55 +00:00
|
|
|
flex-grow: 1;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2020-08-01 13:11:07 +00:00
|
|
|
.title {
|
2020-08-10 19:39:55 +00:00
|
|
|
box-sizing: border-box;
|
2020-08-01 13:11:07 +00:00
|
|
|
padding: 1rem;
|
|
|
|
margin: 0;
|
|
|
|
font-size: 1rem;
|
2020-08-10 19:39:55 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.actors {
|
2021-02-10 02:00:17 +00:00
|
|
|
height: 0;
|
|
|
|
flex-grow: 1;
|
2020-08-10 19:39:55 +00:00
|
|
|
padding: 0 1rem;
|
|
|
|
line-height: 1.5;
|
2021-02-10 02:00:17 +00:00
|
|
|
overflow: hidden;
|
2020-08-10 19:39:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.actor:not(:last-child)::after {
|
|
|
|
content: ',';
|
|
|
|
margin: 0 .25rem 0 0;
|
|
|
|
font-size: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.actor-link {
|
|
|
|
font-size: 1rem;
|
|
|
|
color: var(--link);
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tags {
|
2021-02-10 02:00:17 +00:00
|
|
|
padding: .25rem 1rem;
|
2020-08-10 19:39:55 +00:00
|
|
|
height: 1.75rem;
|
|
|
|
line-height: 2;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tag {
|
|
|
|
margin: 0 0 .5rem 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tag-link {
|
|
|
|
background: var(--background);
|
|
|
|
font-size: .75rem;
|
|
|
|
padding: .25rem .5rem;
|
|
|
|
color: var(--shadow);
|
|
|
|
font-weight: bold;
|
|
|
|
text-decoration: none;
|
|
|
|
box-shadow: 0 0 3px var(--shadow-weak);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--primary);
|
|
|
|
}
|
2020-08-01 13:11:07 +00:00
|
|
|
}
|
2020-08-12 01:30:20 +00:00
|
|
|
|
2021-08-21 22:40:22 +00:00
|
|
|
@media(max-width: $breakpoint-kilo) {
|
2021-02-10 02:00:17 +00:00
|
|
|
.movie {
|
2020-08-12 01:30:20 +00:00
|
|
|
height: 12rem;
|
|
|
|
}
|
2021-02-10 02:00:17 +00:00
|
|
|
|
|
|
|
/* ensure no half actor names show */
|
|
|
|
.actors {
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
}
|
2020-08-12 01:30:20 +00:00
|
|
|
}
|
2020-08-01 13:11:07 +00:00
|
|
|
</style>
|