aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/authors/index.astro
blob: ba311a0baa0333e5663d52709e4ae39f6ca6b721 (plain) (blame)
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
---
import AuthorCard from '@/components/AuthorCard.astro'
import Breadcrumbs from '@/components/Breadcrumbs.astro'
import PageHead from '@/components/PageHead.astro'
import Layout from '@/layouts/Layout.astro'
import { getAllAuthors } from '@/lib/data-utils'

const authors = await getAllAuthors()
---

<Layout class="max-w-3xl">
  <PageHead slot="head" title="Authors" />
  <Breadcrumbs items={[{ label: 'Authors', icon: 'lucide:users' }]} />
  {
    authors.length > 0 ? (
      <ul class="flex flex-col gap-4">
        {authors.map((author) => (
          <li>
            <AuthorCard author={author} />
          </li>
        ))}
      </ul>
    ) : (
      <p class="text-muted-foreground text-center">No authors found.</p>
    )
  }
</Layout>