Summary Files Commits Branches @commit @diff @stats
path: root / docs / src / _layout / _mixins.pug
diff options
context:
space:
mode:
1 files changed, 25 insertions, 0 deletions
-rw-r--r--docs/src/_layout/_mixins.pug25
diff --git a/docs/src/_layout/_mixins.pug b/docs/src/_layout/_mixins.pug
new file mode 100644
index 0000000..4d75f85
--- /dev/null
+++ b/docs/src/_layout/_mixins.pug
@@ -0,0 +1,25 @@
+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') # \ No newline at end of file