layouts
All repositories: gitoria
2.5 KB
// components/showcase/md-editor.hl — `/components/md-editor`: the Markdown editor, themed (the component is the verbatim copy// in components/md-editor/, the theme's rules in theme/theme.hl section 3 take its frames away). The showcase keeps no// files: its mdUpload face answers an address under /not-kept/ (the editor shows the link, the file is gone).parent '../main.hl'import SiteHeader from '../site-header.hl'import SiteSidebar from '../site-sidebar.hl'import ContentFirst from '../../theme/shell/content-first.hl'import TheMdEditor from '../md-editor/md-editor.hl'__title = 'Markdown editor · WorldAPI layouts'static NL = ""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' + NL + NL + '| Book | Year |' + NL + '| --- | --- |' + NL + '| Piranesi | 2020 |' + NL + '| The Left Hand of Darkness | 1969 |'View {showMdEditor {SiteHeader { current = "/components/md-editor" }ContentFirst {SiteSidebar { current = "/components/md-editor" }main {h1 { "Markdown editor" }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." }form { method = "get" action = "/components/md-editor"TheMdEditor { name = "note" value = note }h2 { "An empty one" }TheMdEditor { name = "summary" placeholder = "An empty one: type here…" }}h2 { "One row, no File button" }p { class = "muted" "rows = 1 makes the surface one line high (it grows with the text), files = \"off\" takes the File button away: pasted or dropped files are left to the page (the comments block uses this inside its attach form)." }form { method = "get" action = "/components/md-editor"TheMdEditor { name = "line" rows = 1 files = "off" placeholder = "One line, no files…" }}h2 { "Read only" }p { class = "muted" "readonly = \"true\": the Markdown shown formatted and nothing else — no toolbar, no field. The comments block draws its texts so." }TheMdEditor { name = "shown" value = note readonly = "true" }p { class = "readme links" a { href = "/read/readme-md-editor" "README of the component (how an app uses it)" } }}}}}// files dropped into the editor: a showcase keeps nothing, every file gets an address that leads nowhereon server mdUpload(files) {urls = []for (f of files) { urls.push('/not-kept/' + f.size) }return urls}
Branches
Latest commits
- 8cddcaa9Merge branch 'hl-standard-2' into mainAtlas
- 2b480a64|||PR Type the route parameter of main-menu build (HL-STANDARD L10)Atlas
- ab54a39dMerge branch 'hl-standard' into mainAtlas
- 04d36fcf|||PR Type function parameters and drop unneeded let (HL-STANDARD L2, L10)Atlas
- 220c8fa4Merge branch 'readme-audit' into mainAtlas
- b78fb85a|||PR README matches the codemre
- 9f351699Preserve comments and nest supported selectors without changing rendered outputmre
- 97110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre
- ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
- 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
- b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
- ebd00b6cNest caller slot styles in three-panemre
- 009991efNest caller slot styles in list-firstmre
- 494d75d4Nest caller slot styles in app-sidebarmre
- 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