« get me outta code hell

linkFlashActInline.js « dependencies « content « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/linkFlashActInline.js
blob: ba2a488392d5302180998cbc5f3b2158de1ae097 (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
// junk component which only exists because you can't
// "extend" the slots of underlying linkThing.

export default {
  relations: (relation, flashAct) => ({
    link:
      relation('linkThing', 'localized.flashActGallery', flashAct),
  }),

  data: (flashAct) => ({
    name:
      flashAct.name,

    nameHTML:
      flashAct.nameHTML,
  }),

  generate: (data, relations, {html, language}) =>
    relations.link.slot('content',
      html.ifelse([
        html.permit(data.nameHTML, {inline: true}),
        language.sanitize(data.name),
      ])),
};