gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc545b642c545b642content-first: nest child and compound selectors in Stylemrec545b642/components/read.hl

1.4 KB

  1. // components/read.hl — `/read/:doc`: a doc or a component README read INSIDE the app shell (header, sidebar), the Markdown
  2. // drawn by the editor's read-only face — the same look as the comments. (The raw files stay at /docs/*.md and
  3. // /components/*/README.md for models and tools; no page of the site links to them.)
  4. parent './main.hl'
  5. import SiteHeader from './site-header.hl'
  6. import SiteSidebar from './site-sidebar.hl'
  7. import ContentFirst from '../theme/shell/content-first.hl'
  8. import TheMdEditor from './md-editor/md-editor.hl'
  9. import { entryOf, textOf } from '../lib/read.hl'
  10. doc = null
  11. Hybrid entry = doc == null ? null : entryOf(doc)
  12. String text = entry == null ? '' : textOf(doc)
  13. String heading = entry == null ? 'Not found' : entry.label
  14. Boolean found = entry != null
  15. Boolean missing = entry == null
  16. __title = 'Docs · WorldAPI layouts'
  17. Style {
  18. 'read-page a.back' { display = 'inline-flex' alignItems = 'center' minWidth = 'var(--layout-tap)' minHeight = 'var(--layout-tap)' marginBottom = '.5rem' fontWeight = '600' }
  19. 'read-page a.back::before' { content = '"‹ "' }
  20. }
  21. View {
  22. readPage {
  23. SiteHeader { current = "/docs" }
  24. ContentFirst {
  25. SiteSidebar { current = "/docs" }
  26. main {
  27. a { class = "back" href = "/docs" "Docs" }
  28. if (found) { TheMdEditor { name = "doc" value = text readonly = "true" } }
  29. if (missing) { h1 { heading } p { class = "empty" "No such page. " a { href = "/docs" "All docs" } } }
  30. }
  31. }
  32. }
  33. }

Branches

Latest commits

  • 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
  • 0100f51etracker-demo: format Style with nested rules and bare mediamre
  • 5f82554enotes-demo: format Style with nested rules and bare mediamre
  • 3dc27d78mail-demo: format Style with nested rules and bare mediamre
  • cf9648afhome: format Style with nested rules and bare mediamre
  • 846a6242user-menu: format Style with nested rules and bare mediamre
  • 4d58708cthree-pane: format Style with nested rules and bare mediamre
  • 0bbfc553main-menu: format Style with nested rules and bare mediamre
  • 7755199dlist-first: format Style with nested rules and bare mediamre
  • 35199303content-first: format Style with nested rules and bare mediamre
  • 00f6e698app-sidebar: format Style with nested rules and bare mediamre
  • bb2f29c9app-header: format Style with nested rules and bare mediamre
  • 3aca2d7fSync components from 8176eb1 with reviewed nested stylesmre
  • 87e4003dRe-vendor layouts to Hybriel set day35mre
  • d8628cfflayouts: a startup error prints its message before exit 1 (hybriel#247)mre
  • 180fd76elayouts: MdEditor from components 59704ce (text on the clipboard always pastes, a file manager copy still attaches; pipe rows; empty Table-button table; tickets#49, notes#5)mre