2019-11-14 04:13:38 +00:00
|
|
|
<template>
|
2020-05-17 03:24:46 +00:00
|
|
|
<div
|
|
|
|
v-if="actor"
|
|
|
|
class="actor"
|
|
|
|
>
|
|
|
|
<router-link
|
|
|
|
:to="{ name: 'actor', params: { actorSlug: actor.slug } }"
|
|
|
|
class="link"
|
|
|
|
>
|
|
|
|
<span
|
|
|
|
class="handle"
|
|
|
|
>
|
2020-05-17 23:22:56 +00:00
|
|
|
<span
|
|
|
|
v-tooltip.top="actor.name"
|
|
|
|
class="name"
|
|
|
|
>{{ actor.name }}</span>
|
|
|
|
|
|
|
|
<router-link
|
|
|
|
v-if="actor.network"
|
|
|
|
v-tooltip="actor.network.name"
|
|
|
|
:to="{ name: 'network', params: { networkSlug: actor.network.slug } }"
|
2020-05-17 03:24:46 +00:00
|
|
|
class="favicon"
|
|
|
|
>
|
2020-05-17 23:22:56 +00:00
|
|
|
<img
|
|
|
|
:src="`/img/logos/${actor.network.slug}/favicon.png`"
|
|
|
|
class="favicon-icon"
|
|
|
|
>
|
|
|
|
</router-link>
|
2020-05-17 03:24:46 +00:00
|
|
|
|
2020-05-17 23:22:56 +00:00
|
|
|
<Icon
|
|
|
|
v-if="alias"
|
|
|
|
v-tooltip="`Alias for ${alias.name}`"
|
|
|
|
icon="users3"
|
|
|
|
class="favicon alias"
|
|
|
|
/>
|
2020-05-17 03:24:46 +00:00
|
|
|
</span>
|
|
|
|
|
|
|
|
<div class="avatar-container">
|
|
|
|
<img
|
|
|
|
v-if="actor.avatar"
|
2020-05-17 23:22:56 +00:00
|
|
|
:src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`"
|
2020-05-17 03:24:46 +00:00
|
|
|
class="avatar"
|
|
|
|
>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-else
|
|
|
|
class="avatar"
|
|
|
|
><img
|
|
|
|
:src="`/img/avatar_${actor.gender || 'female'}.png`"
|
|
|
|
class="avatar-fallback"
|
|
|
|
></span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
class="details"
|
|
|
|
>
|
2020-05-17 23:22:56 +00:00
|
|
|
<span class="gender-age">
|
|
|
|
<Gender :gender="actor.gender" />
|
|
|
|
|
2020-05-17 03:24:46 +00:00
|
|
|
<span
|
|
|
|
v-if="actor.age"
|
|
|
|
v-tooltip="`Born on ${formatDate(actor.birthdate, 'MMMM D, YYYY')}`"
|
|
|
|
class="age-now"
|
|
|
|
>{{ actor.age }}</span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-if="actor.ageThen && actor.ageThen < actor.age"
|
|
|
|
v-tooltip="`${actor.ageThen} years old on release date`"
|
|
|
|
class="age-then"
|
|
|
|
>{{ actor.ageThen }}</span>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-if="actor.origin"
|
|
|
|
v-tooltip="`Born in ${actor.origin.country.alias || actor.origin.country.name}`"
|
|
|
|
class="country"
|
|
|
|
>
|
|
|
|
{{ actor.origin.country.alpha2 }}
|
|
|
|
<img
|
|
|
|
class="flag"
|
|
|
|
:src="`/img/flags/${actor.origin.country.alpha2.toLowerCase()}.svg`"
|
|
|
|
>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-else
|
|
|
|
class="country"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</router-link>
|
|
|
|
</div>
|
2019-11-14 04:13:38 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-01-25 00:26:13 +00:00
|
|
|
import Gender from '../actors/gender.vue';
|
|
|
|
|
2020-05-17 23:22:56 +00:00
|
|
|
function sfw() {
|
|
|
|
return this.$store.state.ui.sfw;
|
|
|
|
}
|
|
|
|
|
2019-11-14 04:13:38 +00:00
|
|
|
export default {
|
2020-05-17 03:24:46 +00:00
|
|
|
components: {
|
|
|
|
Gender,
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
actor: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
2020-05-17 23:22:56 +00:00
|
|
|
alias: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
sfw,
|
2020-05-17 03:24:46 +00:00
|
|
|
},
|
2019-11-14 04:13:38 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.actor {
|
2020-01-06 20:49:37 +00:00
|
|
|
width: 100%;
|
2019-11-14 04:13:38 +00:00
|
|
|
display: inline-block;
|
2020-04-27 00:37:30 +00:00
|
|
|
position: relative;
|
2019-11-20 03:53:36 +00:00
|
|
|
margin: 0 .5rem .5rem 0;
|
2020-03-27 03:39:13 +00:00
|
|
|
box-shadow: 0 0 3px var(--darken-weak);
|
|
|
|
background: var(--profile);
|
2020-04-27 00:37:30 +00:00
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: '';
|
|
|
|
display: inline-block;
|
|
|
|
padding-bottom: 150%;
|
|
|
|
}
|
2019-11-14 04:13:38 +00:00
|
|
|
}
|
|
|
|
|
2019-11-20 03:53:36 +00:00
|
|
|
.link {
|
2020-04-27 00:37:30 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2020-03-27 03:39:13 +00:00
|
|
|
color: var(--text-light);
|
2019-11-14 04:13:38 +00:00
|
|
|
text-decoration: none;
|
2019-11-20 03:53:36 +00:00
|
|
|
|
|
|
|
&:hover {
|
2020-03-27 03:39:13 +00:00
|
|
|
color: var(--primary);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.handle {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
font-weight: bold;
|
2020-05-17 23:22:56 +00:00
|
|
|
|
|
|
|
.name {
|
|
|
|
padding: .5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.alias {
|
|
|
|
fill: var(--highlight);
|
|
|
|
}
|
2020-03-27 03:39:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.favicon {
|
2020-05-17 23:22:56 +00:00
|
|
|
font-size: 0;
|
|
|
|
padding: .5rem .25rem;
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
padding: .5rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.favicon-icon {
|
2020-03-27 03:39:13 +00:00
|
|
|
width: 1rem;
|
|
|
|
height: 1rem;
|
2019-11-20 03:53:36 +00:00
|
|
|
}
|
|
|
|
|
2020-03-27 03:39:13 +00:00
|
|
|
.name {
|
|
|
|
flex-grow: 1;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
|
2020-01-25 00:26:13 +00:00
|
|
|
.avatar-container {
|
2020-04-27 00:37:30 +00:00
|
|
|
display: flex;
|
|
|
|
flex-grow: 1;
|
2020-01-25 00:26:13 +00:00
|
|
|
position: relative;
|
2020-05-17 23:22:56 +00:00
|
|
|
overflow: hidden;
|
2019-11-20 03:53:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
2020-03-27 03:39:13 +00:00
|
|
|
color: var(--darken-weak);
|
|
|
|
background: var(--darken-hint);
|
2019-11-30 04:55:32 +00:00
|
|
|
width: 100%;
|
2020-04-27 00:37:30 +00:00
|
|
|
height: 100%;
|
2019-11-20 03:53:36 +00:00
|
|
|
display: flex;
|
2020-04-27 00:37:30 +00:00
|
|
|
flex-direction: column;
|
2019-11-20 03:53:36 +00:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
object-fit: cover;
|
2019-11-30 04:55:32 +00:00
|
|
|
object-position: 50% 0;
|
2019-11-14 04:13:38 +00:00
|
|
|
}
|
2019-12-10 21:35:00 +00:00
|
|
|
|
2020-01-23 02:52:12 +00:00
|
|
|
.avatar-fallback {
|
|
|
|
max-height: 75%;
|
|
|
|
max-width: 80%;
|
2020-03-27 03:39:13 +00:00
|
|
|
opacity: .5;
|
2020-01-23 02:52:12 +00:00
|
|
|
}
|
|
|
|
|
2019-12-10 21:35:00 +00:00
|
|
|
.details {
|
2020-03-27 03:39:13 +00:00
|
|
|
background: var(--darken);
|
|
|
|
color: var(--text-light);
|
2019-12-10 21:35:00 +00:00
|
|
|
width: 100%;
|
2020-01-23 02:52:12 +00:00
|
|
|
height: 1.75rem;
|
2019-12-10 21:35:00 +00:00
|
|
|
display: flex;
|
2019-12-15 04:42:51 +00:00
|
|
|
align-items: center;
|
2020-05-17 23:22:56 +00:00
|
|
|
justify-content: space-between;
|
2019-12-10 21:35:00 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
padding: .5rem;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
2020-05-13 21:17:39 +00:00
|
|
|
font-size: .9rem;
|
2019-12-10 21:35:00 +00:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
2019-12-13 04:04:04 +00:00
|
|
|
|
2020-05-17 23:22:56 +00:00
|
|
|
.gender-age {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2020-01-25 00:26:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.gender {
|
2020-05-17 23:22:56 +00:00
|
|
|
margin: .25rem .25rem 0 0;
|
2020-01-25 00:26:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.country {
|
2020-05-13 21:17:39 +00:00
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.flag {
|
2020-05-17 23:22:56 +00:00
|
|
|
height: .75rem;
|
2020-05-13 21:17:39 +00:00
|
|
|
margin: 0 0 0 .5rem;
|
2020-01-25 00:26:13 +00:00
|
|
|
}
|
|
|
|
|
2019-12-13 04:04:04 +00:00
|
|
|
.age-then {
|
2020-03-27 03:39:13 +00:00
|
|
|
color: var(--lighten);
|
2020-01-25 00:26:13 +00:00
|
|
|
}
|
2019-11-14 04:13:38 +00:00
|
|
|
</style>
|