« get me outta code hell

generateCoverArtworkArtistDetails.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/generateCoverArtworkArtistDetails.js
blob: 5b235353c59927a91105c346f5204e86ab434293 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export default {
  contentDependencies: ['linkArtistGallery'],
  extraDependencies: ['html', 'language'],

  relations: (relation, contributions) => ({
    artistLinks:
      contributions
        .map(contrib => contrib.artist)
        .map(artist =>
          relation('linkArtistGallery', artist)),
  }),

  generate: (relations, {html, language}) =>
    html.tag('p', {class: 'image-details'},
      {[html.onlyIfContent]: true},

      {class: 'illustrator-details'},

      language.$('misc.coverGrid.details.coverArtists', {
        artists:
          language.formatConjunctionList(relations.artistLinks),
      })),
};