« get me outta code hell

generateReferencedTracksList.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/generateReferencedTracksList.js
blob: 9a211998e8fc36654c972279a4fe649249d21092 (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
export default {
  relations: (relation, track) => ({
   trackList:
      relation('generateNearbyTrackList',
        track.referencedTracks,
        track,
        []),
  }),

  generate: (relations, {html}) =>
    html.tag('ul', {[html.onlyIfContent]: true}, [
      // This code is kept here because it's probably the only
      // detailed example of html.inside() lol
      /*
      html.inside(relations.previousProductionTrackList)
        .map(li => html.inside(li))
        .map(label =>
          html.tag('li',
            language.$('trackList.item.previousProduction',
              {track: label}))),
      */

      html.inside(relations.trackList),
    ]),
};