gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commite195d372e195d372Tracker: token pathsmree195d372/theme/shell/user-menu.hl

3.0 KB

  1. // user-menu.hl — THE USER MENU: one icon at the header's right end; a tap opens a dropdown with the signed-in name and the
  2. // links the app puts in (last always Logout, before it Settings — creator, tracker#32) (docs/layouts/user-menu.md).
  3. // Signed out, the app puts its login (the ident selector) in the header INSTEAD of this component.
  4. //
  5. // AppHeader { … UserMenu { name = "az5b2" a { href = "/settings" "Settings" } a { href = "/logout" "Logout" } } }
  6. //
  7. // The dropdown is the browser's popover `#user-menu`: Esc and a tap outside close it, and so does a tap on one of its links.
  8. String name = ''
  9. String label = 'User menu'
  10. slot = null
  11. Style {
  12. 'user-menu' { display = 'block' flex = 'none' }
  13. 'user-menu > button' { width = 'var(--layout-tap)' height = 'var(--layout-tap)' minHeight = '0' marginRight = '-.625rem' padding = '0' color = 'var(--color-text)' }
  14. 'user-menu > button svg' { width = '1.5rem' height = '1.5rem' }
  15. 'user-menu > nav:popover-open' { position = 'fixed' inset = 'var(--layout-header) max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2)) auto auto' display = 'block' minWidth = '12rem' maxWidth = 'calc(100vw - 2 * var(--layout-gutter))' margin = '.25rem 0 0' padding = '.4rem' color = 'var(--color-text)' background = 'var(--color-surface)' border = '0' borderRadius = 'var(--radius-large)' boxShadow = '0 .75rem 2rem var(--color-background-sunken)' }
  16. 'body:has(list-first) user-menu > nav:popover-open,
  17. body:has(three-pane) user-menu > nav:popover-open' { right = 'var(--layout-gutter)' }
  18. 'user-menu > nav::backdrop' { background = 'transparent' }
  19. 'user-menu p.who' { margin = '0' padding = '.4rem .6rem .5rem' fontSize = '.85rem' color = 'var(--color-text-muted)' overflow = 'hidden' textOverflow = 'ellipsis' whiteSpace = 'nowrap' }
  20. 'user-menu p.who:empty' { display = 'none' }
  21. 'user-menu > nav a,
  22. user-menu > nav button' { display = 'flex' width = '100%' minHeight = 'var(--layout-tap)' alignItems = 'center' justifyContent = 'flex-start' padding = '.5rem .6rem' fontWeight = '600' color = 'var(--color-text)' borderRadius = 'var(--radius-small)' }
  23. 'user-menu > nav a:hover,
  24. user-menu > nav button:hover' { textDecoration = 'none' color = 'var(--color-text-strong)' background = 'var(--color-background)' }
  25. }
  26. View {
  27. userMenu {
  28. button { type = "button" class = "user-toggle" popovertarget = "user-menu" title = label 'aria-label' = label
  29. svg { viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" 'stroke-width' = "1.8" 'stroke-linecap' = "round" 'aria-hidden' = "true"
  30. circle { cx = "12" cy = "12" r = "10" }
  31. circle { cx = "12" cy = "10" r = "3.2" }
  32. path { d = "M6.2 18.6c1.4-2.2 3.4-3.3 5.8-3.3s4.4 1.1 5.8 3.3" }
  33. }
  34. }
  35. nav { id = "user-menu" popover = "auto" 'aria-label' = label on click(e) { emit userMenuClick(e) }
  36. p { class = "who" name }
  37. slot
  38. }
  39. }
  40. }
  41. // a tap on one of its links closes the dropdown (a page change in place would leave it open)
  42. on userMenuClick(e) {
  43. if (e.target.closest('a') != null) { e.currentTarget.hidePopover() }
  44. }

Branches

Latest commits

  • e195d372Tracker: token pathsmre
  • 7f541d11Tracker conductor: CONDUCTOR.md, short STATUS.md, old status + decisions archive to archive/2026-10-31mre
  • 8dd423f7README: login.js stays by caramboleyo's explicit rulemre
  • d8df1493tracker: standby service on port 45018 and a gap-free hand-over in deploy.sh step 4mre
  • 36dd1686ident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • ff9b838etracker: the Ended status pill uses the same red as layouts (pill danger); gate updatedmre
  • 40d9719eTP2: LOG line and report for the tracker pillsmre
  • ab3f2ba5tracker: status, genres, TMDB/IMDb/TVDB/TVmaze links and list kinds use the theme's pill; dense season list with the season check centred on its title line; gates for bothmre
  • 521061d6tracker header on phones: signed in, the brand fits whole at 360 and 390 px (tighter gaps and side paddings, slightly smaller brand, narrow screens and signed in only); mobile gate checks itmre
  • 18114a53tracker: franchises gate waits for the signed-out selector instead of the removed Log in buttonmre
  • 08561d73ident selector back in the header (creator 2026-10-24): selector top right signed in and out on phone and desktop, no second Log in button, new gate checks (WIP: gates not re-run after the last edits)mre
  • 59ef1e4atests/browser: repair 'done' check counts the 404 titles the first run already finished (race: failed=1 when Bulk Film 79 ran before the restart)mre
  • 5925fc4dreports/MK-mobile.md: rebase update, gate countsmre
  • 6adbc7f0extlink badges: background-clip after the background shorthand (it reset the clip: the pills were 44 px tall); gates check the lookmre
  • 8d3b0f20widget: the franchise link's 44 px tap area no longer overlaps the Prequel/Sequel rowmre
  • 1d98dcfdbrowser gate: the badges' size check reads the padding box (the 44 px tap area is transparent border)mre
  • 2f9e29ffreports/MK-mobile.md, deploy.sh GATES: tests/mobile.mjs, theme check markermre
  • 7cfc8ab5a season of more than 150 episodes starts closed on its title page; the phone gate checks itmre
  • 59095c59tests/mobile.mjs: the phone gate (390 px touch, tap targets, /franchises paging)mre
  • 105309detap targets: every row link, the TMDB/IMDb badges, the widget links, the franchise names and the login-failed link are 44 px high on a phonemre