-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathAuthors.vue
More file actions
27 lines (24 loc) · 831 Bytes
/
Authors.vue
File metadata and controls
27 lines (24 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<script setup lang="ts">
import { computed } from 'vue'
import { useData } from 'vitepress'
import Author from './Author.vue'
const { frontmatter } = useData()
const authors = computed(() => {
const coAuthors = frontmatter.value.co_authors ?? []
return [frontmatter.value.author, ...coAuthors]
})
</script>
<template>
<dl class="pt-6 pb-10 xl:pt-11 xl:border-b xl:border-gray-200 dark:xl:border-slate-200/5">
<dt class="sr-only">Authors</dt>
<dd>
<ul
class="flex flex-col pl-10 gap-y-5 md:grid md:grid-cols-2 md:gap-x-8 md:gap-y-6 md:pl-0 lg:grid-cols-3 xl:block xl:space-y-8"
>
<template v-for="author in authors" :key="author.name">
<Author :name="author.name" :github="author.github" :avatar="author.avatar" />
</template>
</ul>
</dd>
</dl>
</template>