Display capabilities and paths as accordions to reduce clutter

This commit is contained in:
Gabriel Augendre 2022-11-01 11:35:26 +01:00
parent d80094cf41
commit 10764aaf98
2 changed files with 18 additions and 11 deletions

View file

@ -1,9 +1,16 @@
<li class="list-group-item">
<strong>
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button"
data-bs-toggle="collapse" data-bs-target="#cap-{{ capability.pk }}">
{{ capability.rank }}.
{{ capability.name }}
{% if capability.spell %}<i class="fa-solid fa-hand-sparkles"></i>{% endif %}
{% if capability.limited %}<i class="fa-solid fa-handcuffs"></i>{% endif %}
</strong><br>
{% if capability.spell %}&nbsp;<i class="fa-solid fa-hand-sparkles"></i>{% endif %}
{% if capability.limited %}&nbsp;<i class="fa-solid fa-handcuffs"></i>{% endif %}
</button>
</h2>
<div id="cap-{{ capability.pk }}" class="accordion-collapse collapse">
<div class="accordion-body">
{{ capability.description }}
</li>
</div>
</div>
</div>

View file

@ -23,10 +23,10 @@
{% if path.notes %}
<div class="card-body text-bg-light">{{ path.notes }}</div>
{% endif %}
<ul class="list-group list-group-flush capabilities">
<div class="accordion accordion-flush capabilities">
{% for capability in capabilities %}
{% include "character/capability.html" %}
{% endfor %}
</ul>
</div>
</div>
</div>