Layout's three bands are nav rows
Top Menu, Content, Footer — the layout IS a page, and those are the only three things on it. They were reachable by scrolling and by knowing which tab held what; as rows they take the shape the nav already teaches with the pages under Pages, and the open one is `band` in the query string. Fixed rather than fetched, unlike pages. A band cannot be added or removed from the admin — only the code that draws it can — so reading them from the database would be a query that can only ever return the same three rows in the same order. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,27 @@ export type Section = {
|
||||
pinned?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* The three bands the layout is made of, in the order they appear on the page.
|
||||
*
|
||||
* The layout IS a page: a header, the slot a page goes in, and a footer. These are the nav rows under
|
||||
* Layout, and the `band` in the query string.
|
||||
*
|
||||
* FIXED, unlike the pages under Pages. A band cannot be added or removed from the admin — only the
|
||||
* code that draws it can — so reading them from the database would be a query that can only ever
|
||||
* return the same three rows in the same order.
|
||||
*/
|
||||
export const LAYOUT_BANDS = [
|
||||
{ key: 'header', label: 'Top Menu' },
|
||||
{ key: 'content', label: 'Content' },
|
||||
{ key: 'footer', label: 'Footer' },
|
||||
] as const;
|
||||
|
||||
export type LayoutBand = (typeof LAYOUT_BANDS)[number]['key'];
|
||||
|
||||
export const isLayoutBand = (value: string | null): value is LayoutBand =>
|
||||
value !== null && LAYOUT_BANDS.some((band) => band.key === value);
|
||||
|
||||
export const SECTIONS: Section[] = [
|
||||
{
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user