# SitePage

Supply UI 1.1.0. Layout.

One page of a site: the header, the page's sections (each a direct child) and the footer in the page column, spaced for you (see The page)

One page of a site: the header, the page and the footer in the page column, with the room around them settled once. The header sits close above the page (a group's gap), the sections are a section apart, and the footer is a section below the last one, with a little room above the header and below the footer.

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `children` (needed) | `ReactNode` |  | The page's sections, each a direct child: they are spaced a section apart. |
| `header` (needed) | `ReactNode` |  | The site's header, usually a <SiteHeader>. |
| `footer` | `ReactNode` |  | What goes in the footer: the logo, links, contact. A hairline sits above it. |

It also takes the 279 attributes of the element or UI SDK part it renders (`className`, `aria-label`, events…).

## Without React

Classes: `div.ui-container.ui-site-page` > header + `main.ui-site-main` + `footer.ui-site-footer`

## CSS parts

With the CSS in parts (`/ui/css/`), it needs: `components/page-transitions.css`, besides the ones every page loads.

## Layout: notes

**States.** Layout follows the box it is in, not the window: `Split`, `Grid`, `AppShell` and the site parts stack when their box is narrow, at any width of the window.

**Do**
- Space with `gap` (`Stack`, `Row`, `Grid`), never with margins on children.
- Put the page's sections straight on the page, under their titles; a `Card` is one thing a person picks or acts on.
- Check every screen at 320, 375 and 768 px with the narrow check of rule 10.

**Don't**
- Don't give a box a fixed width, or a `min-height` together with an `aspect-ratio`.
- Don't nest a card in a card.
- Don't put two `<main>`s on a page: a screen shown inside another page takes `Main as="div"`.
