gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitb59e2ee9b59e2ee9docs/usage.md + tools/usage.sh: which app carries which component/theme/tokens copy, and whether it matches the sourcemreb59e2ee9/docs/layouts/app-header.md

1.8 KB

  1. # AppHeader (`theme/shell/app-header.hl`) — `<application-header>`
  2. **Purpose**: the bar on top of every app page: brand, search, main menu, user menu (or the login when signed out).
  3. **Parent**: the page's root / the app shell (`components/main.hl`), before the shell (`ContentFirst`, `ListFirst`, `ThreePane`).
  4. **Children (slot)**: `MainMenu { … }` then `UserMenu { … }` (signed in) or the app's login element (signed out).
  5. **Members**: `brand`, `brandHref` ('/'), `search` (form action; '' = no search), `searchName` ('q'), `searchLabel`,
  6. `searchPlaceholder`, `menuLabel`.
  7. **Renders**: `button.menu-toggle` (popovertarget `sidebar`), `a.brand`, `form#app-search.search[role=search][popover]`,
  8. `button.search-toggle`, then the slot.
  9. **Phone** (< 60rem): toggle · brand … loupe · user icon. The main menu is hidden (it lives in the sidebar). The loupe opens
  10. `#app-search` full width under the bar and focuses its field; Esc / a tap outside closes it. No `#sidebar` on the page →
  11. no toggle.
  12. **Desktop** (60rem+): brand · search (middle) · main menu · user menu. Toggle and loupe hidden. Contents are flush with the
  13. content column (`--layout-column`, same side padding as the shell); with list-first / three-pane they span the page.
  14. Sticky at the top, height `--layout-header`.
  15. **Semantics**: toggle and loupe are buttons with `aria-label`; the search is `role=search` with a labelled `type=search`
  16. field (GET `<search>?q=`); the popovers are the browser's (`popover="auto"`): focus, Esc and light dismiss are native.
  17. **Example**:
  18. ```hybriel
  19. AppHeader { brand = "Notes" brandHref = "/" search = "/search"
  20. MainMenu { items = menu current = "/notes" }
  21. UserMenu { name = "az5b2" a { href = "/settings" "Settings" } a { href = "/logout" "Logout" } }
  22. }
  23. ```
  24. **Do not use for**: page titles or toolbars of an item (use `h1` / a `menu` in the content); a second header per page.

Branches

Latest commits

  • b59e2ee9docs/usage.md + tools/usage.sh: which app carries which component/theme/tokens copy, and whether it matches the sourcemre
  • 0222f67ctheme: two corner radii only (radiusSmall 5px, radiusLarge 10px); check-theme flags any other radius; gate 76/0mre
  • 877b63acdesign rules: two radii only (5px small, 10px large)mre
  • 635234dfcomponents re-synced to components.hybriel 5a98d77 (#15 black/white base look); gate 73/0, check-theme 0, screenshots unchangedmre
  • 876b2064docs: workaround note for hybriel#130 (slot marker mid-line)mre
  • 85b56541layouts mission 002 3/3: same-output tests, letcount, shots ports, docs, reportmre
  • 0f325d3blayouts mission 002 2/3: code rules — styles.hl -> components/styles.hl, the one never-reassigned let dropped; gate 73/0, same outputmre
  • a3e74c8alayouts mission 002 1/3: components re-copied byte-verbatim from components.hybriel 3f93d71 by tools/sync-components.sh (+ --check, components/SOURCE); gate 73/0, check-theme 0mre
  • 80ce6ba9report 001 (mission 075)mre
  • 5c6e338flayouts.worldapi.org in Hybriel: WorldAPI theme (tokens, borderless elements, themed components.hybriel components), shells (header, main/user menu, sidebar overlay, content-first, list-first, three-pane), showcase, check-theme helper; gate 73/0 (mission 075)mre