
{% macro link(view, label) -%}
    {% if not view is string %}
        {% set url = url_for(view.pop("view"), **view) %}
    {% else %}
        {% set url = url_for(view) %}
    {% endif %}
    {{ html_tag("a", href=url, **kwargs) }}
        {% if caller %}{{ caller() }}{% else %}{{ label }}{% endif %}
    </a>
{%- endmacro %}


{% macro favicon(url) -%}
    {{ html_tag("link", rel="icon", href=url, **kwargs) }}
{%- endmacro %}


{% macro stylesheet(file) -%}
    {{ html_tag("link", rel="stylesheet", type="text/css", href=url_for_static(file), **kwargs) }}
{%- endmacro %}


{% macro jsscript(file) -%}
    {{ html_tag("script", type="text/javascript", src=url_for_static(file), **kwargs) }}</script>
{%- endmacro %}