feat: allow customizable heading levels for details summary
This commit is contained in:
parent
55ab760eb4
commit
66e042825f
1 changed files with 9 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
{% set headingLevel = headingLevel | default(false) %}
|
||||
|
||||
<div class="details flow">
|
||||
<div class="control | cluster" aria-label="{{ meta.details.aria }}">
|
||||
<button id="expandAll" class="button" data-small-button>{{ meta.details.expand }}</button>
|
||||
|
|
@ -5,7 +7,13 @@
|
|||
</div>
|
||||
{%- for item in itemList | alphabetic -%}
|
||||
<details id="{{ item.data.title | slugify }}">
|
||||
<summary>{{ item.data.title }}</summary>
|
||||
<summary>
|
||||
{%- if headingLevel -%}
|
||||
<{{ headingLevel }}>{{ item.data.title }}</{{ headingLevel }}>
|
||||
{%- else -%}
|
||||
{{ item.data.title }}
|
||||
{%- endif -%}
|
||||
</summary>
|
||||
{{- item.templateContent | safe -}}
|
||||
</details>
|
||||
{%- endfor -%}
|
||||
|
|
|
|||
Loading…
Reference in a new issue