aboutsummaryrefslogtreecommitdiffstats
path: root/root/init.moon
blob: a2eab3b3526e7e3a71341d748ef1d52a7440daae (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import define_fileders from require 'lib.mmmfs'
Fileder = define_fileders ...
require = relative ...

Fileder {
  'name: alpha': '',
  'moon -> mmm/dom': =>
    import article, h1, h3, div, b, p, a, br, ul, tt, li, img from require 'lib.dom'
    import opairs from require 'lib.ordered'

    append, finish = do
      content = {}

      append = (stuff) -> table.insert content, stuff
      append, -> article content

    moon = '\xe2\x98\xbd'

    iconlink = (href, src, alt, style) -> a {
      class: 'iconlink',
      :href,
      target: '_blank',
      img :src, :alt, :style
    }

    -- menu
    append h1 {
      style: {
        position: 'relative',
        'border-bottom': '1px solid #000'
      },
      'mmm',
      div {
        class: 'icons',
        iconlink 'https://github.com/s-ol/mmm', 'https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/github.svg',
        iconlink 'https://twitter.com/S0lll0s', 'https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/twitter.svg',
        iconlink 'https://webring.xxiivv.com/#random', 'https://webring.xxiivv.com/icon.black.svg', 'webring',
          { height: '0.9em', 'margin-left': '.04em' }
      }
    }

    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://github.com/s-ol/mmm' }
      '.'
    }

    for child in *@children
      append (child\get 'preview: mmm/dom') or child\get 'mmm/dom'

    append p {
      "made with #{moon} by "
      a { 's-ol', href: 'https://twitter.com/S0lll0s' }
    }

    finish!

  require '.articles'
  require '.animations'
  require '.experiments'
}