aboutsummaryrefslogtreecommitdiffstats
path: root/build/layout.moon
blob: 6ff6feb91a7c9814d97cf9ec19aa30d85d837d5d (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
import header, footer, div, h1, span, b, a, img from require 'mmm.dom'

pick = (...) ->
  num = select '#', ...
  i = math.ceil math.random! * num
  select i, ...


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

{
  header: header {
    h1 {
      span '\xe2\x98\x89', class: 'sun'
      b!
      span 'mmm', class: 'bold'
      '.s-ol.nu'
    }
    span "fun stuff with code and wires"
  --        pick 'fun', 'cool', 'weird', 'interesting', 'new'
  --        pick 'stuff', 'things', 'projects', 'experiments', 'news'
  --        "with"
  --        pick 'mostly code', 'code and wires', 'silicon', 'electronics'
  }
  footer: footer {
    span {
      'made with \xe2\x98\xbd by '
      a 's-ol', href: 'https://twitter.com/S0lll0s'
      ", #{os.date '%Y'}"
    }
    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: '1.3em', 'margin-left': '.3em', 'margin-top': '-0.12em' }
    }
  }
}