layouts
All repositories: gitoria
3.1 KB
// app-sidebar.hl — THE SIDEBAR: on the phone an overlay that slides in from the left (the header's toggle opens it), from// 60rem a column of the shell (content-first, three-pane) (docs/layouts/app-sidebar.md). ONE per page: it is `#sidebar`.//// ContentFirst {// Sidebar { MainMenu { items = menu current = "/series" } nav { a { href = "/series/new" "New series" } } }// main { … }// }//// `desktop = "false"`: a sidebar for the phone only (it holds just the main menu, which the header shows on desktop).// The overlay is the browser's popover: Esc, a tap outside, the × and a tap on one of its links close it.String desktop = 'true'String closeLabel = 'Close'String cls = desktop == 'false' ? 'mobile-only' : ''slot = nullStyle {// the phone: hidden (the popover's own default) until the toggle opens it'app-sidebar:popover-open' { position = 'fixed' inset = '0 auto 0 0' display = 'block' width = 'min(20rem, 86vw)' height = '100dvh' maxHeight = 'none' margin = '0' padding = '.5rem 1rem 2rem' overflowY = 'auto' color = 'var(--color-text)' background = 'var(--color-background-sunken)' border = '0' }'app-sidebar::backdrop' { background = 'var(--color-background-sunken)' opacity = '.7' }'app-sidebar > button.sidebar-close' { display = 'flex' width = 'var(--layout-tap)' height = 'var(--layout-tap)' minHeight = '0' marginLeft = 'auto' padding = '0' fontSize = '1.6rem' fontWeight = '400' lineHeight = '1' color = 'var(--color-text-muted)' }'app-sidebar h2' { margin = '1rem 0 .35rem' padding = '0 .75rem' fontSize = '.8rem' fontWeight = '700' letterSpacing = '.04em' textTransform = 'uppercase' color = 'var(--color-text-muted)' }'app-sidebar nav a' { display = 'flex' alignItems = 'center' minHeight = 'var(--layout-tap)' padding = '.45rem .75rem' color = 'var(--color-text)' borderRadius = 'var(--radius-small)' }'app-sidebar nav a:hover' { textDecoration = 'none' color = 'var(--color-text-strong)' background = 'var(--color-surface)' }'app-sidebar nav a.current,app-sidebar nav a[aria-current="page"]' { color = 'var(--color-accent)' background = 'var(--color-surface)' boxShadow = 'inset .2rem 0 0 var(--color-accent)' }// from 60rem: a column of the shell, always shown (the shell places it)'@media (min-width: 60rem)' {'app-sidebar,app-sidebar:popover-open' { position = 'static' inset = 'auto' display = 'block' width = 'auto' height = 'auto' margin = '0' padding = '0' overflow = 'visible' color = 'inherit' background = 'transparent' border = '0' }'app-sidebar > button.sidebar-close' { display = 'none' }'app-sidebar.mobile-only,app-sidebar.mobile-only:popover-open' { display = 'none' }}}View {appSidebar { id = "sidebar" class = cls popover = "auto" on click(e) { emit sidebarClick(e) }button { type = "button" class = "sidebar-close" popovertarget = "sidebar" popovertargetaction = "hide" title = closeLabel 'aria-label' = closeLabel "×" }slot}}// a tap on a link inside the open overlay closes it (a page change in place would leave it open)on sidebarClick(e) {if (e.target.closest('a') != null && e.currentTarget.matches(':popover-open')) { e.currentTarget.hidePopover() }}
Branches
Latest commits
- 7979397creport ML-mobilemre
- 85d2ed25gate: wordingmre
- 98a311c0gate: 390 px checks for list rows, table word, edited tap target, code in titlesmre
- 769b99d7theme: table cells keep a word whole, code in a title stays text-sized, 'edited' is a 44 px tap target on the phonemre
- c36b7595list rows (notes, mail) stack their parts full width: the date no longer a one-letter column beside the titlemre
- 02aa74aasync components.hybriel 134b4e3: MdEditor builds an editor put into the page at once, redraws a surface put in anew (F5, hybriel#211)mre
- 268b1c87sync components.hybriel 6b0936a: the 'edited' foldable drops the theme's border and marginmre
- c51d039fsync components.hybriel 8d79ff7: bubble hugs its content, quiet 'edited' label; gate checksmre
- f4ad7eecsync components 9a: shared Icon (icons/icons.hl), md-editor toolbar icons + single focus ring (components f4-icons ba96735)mre
- db258c11sync-components: copy icons/icons.hl + README (F4); testsmre
- badc1879md-editor.hl: verbatim copy of components f3-mdvalue (an older text handed back is kept)mre
- 867a8375md-editor.hl: verbatim copy of components f3-mdvalue (an outside value change is shown by the editor)mre
- 5d8d2c67tests: wait for hydration before real clicks after a navigation (H2)mre
- 99db79f0re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- 30353f60tests: e2e-md-showcase Chrome range from LAYOUTS_GATE_CHROME_MD, default unchangedmre
- 16a7878cre-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
- 6af559e8docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
- 5599cf56deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- 0bcc6294Mission 011: e2e-197, brief, report, LOGmre
- 137303c5MainMenu marks the current page from the route (hybriel#197, server-rendered); current prop/item.current stay as fallback; tracker demo drops current; gate: SSR marker; docsmre