tickets
All repositories: gitoria
3.4 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 {'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'}// Keep the whole selector for pseudo-element.'app-sidebar::backdrop' {background = 'var(--color-background-sunken)'opacity = '.7'}appSidebar {'> 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)'@media {minWidth = '60rem'display = 'none'}}}// slot content from the caller: nesting refused (hybriel#270)'app-sidebar h2' {margin = '1rem 0 .35rem'padding = '0 .75rem'fontSize = '.8rem'fontWeight = '700'letterSpacing = '.04em'textTransform = 'uppercase'color = 'var(--color-text-muted)'}// slot content from the caller: nesting refused (hybriel#270)'app-sidebar nav a' {display = 'flex'alignItems = 'center'minHeight = 'var(--layout-tap)'padding = '.45rem .75rem'color = 'var(--color-text)'borderRadius = 'var(--radius-small)'hover {textDecoration = 'none'color = 'var(--color-text-strong)'background = 'var(--color-surface)'}}// Keep the whole selector for selector list.'app-sidebar nav a.current,app-sidebar nav a[aria-current="page"]' {color = 'var(--color-accent)'background = 'var(--color-surface)'}// Keep the whole selector for selector list.'app-sidebar,app-sidebar:popover-open' {@media {minWidth = '60rem'position = 'static'inset = 'auto'display = 'block'width = 'auto'height = 'auto'margin = '0'padding = '0'overflow = 'visible'color = 'inherit'background = 'transparent'border = '0'}}// Keep the whole selector for selector list.'app-sidebar.mobile-only,app-sidebar.mobile-only:popover-open' {@media {minWidth = '60rem'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
- c077a5cbstyles: format Style with nested language rulesmre
- ccdde2beticket: format Style with nested language rulesmre
- d083535bticket_list: nest Style rules and bare media queriesmre
- 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