gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit6e03be0a6e03be0apull state: keep the resync marker until the sync ran (#56)mre6e03be0a/theme/shell/app-sidebar.hl

3.3 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. // Keep the whole selector for selector list.
  54. 'app-sidebar nav a.current,
  55. app-sidebar nav a[aria-current="page"]' {
  56. color = 'var(--color-accent)'
  57. background = 'var(--color-surface)'
  58. }
  59. // Keep the whole selector for selector list.
  60. 'app-sidebar,
  61. app-sidebar:popover-open' {
  62. @media {
  63. minWidth = '60rem'
  64. position = 'static'
  65. inset = 'auto'
  66. display = 'block'
  67. width = 'auto'
  68. height = 'auto'
  69. margin = '0'
  70. padding = '0'
  71. overflow = 'visible'
  72. color = 'inherit'
  73. background = 'transparent'
  74. border = '0'
  75. }
  76. }
  77. // Keep the whole selector for selector list.
  78. 'app-sidebar.mobile-only,
  79. app-sidebar.mobile-only:popover-open' {
  80. @media {
  81. minWidth = '60rem'
  82. display = 'none'
  83. }
  84. }
  85. // Caller slot content is unknown here, so its selectors must be whole.
  86. 'app-sidebar h2' {
  87. margin = '1rem 0 .35rem'
  88. padding = '0 .75rem'
  89. fontSize = '.8rem'
  90. fontWeight = '700'
  91. letterSpacing = '.04em'
  92. textTransform = 'uppercase'
  93. color = 'var(--color-text-muted)'
  94. }
  95. 'app-sidebar nav a' {
  96. display = 'flex'
  97. alignItems = 'center'
  98. minHeight = 'var(--layout-tap)'
  99. padding = '.45rem .75rem'
  100. color = 'var(--color-text)'
  101. borderRadius = 'var(--radius-small)'
  102. }
  103. 'app-sidebar nav a:hover' {
  104. textDecoration = 'none'
  105. color = 'var(--color-text-strong)'
  106. background = 'var(--color-surface)'
  107. }
  108. }
  109. View {
  110. appSidebar { id = "sidebar" class = cls popover = "auto" on click(e) { emit sidebarClick(e) }
  111. button { type = "button" class = "sidebar-close" popovertarget = "sidebar" popovertargetaction = "hide" title = closeLabel 'aria-label' = closeLabel "×" }
  112. slot
  113. }
  114. }
  115. // a tap on a link inside the open overlay closes it (a page change in place would leave it open)
  116. on sidebarClick(e) {
  117. if (e.target.closest('a') != null && e.currentTarget.matches(':popover-open')) { e.currentTarget.hidePopover() }
  118. }

Branches

Latest commits

  • 6e03be0apull state: keep the resync marker until the sync ran (#56)mre
  • 93bdd26cpull state: wait for a claimed row, resync when it stays busy (#56)mre
  • e53d284bpull state: stop on a failed branch scan, claim the row on writes (#56)mre
  • d8608224close and reopen: keep a manual close against sync (#56)mre
  • ffb60746|||PR close and reopen pull requests (#56)mre
  • fe209ffeMerge branch 'w56-owner-members' into mainGitoria
  • fa0754c8|||PR repository owner transfer and members API (#55)mre
  • 8862e537Merge branch 'w55-rename-org' into mainGitoria
  • 014d2b7fOne immutable readers snapshot per move for the left-organization event (#53)mre
  • 1859d506Decide who hears a repo left its organization by its readers before the move (#53)mre
  • 499f25f2Review fixes for the Settings organization move (#53)mre
  • ed3b922b|||PR move a repository into an organization in Settings (#53)mre
  • 74ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria
  • 9f7ce8d8Preserve rename compatibility and live page titlesmre
  • c3d95b6e|||PR separate names and addresses, rename repositories in Settings (#53)mre
  • ce08920dMerge branch 'w52c-header-phone' into mainGitoria
  • 0bab9e46|||PR header: ident status wraps on phones instead of clippingmre
  • e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
  • c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
  • 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria