# Header and footer · Divan

> Every public page has the same header and footer: <SiteHeader> and <SiteFooter> from src/lib/components/site, fed by one navigation list (src/lib/site-nav.ts). Pages never build their own. The header is 56px tall and spans the page width, so the logo and the controls sit in the same place on every page.

Part of Divan, the DivanWorks design system. Web page: https://brand.divanworks.com/header · All topics: https://brand.divanworks.com/llms.txt

## Rules

- <SiteHeader variant="overlay"> over a full-bleed picture (home): transparent, glass once the page scrolls, fixed. variant="solid" (the default) on every other page: glass, sticky, in the page’s flow. variant="task" on flows people should finish (sign-up, photo, more programs, the episode names page): the logo, the page’s own actions and the language only.
- From the start side: the logo (36px app icon, the link home), the links, then the page’s own actions (actions snippet), the language switch, Sign in / My activity, and Support, the one filled copper button. current="campaigns" marks the page you are on (aria-current, the lifted pill).
- Links show from 1024px. Below that they move into a drawer (Sheet) that opens from the start side: left in English, right in Persian; the drawer repeats Support and the account at the bottom, large.
- <SiteFooter> (full): a band in the card tone with no line above it: the logo and the site’s line, three groups (the studio, taking part, following us), then the legal row (copyright, Privacy, Terms, language). Two columns of groups on phones (the last group spans both, its links in two columns), four columns from 768px. Labels wrap, never cut short.
- <SiteFooter variant="compact"> on flows: the legal row alone.
- Every page: <SiteHeader>, then <main id="main"> (the header’s skip link lands there), then <SiteFooter>, inside a wrapper with overflow-x-clip (never overflow-hidden, which stops a sticky header). html has scroll-padding-top so jumps to #story land below the header.
- No line under the header or above the footer, no shadow: tone alone separates them.

## Which page has which

| Page | Header | Footer |
| --- | --- | --- |
| Home | overlay | full |
| Campaigns | solid | full |
| Founders | solid | full |
| Privacy, Terms | solid | full |
| Not found | solid | compact |
| Links | solid | compact |
| Your name in the episode | task | compact |
| More programs, Photo | task | compact |
| Sign up, My activity | task | compact |

## Components

### SiteHeader

The one header of every public page. variant overlay (over a full-bleed picture), solid (default) or task (flows); current marks the page; an actions snippet holds the page’s own controls.

```ts
import SiteHeader from '#lib/components/site/SiteHeader.svelte';
```

```svelte
<div class="relative flex min-h-svh flex-col overflow-x-clip">
	<SiteHeader current="campaigns" />
	<main id="main" class="page-container flex-1 py-10">…</main>
	<SiteFooter />
</div>

<!-- a flow, with the page's own control in the header -->
<SiteHeader variant="task">
	{#snippet actions()}<Button variant="ghost" size="sm">Sign Out</Button>{/snippet}
</SiteHeader>
```

### SiteFooter

The one footer of every public page: full (brand, three groups, legal row, in the card tone) or compact (the legal row, for flows).

```ts
import SiteFooter from '#lib/components/site/SiteFooter.svelte';
```

```svelte
<SiteFooter />
<SiteFooter variant="compact" />
```

### Sheet

A task of its own, or the drawer menu.

```ts
import * as Sheet from '#lib/components/ui/sheet/index.js';
```

```svelte
<Sheet.Root bind:open>
	<Sheet.Trigger>{#snippet child({ props })}<Button variant="ghost" size="icon" aria-label="Menu" {...props}><MenuIcon /></Button>{/snippet}</Sheet.Trigger>
	<!-- start for a menu, end for a task: the left or the right by the page’s language -->
	<Sheet.Content side="start" dir={isFa ? "rtl" : "ltr"}>…</Sheet.Content>
</Sheet.Root>
```
