Files
awesome-copilot/website/src/components/pages/Breadcrumb.astro
T
github-actions[bot] 51b6fa0253 chore: publish from main
2026-07-10 03:24:21 +00:00

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>