aboutsummaryrefslogtreecommitdiffstats
path: root/root/experiments
diff options
context:
space:
mode:
Diffstat (limited to 'root/experiments')
-rw-r--r--root/experiments/text$moonscript -> fn -> mmm$dom.moon18
1 files changed, 5 insertions, 13 deletions
diff --git a/root/experiments/text$moonscript -> fn -> mmm$dom.moon b/root/experiments/text$moonscript -> fn -> mmm$dom.moon
index 1c04309..864b604 100644
--- a/root/experiments/text$moonscript -> fn -> mmm$dom.moon
+++ b/root/experiments/text$moonscript -> fn -> mmm$dom.moon
@@ -1,18 +1,10 @@
-import div, h3, ul, li, a from require 'mmm.dom'
+import div, h3, ul, li from require 'mmm.dom'
+import link_to from (require 'mmm.mmmfs.util') require 'mmm.dom'
=>
div {
- h3 @gett 'title: text/plain', style: { 'margin-bottom': '-.5em' },
+ link_to @, h3 @gett 'title: text/plain', style: { 'margin-bottom': '-.5em' },
ul for child in *@children
- name = child\gett 'name: alpha'
- desc = child\gett 'description: text/plain'
- li {
- a name, {
- href: child.path,
- onclick: (e) =>
- e\preventDefault!
- BROWSER\navigate child.path
- },
- ': ', desc
- }
+ desc = child\gett 'description: mmm/dom'
+ li (link_to child), ': ', desc
}