wiki/_includes/tabs.html
Pk11 6eb8220d6e Improve tabs
- They now work as tabs without JS
- Use an include for cleaner markdown
- A little bit nicer code overall, annoying that the split is needed, but otherwise pretty nice now
2021-03-12 19:45:57 -06:00

8 lines
408 B
HTML

<div class="tab-container">
{% for tab in page.tabs[include.index] %}
<input id="tab-{{ tab[0] }}" class="d-none" name="tabs" type="radio" {% if forloop.first %}checked{% endif %}>
<label for="tab-{{ tab[0] }}" class="tab-link btn btn-outline-secondary" onclick="setTab('{{ tab[0] }}')">{{ tab[1] }}</label>
<div class="tab">{{ include.tabs[forloop.index0] | markdownify }}</div>
{% endfor %}
</div>