gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc24608ebc24608ebmarkdown: format Style with nested language rulesmrec24608eb/theme/shell/app-sidebar.hl

3.4 KB

  1. // app-sidebar.hl — THE SIDEBAR: on the phone an overlay that slides in from the left (the header's toggle opens it), from
  2. // 60rem a column of the shell (content-first, three-pane) (docs/layouts/app-sidebar.md). ONE per page: it is `#sidebar`.
  3. //
  4. // ContentFirst {
  5. // Sidebar { MainMenu { items = menu current = "/series" } nav { a { href = "/series/new" "New series" } } }
  6. // main { … }
  7. // }
  8. //
  9. // `desktop = "false"`: a sidebar for the phone only (it holds just the main menu, which the header shows on desktop).
  10. // The overlay is the browser's popover: Esc, a tap outside, the × and a tap on one of its links close it.
  11. String desktop = 'true'
  12. String closeLabel = 'Close'
  13. String cls = desktop == 'false' ? 'mobile-only' : ''
  14. slot = null
  15. Style {
  16. 'app-sidebar:popover-open' {
  17. position = 'fixed'
  18. inset = '0 auto 0 0'
  19. display = 'block'
  20. width = 'min(20rem, 86vw)'
  21. height = '100dvh'
  22. maxHeight = 'none'
  23. margin = '0'
  24. padding = '.5rem 1rem 2rem'
  25. overflowY = 'auto'
  26. color = 'var(--color-text)'
  27. background = 'var(--color-background-sunken)'
  28. border = '0'
  29. }
  30. // Keep the whole selector for pseudo-element.
  31. 'app-sidebar::backdrop' {
  32. background = 'var(--color-background-sunken)'
  33. opacity = '.7'
  34. }
  35. appSidebar {
  36. '> button.sidebar-close' {
  37. display = 'flex'
  38. width = 'var(--layout-tap)'
  39. height = 'var(--layout-tap)'
  40. minHeight = '0'
  41. marginLeft = 'auto'
  42. padding = '0'
  43. fontSize = '1.6rem'
  44. fontWeight = '400'
  45. lineHeight = '1'
  46. color = 'var(--color-text-muted)'
  47. @media {
  48. minWidth = '60rem'
  49. display = 'none'
  50. }
  51. }
  52. }
  53. // slot content from the caller: nesting refused (hybriel#270)
  54. 'app-sidebar h2' {
  55. margin = '1rem 0 .35rem'
  56. padding = '0 .75rem'
  57. fontSize = '.8rem'
  58. fontWeight = '700'
  59. letterSpacing = '.04em'
  60. textTransform = 'uppercase'
  61. color = 'var(--color-text-muted)'
  62. }
  63. // slot content from the caller: nesting refused (hybriel#270)
  64. 'app-sidebar nav a' {
  65. display = 'flex'
  66. alignItems = 'center'
  67. minHeight = 'var(--layout-tap)'
  68. padding = '.45rem .75rem'
  69. color = 'var(--color-text)'
  70. borderRadius = 'var(--radius-small)'
  71. hover {
  72. textDecoration = 'none'
  73. color = 'var(--color-text-strong)'
  74. background = 'var(--color-surface)'
  75. }
  76. }
  77. // Keep the whole selector for selector list.
  78. 'app-sidebar nav a.current,
  79. app-sidebar nav a[aria-current="page"]' {
  80. color = 'var(--color-accent)'
  81. background = 'var(--color-surface)'
  82. }
  83. // Keep the whole selector for selector list.
  84. 'app-sidebar,
  85. app-sidebar:popover-open' {
  86. @media {
  87. minWidth = '60rem'
  88. position = 'static'
  89. inset = 'auto'
  90. display = 'block'
  91. width = 'auto'
  92. height = 'auto'
  93. margin = '0'
  94. padding = '0'
  95. overflow = 'visible'
  96. color = 'inherit'
  97. background = 'transparent'
  98. border = '0'
  99. }
  100. }
  101. // Keep the whole selector for selector list.
  102. 'app-sidebar.mobile-only,
  103. app-sidebar.mobile-only:popover-open' {
  104. @media {
  105. minWidth = '60rem'
  106. display = 'none'
  107. }
  108. }
  109. }
  110. View {
  111. appSidebar { id = "sidebar" class = cls popover = "auto" on click(e) { emit sidebarClick(e) }
  112. button { type = "button" class = "sidebar-close" popovertarget = "sidebar" popovertargetaction = "hide" title = closeLabel 'aria-label' = closeLabel "×" }
  113. slot
  114. }
  115. }
  116. // a tap on a link inside the open overlay closes it (a page change in place would leave it open)
  117. on sidebarClick(e) {
  118. if (e.target.closest('a') != null && e.currentTarget.matches(':popover-open')) { e.currentTarget.hidePopover() }
  119. }

Branches

Latest commits

  • c24608ebmarkdown: format Style with nested language rulesmre
  • de964b3bsettings: format Style with nested language rulesmre
  • 03c1de05new_project: format Style with nested language rulesmre
  • bd76cfa6connect: format Style with nested language rulesmre
  • 01fad593inbox: format Style with nested language rulesmre
  • 79dc9392you: format Style with nested language rulesmre
  • 78073baamain: format Style with nested language rulesmre
  • 5499c290Sync theme unchanged from layouts 17e0f03mre
  • fd33ee21Sync reviewed components from 8176eb1mre
  • 93348453Re-vendor tickets to Hybriel set day35mre
  • a4123831tickets#42: the /connect and /login/callback error pages are app pages: the function routes redirect to /connect/failed/<code> and /login/failed/<code> (components/problem.hl, sentences in lib/problems.hl), htmlPage and its hand-written stylesheet are gone; gate tests/error-pages.mjsmre
  • cefc7b4atickets: a startup error prints its message before exit 1 (hybriel#247)mre
  • 99bd6570tickets: lib/migrate.hl writes no table of another topic any more: projects.hl rewriteSlug / addProjectNamed / hasMembers, tickets.hl moveToProject / ticketRecords / ticketRecordsOf, events.hl renameStates / eventRecords / eventRecordsOf; the migration calls them (tickets#47)mre
  • b57161e3tickets: the markup names its own rules (Style.pMessage, Style.olTickets, ...) instead of hand-written class strings that copy a stylesheet rule; the shared bodies sit in lib/looks.hl (tickets#38)mre
  • f767b24dtickets: 111 needless let became plain declarations (3 in ticket.hl, ticket_list.hl, comments.hl and 108 never-reassigned, not captured loop-body ones); the 212 really reassigned lets stay (tickets#44)mre
  • 16c0d3b5tickets: the modal window is phone first: the full-screen sheet is the base rule, the centred window sits in the min-width 60rem block (tickets#39)mre
  • 090ee809tickets: every component's styles in its own nested Style {} block; styles.hl keeps only the theme inherit, the accent and the site-wide rules (tickets#36)mre
  • d395763ftickets: ident-access gate ports 8769/8768 (8797 is taken on loreana)mre
  • afb9a403tickets: an ident access key (Authorization: Bearer idt_…) works in the API (ident#27 app side): lib/ident-access.hl copied from components, read keys GET only, ident down 503; gate tests/ident-access-tickets.mjsmre
  • 48c1ba79tickets: md-paste-files gate with the file manager casesmre