diff options
Diffstat (limited to 'root/projects')
| -rw-r--r-- | root/projects/text$moonscript -> fn -> mmm$dom.moon | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/root/projects/text$moonscript -> fn -> mmm$dom.moon b/root/projects/text$moonscript -> fn -> mmm$dom.moon index be9f35f..864b604 100644 --- a/root/projects/text$moonscript -> fn -> mmm$dom.moon +++ b/root/projects/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: mmm/dom' - li { - a name, { - href: child.path, - onclick: (e) => - e\preventDefault! - BROWSER\navigate child.path - }, - ': ', desc - } + li (link_to child), ': ', desc } |
