mirror of
https://github.com/tabler/tabler.git
synced 2026-08-29 13:21:29 +04:00
31 lines
694 B
Plaintext
31 lines
694 B
Plaintext
---
|
|
import Avatar from '@ui/Avatar.astro'
|
|
import people from '@data/people.json'
|
|
import { requireIndex } from '@shared/lib/array'
|
|
|
|
interface Person {
|
|
full_name?: string
|
|
job_title?: string
|
|
photo?: string
|
|
[key: string]: unknown
|
|
}
|
|
|
|
interface Props {
|
|
personId?: number
|
|
}
|
|
|
|
const { personId = 0 } = Astro.props
|
|
const person = requireIndex(people as Person[], personId)
|
|
---
|
|
|
|
<div class="card">
|
|
<div class="card-body text-center">
|
|
<div class="mb-3">
|
|
<Avatar size="xl" person={person} />
|
|
</div>
|
|
<h3 class="card-title mb-1">{person.full_name}</h3>
|
|
<div class="text-secondary">{person.job_title}</div>
|
|
</div>
|
|
<a href="#" class="card-btn">View full profile</a>
|
|
</div>
|