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
- 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
- 0100f51etracker-demo: format Style with nested rules and bare mediamre