mixin docs-accordion(id, name, ...pages)
  .accordion
    input(id='accordion-' + id type='checkbox' name='docs-accordion-checkbox' hidden='' checked=(parent === id ? true : false))
    label.accordion-header.c-hand(for='accordion-' + id)= name
    .accordion-body
      ul.menu.menu-nav
        each page in pages
          li.menu-item
            if slug != parent
              a(href='../' + id + '/' + page.url + '.html')= page.name
            else
              a(href=id + '/' + page.url + '.html')= page.name

mixin docs-heading(id, name)
  .container(id=id)
    h3.s-title
      | #{name}
      a.anchor(href='#'+id aria-hidden='true') #
    if block
      block

mixin docs-subheading(id, name)
  h4.s-subtitle(id=id)
    | #{name}
    a.anchor(href='#'+id aria-hidden='true') #