layouts
All repositories: gitoria
3.7 KB
// components/demo/mail-demo.hl — `/shells/three-pane[/:id]`: SHELL 3 as a mock mail client, signed in. Phone: the message// list first, the folders are the sidebar overlay (header toggle); a message replaces the list, with its own actions and a// link back. Desktop: folders, list and message side by side.parent '../main.hl'import AppHeader from '../../theme/shell/app-header.hl'import UserMenu from '../../theme/shell/user-menu.hl'import Sidebar from '../../theme/shell/app-sidebar.hl'import ThreePane from '../../theme/shell/three-pane.hl'import { folders, mails } from '../../lib/mock.hl'id = nullString view = id == null ? 'list' : 'detail'Hybrid boxes = foldersHybrid rows = listRows(id)Hybrid mail = mailOf(id)Boolean hasMail = id != nullBoolean welcome = id == nullString acted = ''__title = 'Three-pane demo · WorldAPI layouts'listRows(at) {out = []for (m of mails) { out.push({ href = '/shells/three-pane/' + m.id from = m.from subject = m.subject date = m.date cls = (m.id == at ? 'selected ' : '') + m.unread aria = m.id == at ? 'page' : 'false' }) }return out}mailOf(at) {for (m of mails) { if (m.id == at) { return m } }return { id = '' from = '' subject = '' date = '' unread = '' body = [] }}Style {mailDemo {mailFrom {display = 'flex'justifyContent = 'space-between'gap = '.5rem'fontSize = '.9rem'color = 'var(--color-text-muted)'span {firstChild {minWidth = '0'overflowWrap = 'anywhere'}lastChild {flex = '0 0 auto'whiteSpace = 'nowrap'}}}mailSubject {display = 'block'overflowWrap = 'anywhere'}aside {'a.unread' {mailSubject {fontWeight = '700'color = 'var(--color-text-strong)'}}}appSidebar {nav {a {display = 'flex'justifyContent = 'space-between'span { color = 'var(--color-text-muted)' }}}}output {display = 'block'marginBottom = '1rem'color = 'var(--color-success)'}}}View {mailDemo { on click(e) { emit mailAction(e) }AppHeader { brand = "Mail (demo)" brandHref = "/shells/three-pane" search = "/search" searchPlaceholder = "Search mail…"UserMenu { name = "Signed in as az5b2 (mock)"a { href = "/shells" "Settings" }a { href = "/shells" "Logout" }}}ThreePane { view = viewSidebar {nav { 'aria-label' = "Folders"h2 { "Folders" }for (f of boxes) { a { href = "/shells/three-pane" f.label span { f.count } } }}nav { 'aria-label' = "Showcase"h2 { "Showcase" }a { class = "back" href = "/shells" "‹ Shells" }}}aside { 'aria-label' = "Inbox"ul { for (r of rows) { li { a { href = r.href class = r.cls 'aria-current' = r.aria mailFrom { span { r.from } span { r.date } } mailSubject { r.subject } } } } }}main {if (welcome) {h1 { "Inbox" }p { class = "muted" "Pick a message. (A phone never shows this text: it opens on the list.)" }}if (hasMail) {a { class = "back" href = "/shells/three-pane" "Inbox" }menu { 'aria-label' = "Message actions"li { button { type = "button" value = "Replied" "Reply" } }li { button { type = "button" value = "Forwarded" "Forward" } }li { button { type = "button" value = "Archived" "Archive" } }li { button { type = "button" class = "danger" value = "Deleted" "Delete" } }}output { acted }h1 { mail.subject }p { class = "muted" mail.from " · " mail.date }article { for (t of mail.body) { p { t } } }}}}}}// the actions are mock: they only say what they would have doneon mailAction(e) {b = e.target.closest('menu button')if (b != null) { acted = b.value + ' (mock — nothing happened)' }}
Branches
Latest commits
- e5571680Align all plugin sources with Hybriel day38bmre
- 5d204c46Re-vendor layouts to Hybriel set day38bmre
- 17e0f03eNest html-prefixed theme component overridesmre
- e54e735eFormat plain theme elements with nested rules and bare mediamre
- 547f834eRecord LY7 deployment and live verificationmre
- fa4600b1Link caller-slot style exceptions to hybriel#270mre
- 413b11e1Record corrected LY7 nesting, exact CSS and Chrome proofmre
- b810453etracker-demo: nest child and compound selectors in Stylemre
- 0b5b1d61notes-demo: nest child and compound selectors in Stylemre
- ab22bdc2mail-demo: nest child and compound selectors in Stylemre
- fe2d8de9home: nest child and compound selectors in Stylemre
- e631791buser-menu: nest child and compound selectors in Stylemre
- 69604944three-pane: nest child and compound selectors in Stylemre
- 3e389b83main-menu: nest child and compound selectors in Stylemre
- 05413975list-first: nest child and compound selectors in Stylemre
- c545b642content-first: nest child and compound selectors in Stylemre
- eae2be7aapp-sidebar: nest child selectors and document caller-slot gapmre
- 69c9f784Record LY7 slot nesting blocker and minimal repromre
- b1d4f379app-header: nest child and compound selectors in Stylemre
- 6385ff8eRecord LY7 style formatting proof and review statusmre