This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/components/Authors.vue

39 lines
1.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<ul :class="{'list-unstyled': !expanded}">
<li v-for="author in config.contact.authors" class="mb-2">
{{ author.name }}
(<nuxt-link :to="author.pronounsLink">{{ author.pronouns }}</nuxt-link>)
<template v-for="(link, area, index) in author.areas">
<Spaceless>
<nuxt-link v-if="link && link.indexOf('/') === 0" :to="link">{{ area.replace(/_/g, ' ') }}</nuxt-link>
<a v-else-if="link" :href="link" target="_blank" rel="noopener">{{ area.replace(/_/g, ' ') }}</a>
<span v-else>{{ area.replace(/_/g, ' ') }}</span>
<span v-if="index < Object.keys(author.areas).length - 1">, </span>
</Spaceless>
</template>
<br/>
<a v-if="author.website" :href="author.website" target="_blank" rel="noopener" class="badge badge-light border">
<Icon v="globe"/>
Blog
</a>
<a v-if="author.twitter" :href="'https://twitter.com/' + author.twitter" target="_blank" rel="noopener" class="badge badge-light border">
<Icon v="twitter" set="b"/>
Twitter
</a>
<a v-if="author.mail" :href="'mailto:' + author.mail" target="_blank" rel="noopener" class="badge badge-light border">
<Icon v="envelope"/>
Email
</a>
</li>
</ul>
</template>
<script>
export default {
props: {
expanded: { type: Boolean }
},
}
</script>