components
All repositories: gitoria
1.6 KB
// demo.hl — `/code-editor`: two editors (Hybriel and JavaScript) and the text each holds shown below. The editor announces a change// with a bubbling DOM `input` event on its hidden field: `e.target.value` is the text.parent '../main.hl'import CodeEditor from './code-editor.hl'__title = 'Code editor · Hybriel components'static NL = ""static TAB = " "String hl = '// a Hybriel component' + NL + 'String title = \'Hello\'' + NL + NL + 'greet(name) {' + NL + TAB + 'return "Hi " + name' + NL + '}' + NL + NL + 'View {' + NL + TAB + 'h1 { title }' + NL + '}'String js = 'function add(a, b) {' + NL + TAB + '/* sum */' + NL + TAB + 'return a + b + 42' + NL + '}' + NL + 'const text = `sum: ${add(1, 2)}`'View {codeEditorDemo {h1 { "Code editor" }p { class = "muted" "Type code: it is coloured while you type and the line numbers follow. Tab indents, Shift+Tab outdents, Ctrl+Z / Ctrl+Shift+Z undo and redo, Enter keeps the indent, brackets and quotes close themselves." }form { id = "code-form" method = "get" action = "/code-editor" on input(e) { emit demoCode(e) }h2 { "Hybriel" }CodeEditor { name = "hybriel" value = hl language = "hybriel" }pre { id = "code-value-hybriel" hl }h2 { "JavaScript, indented with 2 spaces" }CodeEditor { name = "js" value = js language = "js" spaces = 2 }pre { id = "code-value-js" js }p { button { type = "submit" "Send (posts both texts)" } }}p { a { id = "readme" href = "/code-editor/README.md" "README (how to use it)" } }}}on demoCode(e) {if (e.target.name == 'hybriel') { hl = e.target.value }if (e.target.name == 'js') { js = e.target.value }}
Branches
Latest commits
- 895a5afcRe-vendor complete Hybriel plugins and runtime to day41mre
- 16006bb3Backup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 88397fc3Re-vendor complete Hybriel plugins and runtime to day39mre
- 9b872cedRecord IC28 deployment and live icon verificationmre
- 46fefaa7Count the icons entry in the offline home-page checkmre
- c7e14cabRecord IC28 rerun and unchanged-main baseline comparisonmre
- 5e090ffdRecord IC28 review evidence and gate resultsmre
- adfe2c4dAdd shuffle, repeat and repeatOne shared iconsmre
- c96709c8media-player: skip = false and repeat = 'one' options (jukebox#19)mre
- bd4aa808Record VL24 deployment and live verificationmre
- e5b98ecfRun virtual-list gate before deploymentmre
- 2e9b4a8evirtual-list: into main, with centerId and scrollTop/onScroll (jukebox#20)mre
- 69954249Align all plugin sources with Hybriel day38bmre
- f740f666Re-vendor components to Hybriel set day38bmre
- 8176eb14Record CS23b deployment and live verificationmre
- 84e3ddaaRemove blank line before pagination Style closing bracemre
- a92298ddRecord exact CSS and same-date proof after specificity reviewmre
- c71a0abePreserve consumer theme specificity with nested tag rulesmre
- 64a2bc27Document CS23b style formatting proof and review statusmre
- a72b57cficons: nest Style rules in the language's formmre