From d0c6f879f2e007dc1323a0ba0af4b8507b4fdbb9 Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 23 Nov 2018 18:35:29 +1100 Subject: loading animations --- root/meta/text$moonscript -> fn -> mmm$dom.moon | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'root/meta') diff --git a/root/meta/text$moonscript -> fn -> mmm$dom.moon b/root/meta/text$moonscript -> fn -> mmm$dom.moon index 65ba93f..9062ae3 100644 --- a/root/meta/text$moonscript -> fn -> mmm$dom.moon +++ b/root/meta/text$moonscript -> fn -> mmm$dom.moon @@ -1,25 +1,17 @@ -import div, h3, p, br, ul, li, b, a from require 'mmm.dom' +import div, h3, p, br, ul, li, i from require 'mmm.dom' +import link_to from (require 'mmm.mmmfs.util') require 'mmm.dom' => div { style: { 'max-width': '700px' }, - h3 @gett 'title: text/plain', style: { 'margin-bottom': '-.5em' }, + link_to @, h3 @gett 'title: text/plain', style: { 'margin-bottom': '-.5em' }, p "mmm is a collection of Lua/Moonscript modules for web development. - All modules are 'polymorphic' - they can run in the ", (b 'browser'), + All modules are 'polymorphic' - they can run in the ", (i 'browser'), ", using the native browser API for creating and interacting with DOM content, as well as on the ", - (b 'server'), ", where they operate on and produce equivalent HTML strings." + (i 'server'), ", where they operate on and produce equivalent HTML strings." p "As the two implementations of each module are designed to be compatible, mmm facilitates code and content sharing between server and client and enables serverside rendering and rehydration." 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 } -- cgit v1.2.3