{# vim: ft=htmldjango
#}
{% macro ibutton(href='', left_icon='', right_icon='', text='', color='red', disabled=False) -%}
{% set element = 'a' if href else 'button' %}
<{{ element }} class="{{ color }} button {% if disabled %}disabled{% endif %}"
{% if href %}href="{{ href }}"{% endif %}
{% if disabled %}disabled{% endif %} >
{% if left_icon %}
{% endif %}
{% if text %}
{{ text }}
{% endif %}
{% if right_icon %}
{% endif %}
{{ element }}>
{%- endmacro %}