Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
layout: _includes/layout-basic.njk
title: Collapsible Box
- component
- component_medium
contentTitle: Collapsible Box
content: <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate veli esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
{% macro collapsibleBox(contentTitle, content) %}
<details class="collapsible-box">
<summary class="collapsible-box__title">
{{ contentTitle }}
<div class="collapsible-box__content-wrapper">
{{ content | safe }}
{% endmacro %}
{{ collapsibleBox(contentTitle, content) }}
layout: _includes/layout-basic.njk
title: FAQ
- section
contentTitle: Frequently Asked Questions
{% include "component/collapsible-box.njk" as collapsibleBox %}
<section class="faq">
<h2 class="faq__title">
{{ contentTitle }}
{{ collapsibleBox.(
'This is my question?',
'This is my answer!'
) }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.