2019-06-03 03:31:38 +00:00
|
|
|
<template>
|
2019-07-06 03:29:12 +00:00
|
|
|
<div v-if="release">
|
|
|
|
<div
|
|
|
|
class="banner"
|
|
|
|
@wheel.prevent="scrollBanner"
|
|
|
|
>
|
2019-09-25 02:52:58 +00:00
|
|
|
<div class="banner-trailer">
|
|
|
|
<video
|
|
|
|
v-if="release.trailer"
|
2019-10-30 03:45:42 +00:00
|
|
|
:src="`/media/${release.trailer.path}`"
|
|
|
|
:poster="`/media/${(release.poster && release.poster.path) || (release.photos.length && release.photos[Math.floor(Math.random() * release.photos.length)].path)}`"
|
2019-09-25 02:52:58 +00:00
|
|
|
:alt="release.title"
|
|
|
|
class="banner-item"
|
|
|
|
controls
|
|
|
|
>Sorry, the tailer cannot be played in your browser</video>
|
|
|
|
</div>
|
|
|
|
|
2019-09-10 14:48:04 +00:00
|
|
|
<a
|
|
|
|
v-for="photo in photos"
|
|
|
|
:key="`banner-${photo.index}`"
|
2019-10-30 03:45:42 +00:00
|
|
|
:href="`/media/${photo.path}`"
|
2019-09-10 14:48:04 +00:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
2019-07-06 03:29:12 +00:00
|
|
|
>
|
2019-09-10 14:48:04 +00:00
|
|
|
<img
|
2019-10-30 03:45:42 +00:00
|
|
|
:src="`/media/${photo.path}`"
|
2019-09-25 02:52:58 +00:00
|
|
|
:alt="`Photo ${photo.index + 1}`"
|
2019-09-10 14:48:04 +00:00
|
|
|
class="banner-item"
|
|
|
|
>
|
|
|
|
</a>
|
2019-07-06 03:29:12 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<h2 class="row title">{{ release.title }}</h2>
|
|
|
|
|
|
|
|
<ul class="row actors">
|
2019-10-29 04:21:51 +00:00
|
|
|
<Icon icon="star" />
|
|
|
|
|
2019-07-06 03:29:12 +00:00
|
|
|
<li
|
|
|
|
v-for="actor in release.actors"
|
|
|
|
:key="actor.id"
|
|
|
|
class="actor"
|
|
|
|
>
|
|
|
|
<a
|
2019-09-10 14:48:04 +00:00
|
|
|
:href="`/actor/${actor.slug}`"
|
2019-07-06 03:29:12 +00:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="actor-link"
|
|
|
|
>{{ actor.name }}</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
2019-11-04 04:47:37 +00:00
|
|
|
<span
|
|
|
|
v-if="release.date"
|
|
|
|
class="row"
|
|
|
|
>
|
2019-10-29 04:21:51 +00:00
|
|
|
<Icon icon="calendar2" />
|
|
|
|
|
|
|
|
<a
|
|
|
|
:href="release.url"
|
2019-11-04 04:47:37 +00:00
|
|
|
:title="`Released on ${formatDate(release.date, 'MMMM D, YYYY')}`"
|
2019-10-29 04:21:51 +00:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="date date-link"
|
|
|
|
>{{ formatDate(release.date, 'MMMM D, YYYY') }}</a>
|
|
|
|
</span>
|
|
|
|
|
2019-07-06 03:29:12 +00:00
|
|
|
<span class="row site">
|
2019-10-29 04:21:51 +00:00
|
|
|
<Icon icon="clapboard-play" />
|
|
|
|
|
2019-10-30 03:45:42 +00:00
|
|
|
<template v-if="release.studio">
|
|
|
|
<a
|
|
|
|
v-if="release.studio"
|
|
|
|
:href="release.studio.url"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="site-link"
|
|
|
|
>{{ release.studio.name }}</a>,
|
|
|
|
</template>
|
|
|
|
|
2019-07-06 03:29:12 +00:00
|
|
|
<a
|
2019-10-30 03:45:42 +00:00
|
|
|
:href="release.network.url"
|
2019-07-06 03:29:12 +00:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
2019-10-30 03:45:42 +00:00
|
|
|
class="network-link"
|
|
|
|
>{{ release.network.name }}</a>:
|
2019-07-06 03:29:12 +00:00
|
|
|
|
2019-10-30 03:45:42 +00:00
|
|
|
<a
|
|
|
|
:href="release.site.url"
|
2019-07-06 03:29:12 +00:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
2019-10-30 03:45:42 +00:00
|
|
|
class="site-link"
|
|
|
|
>{{ release.site.name }}</a>
|
2019-07-06 03:29:12 +00:00
|
|
|
</span>
|
|
|
|
|
2019-10-30 03:45:42 +00:00
|
|
|
<p
|
|
|
|
v-if="release.description"
|
|
|
|
class="row description"
|
|
|
|
>
|
2019-10-29 04:21:51 +00:00
|
|
|
<Icon icon="info2" />
|
|
|
|
{{ release.description }}
|
|
|
|
</p>
|
2019-07-06 03:29:12 +00:00
|
|
|
|
2019-11-04 04:47:37 +00:00
|
|
|
<ul
|
|
|
|
v-if="release.tags.length > 0"
|
|
|
|
class="row tags"
|
|
|
|
>
|
2019-10-29 04:21:51 +00:00
|
|
|
<Icon icon="price-tags" />
|
|
|
|
|
2019-07-06 03:29:12 +00:00
|
|
|
<li
|
|
|
|
v-for="tag in release.tags"
|
2019-10-30 03:45:42 +00:00
|
|
|
:key="`tag-${tag.slug}`"
|
2019-07-06 03:29:12 +00:00
|
|
|
class="tag"
|
|
|
|
>
|
|
|
|
<a
|
2019-09-10 14:48:04 +00:00
|
|
|
:href="`/tag/${tag.slug}`"
|
2019-07-06 03:29:12 +00:00
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="tag-link"
|
2019-10-27 23:58:54 +00:00
|
|
|
>{{ tag.name }}</a>
|
2019-07-06 03:29:12 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
2019-11-04 04:47:37 +00:00
|
|
|
|
|
|
|
<span class="row">
|
|
|
|
<Icon icon="drawer-in" />
|
|
|
|
|
|
|
|
<a
|
|
|
|
:href="`/added/${formatDate(release.dateAdded, 'YYYY-MM-DD')}`"
|
|
|
|
:title="`Added on ${formatDate(release.dateAdded, 'MMMM D, YYYY')}`"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
class="date date-link"
|
|
|
|
>{{ formatDate(release.dateAdded, 'MMMM D, YYYY') }}</a>
|
|
|
|
</span>
|
2019-06-03 03:31:38 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2019-07-06 03:29:12 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
function pageTitle() {
|
|
|
|
return this.release && this.release.title;
|
|
|
|
}
|
|
|
|
|
|
|
|
function scrollBanner(event) {
|
|
|
|
event.currentTarget.scrollLeft += event.deltaY; // eslint-disable-line no-param-reassign
|
|
|
|
}
|
|
|
|
|
2019-09-10 14:48:04 +00:00
|
|
|
function photos() {
|
2019-09-25 02:52:58 +00:00
|
|
|
if (this.release.photos.length) {
|
2019-11-05 00:41:13 +00:00
|
|
|
const set = this.release.photos.sort(({ index: indexA }, { index: indexB }) => indexA - indexB);
|
|
|
|
|
|
|
|
if (this.release.trailer) {
|
|
|
|
return set;
|
|
|
|
}
|
|
|
|
|
|
|
|
return [this.release.poster].concat(set);
|
2019-09-10 14:48:04 +00:00
|
|
|
}
|
|
|
|
|
2019-09-25 02:52:58 +00:00
|
|
|
if (this.release.poster && !this.release.trailer) {
|
|
|
|
return [this.release.poster];
|
|
|
|
}
|
|
|
|
|
2019-09-10 14:48:04 +00:00
|
|
|
return [];
|
|
|
|
}
|
|
|
|
|
2019-07-06 03:29:12 +00:00
|
|
|
async function mounted() {
|
|
|
|
[this.release] = await this.$store.dispatch('fetchReleases', this.$route.params.releaseId);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
release: null,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
pageTitle,
|
2019-09-10 14:48:04 +00:00
|
|
|
photos,
|
2019-07-06 03:29:12 +00:00
|
|
|
},
|
|
|
|
mounted,
|
|
|
|
methods: {
|
|
|
|
scrollBanner,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.banner {
|
2019-09-26 01:27:01 +00:00
|
|
|
background: $empty;
|
2019-07-06 03:29:12 +00:00
|
|
|
white-space: nowrap;
|
|
|
|
overflow-x: auto;
|
|
|
|
margin: 0 0 1rem 0;
|
|
|
|
scrollbar-width: none;
|
|
|
|
box-shadow: 0 0 3px $shadow;
|
2019-09-25 02:52:58 +00:00
|
|
|
font-size: 0;
|
2019-07-06 03:29:12 +00:00
|
|
|
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-25 02:52:58 +00:00
|
|
|
.banner-trailer {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
2019-07-06 03:29:12 +00:00
|
|
|
.banner-item {
|
|
|
|
height: 20rem;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
|
|
|
|
.row {
|
|
|
|
display: block;
|
|
|
|
padding: 0 1rem;
|
|
|
|
margin: 0 0 .5rem 0;
|
2019-10-29 04:21:51 +00:00
|
|
|
|
|
|
|
.icon {
|
|
|
|
fill: $shadow-strong;
|
|
|
|
margin: 0 .5rem 0 0;
|
|
|
|
}
|
2019-07-06 03:29:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.actors,
|
|
|
|
.tags {
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.actor,
|
|
|
|
.tag {
|
|
|
|
display: inline-block;
|
|
|
|
text-transform: capitalize;
|
|
|
|
|
|
|
|
&:not(:last-child)::after {
|
|
|
|
content: ',';
|
|
|
|
display: inline-block;
|
|
|
|
width: .6rem;
|
|
|
|
}
|
|
|
|
}
|
2019-10-29 04:21:51 +00:00
|
|
|
|
|
|
|
.date-link,
|
|
|
|
.site-link,
|
|
|
|
.network-link,
|
|
|
|
.actor-link,
|
|
|
|
.tag-link {
|
|
|
|
color: $link;
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: $primary;
|
|
|
|
}
|
|
|
|
}
|
2019-07-06 03:29:12 +00:00
|
|
|
</style>
|