fix(reader): Library in the nav, breadcrumbs in the chapter
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
|
export default function ReaderCrumbs({ items }) {
|
||||||
|
return (
|
||||||
|
<nav className="crumbs" aria-label="Breadcrumb">
|
||||||
|
<ol>
|
||||||
|
{items.map((item, i) => (
|
||||||
|
<li key={item.label}>
|
||||||
|
{i > 0 ? (
|
||||||
|
<span className="crumbs-sep" aria-hidden="true">
|
||||||
|
/
|
||||||
|
</span>
|
||||||
|
) : null}
|
||||||
|
{item.current || !item.href ? (
|
||||||
|
<span aria-current="page">{item.label}</span>
|
||||||
|
) : (
|
||||||
|
<Link href={item.href}>{item.label}</Link>
|
||||||
|
)}
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user