traxxx/assets/components/actors/social.vue

62 lines
843 B
Vue
Raw Permalink Normal View History

2020-01-24 22:36:06 +00:00
<template>
2020-07-05 02:27:46 +00:00
<div
v-if="actor"
class="social"
>
<a
v-for="social in actor.social"
:key="`social-${social.id}`"
v-tooltip.bottom="social.url"
:href="social.url"
target="_blank"
rel="noopener noreferrer"
class="social-link"
>
<Icon
v-if="social.platform"
:icon="social.platform"
/>
2020-01-24 22:36:06 +00:00
2020-07-05 02:27:46 +00:00
<Icon
v-else
icon="link"
/>
</a>
</div>
2020-01-24 22:36:06 +00:00
</template>
<script>
export default {
2020-07-05 02:27:46 +00:00
props: {
actor: {
type: Object,
default: null,
},
},
2020-01-24 22:36:06 +00:00
};
</script>
<style lang="scss" scoped>
@import 'theme';
.social {
display: block;
}
.social-link {
display: inline-block;
padding: 0 0 0 1rem;
.icon {
2020-07-05 02:27:46 +00:00
color: var(--highlight);
fill: var(--highlight);
2020-01-24 22:36:06 +00:00
width: 1.5rem;
height: 1.5rem;
}
&:hover .icon {
2020-07-05 02:27:46 +00:00
fill: var(--primary);
2020-01-24 22:36:06 +00:00
}
}
</style>