FMHYedit/.vitepress/theme/components/Authors.vue

50 lines
983 B
Vue
Raw Normal View History

2023-12-31 06:57:10 +00:00
<script setup lang="ts">
2024-01-25 16:32:45 +00:00
import { computed } from 'vue'
2023-12-31 06:57:10 +00:00
const props = defineProps<{
2024-01-25 16:32:45 +00:00
authors: string[]
}>()
2023-12-31 06:57:10 +00:00
interface Author {
2024-01-25 16:32:45 +00:00
name: string
github: string
2023-12-31 06:57:10 +00:00
}
const data = [
{
2024-01-25 16:32:45 +00:00
name: 'nbats',
github: 'https://github.com/nbats'
2023-12-31 06:57:10 +00:00
},
{
2024-01-25 16:32:45 +00:00
name: 'Kai',
github: 'https://github.com/Kai-FMHY'
2023-12-31 06:57:10 +00:00
},
{
2024-01-25 16:32:45 +00:00
name: 'taskylizard',
github: 'https://github.com/taskylizard'
2023-12-31 06:57:10 +00:00
},
{
2024-01-25 16:32:45 +00:00
name: 'zinklog',
github: 'https://github.com/zinklog2'
2023-12-31 06:57:10 +00:00
},
2024-01-01 04:19:09 +00:00
{
2024-01-25 16:32:45 +00:00
name: 'Q',
github: 'https://github.com/qiracy'
}
] satisfies Author[]
2023-12-31 06:57:10 +00:00
2024-01-25 16:32:45 +00:00
const authors = computed(() =>
data.filter((author) => props.authors.includes(author.name))
)
2023-12-31 06:57:10 +00:00
</script>
<template>
<div class="flex flex-wrap gap-4 pt-2">
<div v-for="(c, index) of authors" class="flex gap-2 items-center">
<img :src="`${c.github}.png`" class="w-8 h-8 rounded-full" />
<a :href="c.github">{{ c.name }}</a>
2024-01-25 16:32:45 +00:00
<span v-if="index < authors.length - 1"></span>
2023-12-31 06:57:10 +00:00
</div>
</div>
</template>