moviewyrm/bookwyrm/templates/components/dropdown.html
Fabien Basmaison a05b14c338 [profile] Various HTML fixes:
- Wrap block level elements within block level elements, not inline.
- Avoid empty blocks.
- Change `<hr>` in lists into allowed type of children.
- Fix duplicated ID (some change that was not propagated across the template?).
- Make the anchor optional in the navbar (interactive elements (`a`, `input`, `button`…) should not appear into other interactive elements).
- Remove redundant `role` on main navigation.
- Make the modal a modal with `role="dialog".
- Use `button` instead of form-less `label`.
2021-03-03 20:10:09 +01:00

13 lines
633 B
HTML

{% load bookwyrm_tags %}
{% with 0|uuid as uuid %}
<div class="dropdown control{% if right %} is-right{% endif %}" id="menu-{{ uuid }}">
<button type="button" class="button dropdown-trigger pulldown-menu {{ class }}" aria-expanded="false" class="pulldown-menu" aria-haspopup="true" aria-controls="menu-options-{{ uuid }}" data-controls="menu-{{ uuid }}">
{% block dropdown-trigger %}{% endblock %}
</button>
<div class="dropdown-menu">
<ul class="dropdown-content" role="menu" id="menu-options-{{ uuid }}">
{% block dropdown-list %}{% endblock %}
</ul>
</div>
</div>
{% endwith %}