gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit856dcacb856dcacbLayouts media route: read suffix ranges and ignore range lists and garbage, like the components route (the layouts copy still answered 416 for the last bytes)mre856dcacb/components/demo/notes-demo.hl

2.5 KB

  1. // components/demo/notes-demo.hl — `/shells/list-first[/:id]`: SHELL 2 as a mock Notes app, signed in. On the phone `/`
  2. // shows only the list (its welcome text is never seen there); a note's route shows only the note, with a link back.
  3. // Desktop: list and note side by side; `/` shows the welcome text beside the list.
  4. parent '../main.hl'
  5. import AppHeader from '../../theme/shell/app-header.hl'
  6. import UserMenu from '../../theme/shell/user-menu.hl'
  7. import ListFirst from '../../theme/shell/list-first.hl'
  8. import { notes } from '../../lib/mock.hl'
  9. id = null
  10. String view = id == null ? 'list' : 'detail'
  11. Hybrid rows = listRows(id)
  12. Hybrid note = noteOf(id)
  13. Boolean hasNote = id != null
  14. Boolean welcome = id == null
  15. Boolean emptyNote = note.paragraphs.length == 0
  16. __title = 'List-first demo · WorldAPI layouts'
  17. // the list with the opened note marked
  18. listRows(at) {
  19. out = []
  20. for (n of notes) { out.push({ href = '/shells/list-first/' + n.id title = n.title updated = n.updated cls = n.id == at ? 'selected' : '' aria = n.id == at ? 'page' : 'false' }) }
  21. return out
  22. }
  23. noteOf(at) {
  24. for (n of notes) { if (n.id == at) { return n } }
  25. return { id = '' title = '' updated = '' paragraphs = [] }
  26. }
  27. Style {
  28. 'notes-demo note-title' { display = 'block' fontWeight = '600' color = 'var(--color-text-strong)' }
  29. 'notes-demo note-updated' { display = 'block' fontSize = '.85rem' color = 'var(--color-text-muted)' }
  30. 'notes-demo note-filter' { display = 'block' padding = '.25rem .75rem .75rem' }
  31. }
  32. View {
  33. notesDemo {
  34. AppHeader { brand = "Notes (demo)" brandHref = "/shells/list-first"
  35. UserMenu { name = "Signed in as az5b2 (mock)"
  36. a { href = "/shells" "Settings" }
  37. a { href = "/shells" "Logout" }
  38. }
  39. }
  40. ListFirst { view = view
  41. aside { 'aria-label' = "Notes"
  42. noteFilter { input { type = "search" placeholder = "Filter notes" 'aria-label' = "Filter notes" } }
  43. ul { for (r of rows) { li { a { href = r.href class = r.cls 'aria-current' = r.aria noteTitle { r.title } noteUpdated { r.updated } } } } }
  44. }
  45. main {
  46. if (welcome) {
  47. h1 { "Notes" }
  48. p { class = "muted" "Pick a note on the left. (A phone never shows this text: it opens on the list.)" }
  49. p { class = "links" a { href = "/shells" "‹ Shells" } }
  50. }
  51. if (hasNote) {
  52. a { class = "back" href = "/shells/list-first" "All notes" }
  53. h1 { note.title }
  54. p { class = "muted" "Updated " note.updated }
  55. article { for (t of note.paragraphs) { p { t } } }
  56. if (emptyNote) { p { class = "empty" "This note is empty." } }
  57. }
  58. }
  59. }
  60. }
  61. }

Branches

Latest commits

  • 856dcacbLayouts media route: read suffix ranges and ignore range lists and garbage, like the components route (the layouts copy still answered 416 for the last bytes)mre
  • ad5056eaMerge dm3-sync: components re-sync to c2834ddmre
  • 740e2abeRe-sync the components copy to c2834dd: media player fixes (state after a queue pick, cover-less audio, accessibility labels)mre
  • 7fe103bbMerge mp-player: the media player showcase pagemre
  • 7db43c4eMedia route: serve the showcase's media from committed files (storage/ is not in git)mre
  • f77b7d12Media player: re-sync components from 1c41293 (replay / forward 10 icons, play button surface on audio and video)mre
  • 40a9e69cMP: report, LOG linemre
  • 5b5dbf0fMedia player: the component from components.hybriel dd003e5 (sync-components), the showcase page /components/media-player with a queue, its media files served with ranges (lib/media.hl), theme rules (the seek bar, the queue's current item, the radii), the page in the overview listsmre
  • 9197159fTake components e54f83a: table lines and one-row desktop toolbar in the theme, Table button gates, a table in the md-editor demomre
  • e6322a44UX: report and LOG linemre
  • 58c2da6fUX: nav marker without bars; chat composer is one box (files-upload pick mode, showcase); comments state footer + closer reactions row; modal footer rule only for its own footer; gates for all of itmre
  • 956f107async components.hybriel 4922f9c: 44 px targets in month-view, date-picker, range-picker, pagination, modal, comments; names follow <html lang> (English default), UTC weekday fix; gate: 390 px target checks, 'edited' hit-area padding; comments showcase 'You are' is a labelled group (SY)mre
  • 49940371sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
  • 6f7bd392gate: the phone toolbar is two even rows (E2)mre
  • 3049c082sync components.hybriel 214c318: MdEditor on a phone, two even toolbar rows of 44 px targets, label 15 px, table head 16 px (E2)mre
  • b9a3f85fLOG: MLmre
  • 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