Skip to content

Commit

Permalink
update community/index.html to use accordion
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Prom committed Nov 6, 2024
1 parent 4884343 commit 869aed6
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions community/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,30 @@

<h1>Community</h1>

<div class="uk-flex uk-flex-center uk-flex-right@s">
<button class="uk-button uk-margin-small-right uk-button-primary" onclick="expandAllAccordion()">expand all</button>
<button class="uk-button uk-button-primary" onclick="collapseAllAccordion()">collapse all</button>
</div>
<hr>
{% if site.data.community %}
{% assign community = site.data.community %}
{% for item in community %}
{% for cat in item.category %}
<p class="uk-text-bold">{{ cat.name }}</p>
<ul class="uk-list uk-list-disc">
{% for resource in cat.resources %}
<li class="uk-margin-remove"><a href="{{ resource.url }}">{{ resource.description }}</a></li>
{% endfor %}
</ul>
{% endfor %}
{% endfor %}
{% for cat in item.category %}
<ul uk-accordion>
<li class="ukaccordion">
<a class="uk-accordion-title">{{ cat.name }}</a>
<div class="uk-accordion-content">
<ul class="uk-list uk-list-disc">
{% for resource in cat.resources %}
<li class="uk-margin-remove"><a href="{{ resource.url }}">{{ resource.description }}</a></li>
{% endfor %}
</ul>
</div>
</li>
</ul>
<hr>
{% endfor %}
{% endfor %}
{% endif %}

<script src="../assets/js/utils.js"></script>

0 comments on commit 869aed6

Please sign in to comment.