master @ 14 LINES
[ HISTORY ] [ UP ]
┌─ ASTRO ────────────────────────────────────────────────────────────────────┐
│ --- │
│ import Pre from "../Pre/Pre.astro"; │
│ import { layoutTree, type Props } from "./Tree"; │
│ import "./Tree.scss"; │
│ │
│ const { nodes } = Astro.props as Props; │
│ const rows = layoutTree(nodes); │
│ --- │
│ {rows.map((r) => ( │
│ <Pre class="tree-row">{r.prefix}{r.href │
│ ? <a class:list={["tree-link", { "tree-current": r.current }]} href={r.href} a │
│ ria-current={r.current ? "page" : undefined}>{r.label}</a> │
│ : r.label}</Pre> │
│ ))} │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ASTRO ──────────────────────────────┐
│ --- │
│ import Pre from "../Pre/Pre.astro"; │
│ import { layoutTree, type Props } from "./Tr │
│ ee"; │
│ import "./Tree.scss"; │
│ │
│ const { nodes } = Astro.props as Props; │
│ const rows = layoutTree(nodes); │
│ --- │
│ {rows.map((r) => ( │
│ <Pre class="tree-row">{r.prefix}{r.href │
│ ? <a class:list={["tree-link", { "tree-c │
│ urrent": r.current }]} href={r.href} aria-cu │
│ rrent={r.current ? "page" : undefined}>{r.la │
│ bel}</a> │
│ : r.label}</Pre> │
│ ))} │
└──────────────────────────────────────────────┘
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET