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
  | 
export default {
  slots: {
    caption: {type: 'html', mutable: false},
  },
  generate: (slots, {html, language}) =>
    language.encapsulate('misc.coverGrid', capsule =>
      html.tag('div', {class: 'grid-expando'},
        {[html.onlyIfSiblings]: true},
        html.tag('p', {class: 'grid-expando-content'},
          {[html.joinChildren]: html.tag('br')},
          [
            html.tag('span', {class: 'grid-caption'},
              slots.caption),
            !html.isBlank(slots.contentBelowCut) &&
              language.$(capsule, 'expandCollapseCue', {
                cue:
                  html.tag('a', {class: 'grid-expando-toggle'},
                    {href: '#'},
                    {[html.joinChildren]: ''},
                    {[html.noEdgeWhitespace]: true},
                    [
                      html.tag('span', {class: 'grid-expand-cue'},
                        language.$(capsule, 'expand')),
                      html.tag('span', {class: 'grid-collapse-cue'},
                        {style: 'display: none'},
                        language.$(capsule, 'collapse')),
                    ]),
              }),
          ]))),
};
  |