gitoria

layouts

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit876b2064876b2064docs: workaround note for hybriel#130 (slot marker mid-line)mre876b2064/components/showcase/md-editor.hl

1.7 KB

  1. // components/showcase/md-editor.hl — `/components/md-editor`: the Markdown editor, themed (the component is the verbatim copy
  2. // in components/md-editor/, the theme's rules in theme/theme.hl section 3 take its frames away). The showcase keeps no
  3. // files: its mdUpload face answers an address under /not-kept/ (the editor shows the link, the file is gone).
  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. __title = 'Markdown editor · WorldAPI layouts'
  10. static NL = "
  11. "
  12. String note = '# Reading list' + NL + NL + 'Books for the **autumn**, with *one* `code` word and a [link](https://worldapi.org).' + NL + NL + '- The Left Hand of Darkness' + NL + '- Piranesi'
  13. View {
  14. showMdEditor {
  15. SiteHeader { current = "/components/md-editor" }
  16. ContentFirst {
  17. SiteSidebar { current = "/components/md-editor" }
  18. main {
  19. h1 { "Markdown editor" }
  20. p { class = "muted" "Edit visually: headings look like headings, bold is bold. One sunken surface; the toolbar is a strip on it, no lines between the parts." }
  21. form { method = "get" action = "/components/md-editor"
  22. TheMdEditor { name = "note" value = note }
  23. h2 { "An empty one" }
  24. TheMdEditor { name = "summary" placeholder = "An empty one: type here…" }
  25. }
  26. p { class = "readme" a { href = "/components/md-editor/README.md" "README of the component (how an app uses it)" } }
  27. }
  28. }
  29. }
  30. }
  31. // files dropped into the editor: a showcase keeps nothing, every file gets an address that leads nowhere
  32. on server mdUpload(files) {
  33. urls = []
  34. for (f of files) { urls.push('/not-kept/' + f.size) }
  35. return urls
  36. }

Branches

Latest commits

  • 876b2064docs: workaround note for hybriel#130 (slot marker mid-line)mre
  • 85b56541layouts mission 002 3/3: same-output tests, letcount, shots ports, docs, reportmre
  • 0f325d3blayouts mission 002 2/3: code rules — styles.hl -> components/styles.hl, the one never-reassigned let dropped; gate 73/0, same outputmre
  • a3e74c8alayouts mission 002 1/3: components re-copied byte-verbatim from components.hybriel 3f93d71 by tools/sync-components.sh (+ --check, components/SOURCE); gate 73/0, check-theme 0mre
  • 80ce6ba9report 001 (mission 075)mre
  • 5c6e338flayouts.worldapi.org in Hybriel: WorldAPI theme (tokens, borderless elements, themed components.hybriel components), shells (header, main/user menu, sidebar overlay, content-first, list-first, three-pane), showcase, check-theme helper; gate 73/0 (mission 075)mre