{% from "_macros/deferred_icon.html" import deferred_icon %} {% from "_macros/market_button.html" import market_button %} {% macro addon_tile(addon, is_detail=False, src=None) %} {% set tag = 'div' if is_detail else 'a' %} <{{ tag }} class="addon-tile" data-content-type="addon" {% if not is_detail %} href="{{ url('addon', [addon.slug])|urlparams(src=src) }}" {% endif %} data-slug="{{ addon.slug }}">
{% if not is_detail %}

{{ addon.name }}

{% endif %} {% if addon.author %}
{% if is_detail -%} {{ addon.author }} {% else -%} {{ addon.author }} {% endif -%}
{% endif %}
{{ market_button(addon, data_attrs={ 'manifest_url': addon.mini_manifest_url, 'slug': addon.slug, 'source': src }) }}
{{ deferred_icon(addon.icons[is_detail and '128' or '64'] or addon.icons['64'], addon.name) }}
{% endmacro %}