2023-12-30 05:29:53 +00:00
|
|
|
<template>
|
2024-03-14 23:08:24 +00:00
|
|
|
<div
|
|
|
|
class="tile"
|
|
|
|
:class="{
|
2024-03-27 02:15:37 +00:00
|
|
|
unstashed: !favorited && pageStash && user && pageStash.user.id === user?.id,
|
2024-03-21 04:16:19 +00:00
|
|
|
'is-new': scene.isNew,
|
2024-03-14 23:08:24 +00:00
|
|
|
}"
|
|
|
|
>
|
2024-03-03 01:33:35 +00:00
|
|
|
<div class="poster-container">
|
|
|
|
<Link
|
2024-03-26 23:06:03 +00:00
|
|
|
:href="`/scene/${scene.id}/${scene.slug || ''}`"
|
2024-03-25 01:08:09 +00:00
|
|
|
:title="scene.title"
|
2024-03-03 01:33:35 +00:00
|
|
|
target="_blank"
|
|
|
|
class="poster"
|
2023-12-30 05:29:53 +00:00
|
|
|
>
|
2024-03-03 01:33:35 +00:00
|
|
|
<img
|
|
|
|
v-if="scene.poster"
|
2024-03-26 23:06:03 +00:00
|
|
|
:src="getPath(scene.poster, 'thumbnail')"
|
|
|
|
:style="{ 'background-image': `url(${getPath(scene.poster, 'lazy')})` }"
|
2024-03-03 01:33:35 +00:00
|
|
|
loading="lazy"
|
2024-06-08 00:02:33 +00:00
|
|
|
fetchpriority="low"
|
2024-03-03 01:33:35 +00:00
|
|
|
class="thumbnail"
|
|
|
|
>
|
2024-03-17 22:55:36 +00:00
|
|
|
|
|
|
|
<Icon
|
|
|
|
v-else
|
|
|
|
icon="clapboard"
|
|
|
|
/>
|
2024-03-03 01:33:35 +00:00
|
|
|
</Link>
|
|
|
|
|
2024-03-27 01:28:21 +00:00
|
|
|
<Heart
|
|
|
|
domain="scenes"
|
|
|
|
:item="scene"
|
|
|
|
:show-secondary="false"
|
|
|
|
class="light tiled"
|
2024-03-27 02:05:32 +00:00
|
|
|
@stashed="(stash) => { favorited = stash.id === currentStash.id ? true : favorited; }"
|
|
|
|
@unstashed="(stash) => { favorited = stash.id === currentStash.id ? false : favorited; }"
|
2024-03-03 01:33:35 +00:00
|
|
|
/>
|
2024-03-21 04:16:19 +00:00
|
|
|
|
|
|
|
<span
|
|
|
|
v-if="scene.isNew"
|
|
|
|
:title="`Newly added ${format(scene.createdAt, 'yyyy-MM-dd')}`"
|
|
|
|
class="new"
|
|
|
|
><Icon icon="star-full" /></span>
|
2024-03-03 01:33:35 +00:00
|
|
|
</div>
|
2023-12-30 05:29:53 +00:00
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
<div class="channel">
|
|
|
|
<Link
|
|
|
|
:href="scene.channel.isIndependent || !scene.network ? `/${scene.channel.type}/${scene.channel.slug}` : `/${scene.network.type}/${scene.network.slug}`"
|
|
|
|
class="favicon-link"
|
|
|
|
>
|
|
|
|
<img
|
|
|
|
:src="scene.channel.isIndependent || !scene.network ? `/logos/${scene.channel.slug}/favicon.png` : `/logos/${scene.network.slug}/favicon.png`"
|
|
|
|
class="favicon"
|
|
|
|
>
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
<Link
|
|
|
|
:href="`/${scene.channel.type}/${scene.channel.slug}`"
|
|
|
|
class="nolink channel-link"
|
|
|
|
>{{ scene.channel.name }}</Link>
|
|
|
|
</div>
|
|
|
|
|
2024-06-04 00:27:06 +00:00
|
|
|
<Link
|
2024-06-22 20:51:57 +00:00
|
|
|
:href="scene.watchUrl"
|
2024-06-04 02:46:38 +00:00
|
|
|
:title="scene.date ? format(scene.date.toISOString(), 'y-MM-dd hh:mm') : `Release date unknown, added ${format(scene.createdAt, 'y-MM-dd')}`"
|
2024-06-04 00:27:06 +00:00
|
|
|
target="_blank"
|
|
|
|
class="date-link nolink"
|
2024-06-22 20:55:55 +00:00
|
|
|
:data-umami-event="scene.affiliate ? 'scenetile-date-click-aff' : 'scenetile-date-click'"
|
|
|
|
:data-umami-event-aff-id="scene.affiliate?.id"
|
|
|
|
:data-umami-event-scene-id="scene.id"
|
2024-06-04 00:27:06 +00:00
|
|
|
>
|
|
|
|
<time
|
|
|
|
:datetime="scene.effectiveDate.toISOString()"
|
|
|
|
class="date"
|
2024-06-04 02:46:38 +00:00
|
|
|
:class="{ nodate: !scene.date }"
|
2024-08-19 21:31:28 +00:00
|
|
|
>{{ format(scene.effectiveDate, {
|
|
|
|
month: 'MMM y',
|
|
|
|
year: 'y',
|
2024-08-20 00:43:23 +00:00
|
|
|
}[scene.datePrecision] || 'MMM d, y') }}</time>
|
2024-06-04 00:27:06 +00:00
|
|
|
</Link>
|
2023-12-30 05:29:53 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<Link
|
2024-03-26 23:06:03 +00:00
|
|
|
:href="`/scene/${scene.id}/${scene.slug || ''}`"
|
2023-12-30 05:29:53 +00:00
|
|
|
:title="scene.title"
|
|
|
|
target="_blank"
|
|
|
|
class="row title nolink"
|
|
|
|
>{{ scene.title }}</Link>
|
|
|
|
|
|
|
|
<ul
|
|
|
|
class="row actors nolist"
|
|
|
|
:title="scene.actors.map((actor) => actor.name).join(', ')"
|
|
|
|
>
|
|
|
|
<li
|
|
|
|
v-for="actor in scene.actors"
|
|
|
|
:key="`actor-${scene.id}-${actor.id}`"
|
|
|
|
class="actor"
|
|
|
|
>
|
|
|
|
<Link
|
|
|
|
:href="`/actor/${actor.id}/${actor.slug}`"
|
|
|
|
class="nolink"
|
|
|
|
>{{ actor.name }}</Link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ul
|
|
|
|
class="row tags nolist"
|
|
|
|
:title="scene.tags.map((tag) => tag.name).join(', ')"
|
|
|
|
>
|
|
|
|
<li
|
|
|
|
v-for="tag in scene.tags"
|
|
|
|
:key="`tag-${scene.id}-${tag.id}`"
|
|
|
|
class="tag"
|
|
|
|
>
|
|
|
|
<Link
|
|
|
|
:href="`/tag/${tag.slug}`"
|
|
|
|
class="nolink"
|
|
|
|
>{{ tag.name }}</Link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-03-03 01:33:35 +00:00
|
|
|
import { ref, inject } from 'vue';
|
2023-12-30 05:29:53 +00:00
|
|
|
import { format } from 'date-fns';
|
|
|
|
|
2024-03-26 23:06:03 +00:00
|
|
|
import getPath from '#/src/get-path.js';
|
2024-03-03 01:33:35 +00:00
|
|
|
|
2024-03-27 01:28:21 +00:00
|
|
|
import Heart from '#/components/stashes/heart.vue';
|
2024-03-03 01:33:35 +00:00
|
|
|
|
|
|
|
const props = defineProps({
|
2023-12-30 05:29:53 +00:00
|
|
|
scene: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
});
|
2024-03-03 01:33:35 +00:00
|
|
|
|
|
|
|
const pageContext = inject('pageContext');
|
|
|
|
const user = pageContext.user;
|
2024-03-14 23:08:24 +00:00
|
|
|
const pageStash = pageContext.pageProps.stash;
|
2024-03-27 02:15:37 +00:00
|
|
|
const currentStash = pageStash || user?.primaryStash;
|
2024-03-03 01:33:35 +00:00
|
|
|
|
2024-03-27 02:05:32 +00:00
|
|
|
const favorited = ref(props.scene.stashes.some((sceneStash) => sceneStash.id === currentStash.id));
|
2023-12-30 05:29:53 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.tile {
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
background: var(--background-base);
|
|
|
|
border-radius: .25rem;
|
|
|
|
box-shadow: 0 0 3px var(--shadow-weak-30);
|
2024-02-27 00:20:15 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
box-shadow: 0 0 3px var(--shadow-weak-20);
|
2024-03-03 01:33:35 +00:00
|
|
|
|
2024-03-27 01:28:21 +00:00
|
|
|
:deep(.bookmarks) .icon:not(.favorited):not(:hover) {
|
2024-03-03 01:33:35 +00:00
|
|
|
fill: var(--text-light);
|
|
|
|
}
|
2024-02-27 00:20:15 +00:00
|
|
|
}
|
2024-03-14 23:08:24 +00:00
|
|
|
|
|
|
|
&.unstashed {
|
|
|
|
opacity: .5;
|
|
|
|
}
|
2023-12-30 05:29:53 +00:00
|
|
|
}
|
|
|
|
|
2024-03-03 01:33:35 +00:00
|
|
|
.poster-container {
|
|
|
|
position: relative;
|
2024-03-17 22:55:36 +00:00
|
|
|
overflow: hidden;
|
|
|
|
font-size: 0;
|
2024-03-03 01:33:35 +00:00
|
|
|
}
|
|
|
|
|
2023-12-30 05:29:53 +00:00
|
|
|
.poster {
|
2024-03-17 22:55:36 +00:00
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
aspect-ratio: 16/9;
|
2023-12-30 05:29:53 +00:00
|
|
|
border-radius: .25rem .25rem 0 0;
|
|
|
|
overflow: hidden;
|
2024-03-17 22:55:36 +00:00
|
|
|
background: var(--background-dark-20);
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
width: 3rem;
|
|
|
|
height: 3rem;
|
2024-06-10 01:24:48 +00:00
|
|
|
fill: var(--glass-weak-40);
|
2024-03-17 22:55:36 +00:00
|
|
|
}
|
2023-12-30 05:29:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.thumbnail {
|
|
|
|
width: 100%;
|
2024-03-17 22:55:36 +00:00
|
|
|
height: 100%;
|
2023-12-30 05:29:53 +00:00
|
|
|
object-fit: cover;
|
2024-03-17 22:55:36 +00:00
|
|
|
object-position: 50% 50%;
|
2023-12-30 05:29:53 +00:00
|
|
|
background-size: cover;
|
|
|
|
background-position: center;
|
|
|
|
}
|
|
|
|
|
2024-03-21 04:16:19 +00:00
|
|
|
.new {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
align-items: center;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
right: .5rem;
|
|
|
|
padding: .2rem .5rem .1rem .5rem;
|
|
|
|
border-radius: .25rem .25rem 0 0;
|
|
|
|
background: var(--grey-dark-40);
|
|
|
|
color: var(--gold);
|
|
|
|
font-size: .7rem;
|
|
|
|
font-weight: bold;
|
|
|
|
box-shadow: 0 0 3px var(--shadow-weak-20);
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
width: .75rem;
|
|
|
|
height: .75rem;
|
|
|
|
fill: var(--gold);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-30 05:29:53 +00:00
|
|
|
.meta {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
2024-06-04 00:27:06 +00:00
|
|
|
align-items: stretch;
|
|
|
|
padding: 0 .5rem;
|
2023-12-30 05:29:53 +00:00
|
|
|
border-radius: 0 0 .25rem .25rem;
|
|
|
|
margin-bottom: .5rem;
|
2024-03-21 04:16:19 +00:00
|
|
|
position: relative;
|
2023-12-30 05:29:53 +00:00
|
|
|
font-size: .8rem;
|
|
|
|
color: var(--text-light);
|
|
|
|
background: var(--shadow-strong-30);
|
|
|
|
box-shadow: 0 0 3px var(--shadow);
|
|
|
|
}
|
|
|
|
|
|
|
|
.channel {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
font-weight: bold;
|
2024-06-04 00:27:06 +00:00
|
|
|
padding: .4rem 0;
|
2023-12-30 05:29:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.favicon-link {
|
|
|
|
display: inline-flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.favicon {
|
|
|
|
width: 1rem;
|
|
|
|
height: 1rem;
|
|
|
|
margin-right: .5rem;
|
2024-01-07 05:13:40 +00:00
|
|
|
object-fit: contain;
|
2023-12-30 05:29:53 +00:00
|
|
|
}
|
|
|
|
|
2024-06-04 00:27:06 +00:00
|
|
|
.date-link {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
2024-06-04 02:46:38 +00:00
|
|
|
.nodate {
|
|
|
|
font-style: italic;
|
|
|
|
color: var(--highlight);
|
|
|
|
}
|
|
|
|
|
2023-12-30 05:29:53 +00:00
|
|
|
.row {
|
|
|
|
margin: 0 .5rem .25rem .5rem;
|
|
|
|
font-size: .9rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
display: block;
|
|
|
|
margin-bottom: .4rem;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.actor:hover,
|
|
|
|
.tag:hover {
|
|
|
|
color: var(--primary);
|
|
|
|
}
|
|
|
|
|
|
|
|
.actors {
|
|
|
|
height: 1rem;
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: pre-wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.actor {
|
|
|
|
&:not(:last-child)::after {
|
|
|
|
content: ',\0020';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tags {
|
|
|
|
height: 1.25rem;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tag {
|
|
|
|
margin: 0 .5rem .25rem 0;
|
|
|
|
padding: .1rem 0;
|
2024-06-10 01:24:48 +00:00
|
|
|
color: var(--glass-strong-10);
|
2023-12-30 05:29:53 +00:00
|
|
|
font-size: .75rem;
|
|
|
|
}
|
|
|
|
</style>
|