---interface Item {
key:string;
label:string;
count:number;
accent:string;
}
interface Props {
items:Item[];
/** Names the strip for assistive tech: `Sections`, `Shelves`. */ label:string;
}
const { items, label } = Astro.props;
/** * Jump links for a sectioned list, sticky under the masthead. Each link * carries `data-sf-jump`, so the sheet filter hides the links to sections it * has emptied; the leading control goes back up to the filter panel. * Styling lives in filter.css with the panel it works beside. */---<navclass="sec-jump"aria-label={label} data-sec-jump>
<aclass="sec-jump__top"href="#filter"aria-label="Back to the filter"><spanaria-hidden="true">↑</span> Filter</a>
<divclass="sec-jump__track">
{items.map((it, i) => (
<ahref={`#sec-${it.key}`} data-sf-jump={it.key} style={`--acc: var(--${it.accent});`}>
<spanclass="n">{String(i +1).padStart(2, '0')}</span>
<span>{it.label}</span>
<spanclass="cnt"data-sf-n={`sec:${it.key}`}>{String(it.count).padStart(2, '0')}</span>
</a>
))}
</div>
</nav>
<script>
import { initSectionJump } from'../scripts/section-jump';
document.addEventListener('astro:page-load', initSectionJump);
if (document.readyState !=='loading') initSectionJump();
elsedocument.addEventListener('DOMContentLoaded', initSectionJump, { once:true });
</script>