mirror of
https://github.com/github/awesome-copilot.git
synced 2026-07-15 10:25:18 +00:00
26 lines
564 B
Plaintext
26 lines
564 B
Plaintext
---
|
|
export type Breadcrumb = {
|
|
paths: { name: string; href?: string }[];
|
|
title: string;
|
|
};
|
|
|
|
const { paths, title } = Astro.props as Breadcrumb;
|
|
---
|
|
|
|
<nav class="detail-breadcrumbs" aria-label="Breadcrumb">
|
|
{
|
|
paths.map((path, index) => (
|
|
<>
|
|
{path.href ? (
|
|
<a href={path.href}>{path.name}</a>
|
|
) : (
|
|
<span>{path.name}</span>
|
|
)}
|
|
{index < paths.length - 1 && <span aria-hidden="true">/</span>}
|
|
</>
|
|
))
|
|
}
|
|
<span aria-hidden="true">/</span>
|
|
<span aria-current="page">{title}</span>
|
|
</nav>
|