« get me outta code hell

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

  slots: {
    content: {type: 'html'},

    class: {
      validate: v => v.oneOf(v.isString, v.sparseArrayOf(v.isString)),
    },
  },

  generate(slots, {html}) {
    return html.tag('nav', {
      [html.onlyIfContent]: true,
      id: 'secondary-nav',
      class: slots.class,
    }, slots.content);
  },
};