« 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: 6fdfd428423004449fba2773706f0565a0bd5167 (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.arrayOf(v.isString)),
    },
  },

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