« get me outta code hell

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

  relations(relation, coverArtists) {
    return {
      coverArtistLinks:
        coverArtists
          .map(artist => relation('linkArtistGallery', artist)),
    };
  },

  generate(relations, {html, language}) {
    return (
      html.tag('p', {class: 'quick-info'},
        language.$('albumGalleryPage.coverArtistsLine', {
          artists: language.formatConjunctionList(relations.coverArtistLinks),
        })));
  },
};