<a{% for attr, value  in options %} {{ attr }}="{{ value }}"{% endfor %}>
    <span class="right floated">
        {% if sorted %}
            {% if direction == 'desc' %}
                <i class="sort down icon"></i>
            {% else %}
                <i class="sort up icon"></i>
            {% endif %}
        {% else %}
            <i class="sort icon"></i>
        {% endif %}
    </span>
    {{ title }}
</a>
