1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import article, h1, h3, div, b, p, a, br, ul, tt, li, img from require 'mmm.dom'
import link_to from (require 'mmm.mmmfs.util') require 'mmm.dom'
=>
append, finish = do
content = {}
append = (stuff) -> table.insert content, stuff
append, -> article content
append p {
tt 'mmm'
' is not the '
tt 'www'
', because it runs on '
a { 'MoonScript', href: 'https://moonscript.org' }
'.'
br!
'You can find the source code of everything '
a { 'here', href: 'https://git.s-ol.nu/mmm' }
'.'
}
for child in *@children
continue if child\get 'hidden: bool'
append div {
class: 'well'
(child\get 'preview: mmm/dom') or child\get 'mmm/dom'
}
finish!
|