feat(components): add the accordion component
This commit is contained in:
parent
7af58fe829
commit
e0ed5a5ddd
10 changed files with 159 additions and 15 deletions
|
|
@ -4,3 +4,28 @@ section = ["Components"]
|
|||
+++
|
||||
|
||||
# accordion.md
|
||||
|
||||
Example:
|
||||
|
||||
```html
|
||||
<ul class="msp-list-unstyle msp-accordion">
|
||||
<li>
|
||||
<a href="/">Overview</a>
|
||||
</li>
|
||||
|
||||
{% for item in get_taxonomy(kind="section") | get(key="items") %}
|
||||
<li class="msp-accordion-item">
|
||||
<a class="msp-accordion-header" href="#">{{ item.name | title }}</a>
|
||||
<div class="msp-accordion-collapse">
|
||||
<ul class="msp-list-unstyle msp-accordion-content">
|
||||
{% for page in item.pages %}
|
||||
<li class="">
|
||||
<a href="{{ page.permalink }}">{{ page.title | default(value=page.slug) | title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue