~homeworkprod/byceps

ref: d01d294a0f6e23b9c8c4692b52425791d85daa2f byceps/byceps/blueprints/admin/brand/templates/macros/admin/brand.html -rw-r--r-- 421 bytes
d01d294a — Jochen Kupperschmidt Show active brands (as avatars) on global admin dashboard 6 months ago
                                                                                
1
2
3
4
5
6
7
8
{% macro render_brand_admin_link(brand, class=None) -%}
  <a href="{{ url_for('admin_dashboard.view_brand', brand_id=brand.id) }}"{% if class %} class="{{ class }}"{% endif %}>{{ brand.title }}</a>
{%- endmacro %}


{% macro render_brand_avatar(brand, size_name) -%}
<div class="avatar size-{{ size_name }}"><img src="{{ brand.image_url_path or url_for('static', filename='brand_fallback.svg') }}"></div>
{%- endmacro %}