gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchhl-standard-22b480a64|||PR Type the route parameter of main-menu build (HL-STANDARD L10)Atlashl-standard-2/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

  • 2b480a64|||PR Type the route parameter of main-menu build (HL-STANDARD L10)Atlas
  • ab54a39dMerge branch 'hl-standard' into mainAtlas
  • 04d36fcf|||PR Type function parameters and drop unneeded let (HL-STANDARD L2, L10)Atlas
  • 220c8fa4Merge branch 'readme-audit' into mainAtlas
  • b78fb85a|||PR README matches the codemre
  • 9f351699Preserve comments and nest supported selectors without changing rendered outputmre
  • 97110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre
  • ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
  • 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
  • b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
  • 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
  • ebd00b6cNest caller slot styles in three-panemre
  • 009991efNest caller slot styles in list-firstmre
  • 494d75d4Nest caller slot styles in app-sidebarmre
  • e5571680Align all plugin sources with Hybriel day38bmre
  • 5d204c46Re-vendor layouts to Hybriel set day38bmre
  • 17e0f03eNest html-prefixed theme component overridesmre
  • e54e735eFormat plain theme elements with nested rules and bare mediamre
  • 547f834eRecord LY7 deployment and live verificationmre
  • fa4600b1Link caller-slot style exceptions to hybriel#270mre