2023-12-30 05:29:53 +00:00
|
|
|
<template>
|
2024-01-10 01:00:38 +00:00
|
|
|
<div class="actor">
|
|
|
|
<div class="actor-header">
|
|
|
|
<h2 class="header-name">
|
|
|
|
<span v-if="actor.entity">{{ actor.name }} ({{ actor.entity.name }})</span>
|
|
|
|
<span v-else>{{ actor.name }}</span>
|
|
|
|
|
|
|
|
<Gender
|
|
|
|
:gender="actor.gender"
|
|
|
|
class="header-gender"
|
|
|
|
/>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<li
|
|
|
|
v-if="actor.aliases?.length"
|
|
|
|
class="bio-item"
|
2024-01-07 05:13:40 +00:00
|
|
|
>
|
2024-01-10 01:00:38 +00:00
|
|
|
<dfn class="bio-label">Also known as</dfn>
|
|
|
|
<span class="bio-value">
|
|
|
|
<span
|
|
|
|
v-for="alias in actor.aliases"
|
|
|
|
:key="`alias-${alias.id}`"
|
|
|
|
class="alias"
|
|
|
|
>{{ alias.name }}</span>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
|
2024-03-27 01:28:21 +00:00
|
|
|
<Heart
|
|
|
|
domain="actors"
|
|
|
|
:item="actor"
|
|
|
|
class="light"
|
2024-01-10 01:00:38 +00:00
|
|
|
/>
|
2024-01-07 05:13:40 +00:00
|
|
|
</div>
|
|
|
|
|
2024-01-10 01:00:38 +00:00
|
|
|
<div class="content">
|
|
|
|
<Bio :actor="actor" />
|
|
|
|
|
2024-06-07 01:43:12 +00:00
|
|
|
<div
|
|
|
|
class="photos nobar"
|
|
|
|
:class="{ 'has-avatar': actor.avatar, 'has-photos': actor.avatar ? photos.length > 1 : photos.length > 0 }"
|
|
|
|
>
|
2024-06-07 01:15:37 +00:00
|
|
|
<img
|
|
|
|
v-for="photo in photos"
|
|
|
|
:key="`photo-${photo.id}`"
|
|
|
|
:src="getPath(photo, 'thumbnail')"
|
|
|
|
:width="photo.width"
|
|
|
|
:height="photo.height"
|
|
|
|
:style="{ 'background-image': `url('${getPath(photo, 'lazy')}')` }"
|
|
|
|
:title="photo.credit && `© ${photo.credit}`"
|
|
|
|
loading="lazy"
|
|
|
|
class="photo"
|
|
|
|
:class="{ avatar: photo.isAvatar }"
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
|
2024-08-22 04:23:41 +00:00
|
|
|
<Domains
|
|
|
|
:domain="domain"
|
|
|
|
:path="`/actor/${actor.id}/${actor.slug}`"
|
|
|
|
:domains="['scenes', 'movies']"
|
|
|
|
class="domains-bar light"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Scenes v-if="domain === 'scenes'" />
|
|
|
|
<Movies v-if="domain === 'movies'" />
|
2024-01-10 01:00:38 +00:00
|
|
|
</div>
|
2023-12-30 05:29:53 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-03-27 01:28:21 +00:00
|
|
|
import { inject } from 'vue';
|
2023-12-30 05:29:53 +00:00
|
|
|
|
2024-06-07 01:15:37 +00:00
|
|
|
import getPath from '#/src/get-path.js';
|
|
|
|
|
2024-01-10 01:00:38 +00:00
|
|
|
import Bio from '#/components/actors/bio.vue';
|
|
|
|
import Gender from '#/components/actors/gender.vue';
|
2024-01-07 05:13:40 +00:00
|
|
|
import Scenes from '#/components/scenes/scenes.vue';
|
2024-08-22 04:23:41 +00:00
|
|
|
import Movies from '#/components/movies/movies.vue';
|
2024-03-27 01:28:21 +00:00
|
|
|
import Heart from '#/components/stashes/heart.vue';
|
2024-08-22 04:23:41 +00:00
|
|
|
import Domains from '#/components/domains/domains.vue';
|
2024-01-07 05:13:40 +00:00
|
|
|
|
|
|
|
const pageContext = inject('pageContext');
|
2024-08-22 04:23:41 +00:00
|
|
|
const { pageProps, routeParams } = pageContext;
|
2024-01-07 05:13:40 +00:00
|
|
|
const { actor } = pageProps;
|
2024-06-07 01:15:37 +00:00
|
|
|
|
2024-08-22 04:23:41 +00:00
|
|
|
const domain = routeParams.domain;
|
|
|
|
|
2024-08-16 21:24:11 +00:00
|
|
|
const photos = Object.values(Object.fromEntries(actor.profiles
|
2024-06-07 03:20:13 +00:00
|
|
|
.filter((profile) => !!profile.avatar)
|
2024-08-16 21:24:11 +00:00
|
|
|
.map((profile) => [profile.avatar.id, {
|
2024-06-07 03:20:13 +00:00
|
|
|
...profile.avatar,
|
|
|
|
isAvatar: profile.avatar.id === actor.avatar.id,
|
2024-08-16 21:24:11 +00:00
|
|
|
}])));
|
2023-12-30 05:29:53 +00:00
|
|
|
</script>
|
2024-01-07 05:13:40 +00:00
|
|
|
|
|
|
|
<style scoped>
|
2024-01-10 01:00:38 +00:00
|
|
|
.actor {
|
2024-01-07 05:13:40 +00:00
|
|
|
display: flex;
|
2024-01-10 01:00:38 +00:00
|
|
|
flex-direction: column;
|
|
|
|
flex-grow: 1;
|
2024-06-06 00:49:00 +00:00
|
|
|
position: relative;
|
2024-01-10 01:00:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.actor-header {
|
2024-06-06 00:49:00 +00:00
|
|
|
width: 100%;
|
2024-01-10 01:00:38 +00:00
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
2024-06-06 00:49:00 +00:00
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
2024-06-07 01:43:12 +00:00
|
|
|
z-index: 2;
|
2024-01-10 01:00:38 +00:00
|
|
|
color: var(--highlight-strong-30);
|
|
|
|
background: var(--grey-dark-40);
|
|
|
|
}
|
|
|
|
|
|
|
|
.header-name {
|
|
|
|
padding: .5rem 1rem;
|
|
|
|
margin: 0;
|
|
|
|
display: inline-flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
flex-shrink: 0;
|
2024-01-07 05:13:40 +00:00
|
|
|
}
|
|
|
|
|
2024-01-10 01:00:38 +00:00
|
|
|
.header-social {
|
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
margin: 0 1rem 0 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
flex-grow: 1;
|
2024-06-06 00:49:00 +00:00
|
|
|
/* overflow-y: auto; */
|
2024-01-07 05:13:40 +00:00
|
|
|
}
|
2024-03-21 01:54:05 +00:00
|
|
|
|
2024-03-27 01:28:21 +00:00
|
|
|
.bookmarks {
|
|
|
|
margin-right: .5rem;
|
2024-03-21 01:54:05 +00:00
|
|
|
}
|
2024-06-07 01:15:37 +00:00
|
|
|
|
|
|
|
.photos {
|
|
|
|
display: flex;
|
|
|
|
gap: 0.5rem;
|
|
|
|
padding: .5rem;
|
|
|
|
border-bottom: solid 1px var(--shadow-weak-40);
|
|
|
|
background: var(--background-base-10);
|
|
|
|
overflow-x: auto;
|
2024-06-07 01:43:12 +00:00
|
|
|
|
|
|
|
&:not(.has-photos) {
|
|
|
|
display: none;
|
|
|
|
}
|
2024-06-07 01:15:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.photo {
|
|
|
|
height: 14rem;
|
|
|
|
width: auto;
|
|
|
|
object-fit: cover;
|
|
|
|
object-position: 50% 0;
|
|
|
|
background-size: cover;
|
|
|
|
background-position: center;
|
|
|
|
box-shadow: 0 0px 3px var(--shadow-weak-30);
|
|
|
|
|
|
|
|
&.avatar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-08-22 04:23:41 +00:00
|
|
|
.domains-bar {
|
|
|
|
background: var(--background-base-10);
|
|
|
|
border-bottom: solid 1px var(--shadow-weak-40);
|
|
|
|
}
|
|
|
|
|
2024-06-07 01:15:37 +00:00
|
|
|
@media(--compact) {
|
2024-06-07 01:43:12 +00:00
|
|
|
.photos.has-avatar {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
2024-06-07 01:15:37 +00:00
|
|
|
.photo.avatar {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media(--small) {
|
|
|
|
.photo {
|
|
|
|
height: 10rem;
|
|
|
|
}
|
|
|
|
}
|
2024-01-07 05:13:40 +00:00
|
|
|
</style>
|