« get me outta code hell

generateGroupGalleryPageAlbumsBySeriesView.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/generateGroupGalleryPageAlbumsBySeriesView.js
blob: 0337275f5602fc822c964c4d7aa273ec2b9c512b (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
26
export default {
  contentDependencies: ['generateGroupGalleryPageSeriesSection'],
  extraDependencies: ['html'],

  relations: (relation, group) => ({
    seriesSections:
      group.serieses
        .map(series =>
          relation('generateGroupGalleryPageSeriesSection', series)),
  }),

  slots: {
    attributes: {
      type: 'attributes',
      mutable: false,
    },
  },

  generate: (relations, slots, {html}) =>
    html.tag('div', {id: 'group-album-gallery-by-series'},
      slots.attributes,

      {[html.onlyIfContent]: true},

      relations.seriesSections),
};