moviewyrm/bookwyrm/templates/snippets/toggle/toggle_button.html

20 lines
842 B
HTML
Raw Normal View History

<button
type="button"
2021-01-18 04:40:33 +00:00
class="{% if not nonbutton %}button {% endif %}{{ class }}{% if button_type %} {{ button_type }}{% endif %}"
data-controls="{{ controls_text }}{% if controls_uid %}-{{ controls_uid }}{% endif %}"
{% if focus %}data-focus-target="{{ focus }}{% if controls_uid %}-{{ controls_uid }}{% endif %}"{% endif %}
{% if checkbox %}data-controls-checkbox="{{ checkbox }}{% if controls_uid %}-{{ controls_uid }}{% endif %}"{% endif %}
{% if label %}aria-label="{{ label }}"{% endif %}
aria-pressed="{% if pressed %}true{% else %}false{% endif %}"
2021-01-30 19:43:40 +00:00
{% if disabled %}disabled{% endif %}
>
2021-01-14 21:02:50 +00:00
{% if icon %}
2021-01-14 22:13:23 +00:00
<span class="icon icon-{{ icon }}" title="{{ text }}">
2021-01-14 21:02:50 +00:00
<span class="is-sr-only">{{ text }}</span>
</span>
{% else %}
2021-01-30 19:43:40 +00:00
<span>{{ text }}</span>
2021-01-14 21:02:50 +00:00
{% endif %}
</button>