2019-11-14 04:13:38 +00:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
v-if="actor"
|
|
|
|
class="actor"
|
|
|
|
>
|
|
|
|
<a
|
|
|
|
:href="`/actor/${actor.slug}`"
|
2019-11-20 03:53:36 +00:00
|
|
|
class="link"
|
|
|
|
>
|
|
|
|
<span class="name">{{ actor.name }}</span>
|
|
|
|
|
|
|
|
<img
|
|
|
|
v-if="actor.avatar"
|
|
|
|
:src="`/media/${actor.avatar}`"
|
|
|
|
class="avatar"
|
|
|
|
>
|
|
|
|
|
|
|
|
<span
|
|
|
|
v-else
|
|
|
|
class="avatar"
|
|
|
|
>No photo</span>
|
|
|
|
</a>
|
2019-11-14 04:13:38 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
actor: {
|
|
|
|
type: Object,
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import 'theme';
|
|
|
|
|
|
|
|
.actor {
|
|
|
|
background: $background;
|
|
|
|
display: inline-block;
|
2019-11-20 03:53:36 +00:00
|
|
|
margin: 0 .5rem .5rem 0;
|
2019-11-14 04:13:38 +00:00
|
|
|
box-shadow: 0 0 3px $shadow-weak;
|
|
|
|
}
|
|
|
|
|
2019-11-20 03:53:36 +00:00
|
|
|
.link {
|
2019-11-14 04:13:38 +00:00
|
|
|
color: $link;
|
|
|
|
text-decoration: none;
|
2019-11-20 03:53:36 +00:00
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: $primary;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.name {
|
|
|
|
display: block;
|
|
|
|
padding: .5rem;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
color: $shadow-weak;
|
|
|
|
background: $shadow-hint;
|
|
|
|
height: 12rem;
|
|
|
|
width: 10rem;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
object-fit: cover;
|
2019-11-14 04:13:38 +00:00
|
|
|
}
|
|
|
|
</style>
|