2020-08-01 13:11:07 +00:00
|
|
|
<template>
|
|
|
|
<div class="tile">
|
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]"
|
|
|
|
:src="`/media/${movie.covers[0].thumbnail}`"
|
|
|
|
>
|
|
|
|
</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-12 01:30:20 +00:00
|
|
|
|
|
|
|
<Details :release="movie" />
|
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-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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</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 {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title-link {
|
|
|
|
color: var(--text);
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
2020-08-02 01:44:14 +00:00
|
|
|
.cover {
|
2020-08-10 19:39:55 +00:00
|
|
|
height: 16rem;
|
|
|
|
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;
|
|
|
|
object-fit: cover;
|
|
|
|
object-position: center ;
|
2020-08-02 01:44:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-10 19:39:55 +00:00
|
|
|
.info {
|
|
|
|
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 {
|
|
|
|
padding: 0 1rem;
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
line-height: 1.5;
|
|
|
|
}
|
|
|
|
|
|
|
|
.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 {
|
|
|
|
padding: .2rem 1rem 0 1rem;
|
|
|
|
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
|
|
|
|
|
|
|
@media(max-width: $breakpoint) {
|
|
|
|
.cover {
|
|
|
|
height: 12rem;
|
|
|
|
}
|
|
|
|
}
|
2020-08-01 13:11:07 +00:00
|
|
|
</style>
|