~homeworkprod/byceps

ref: 4144a29fdeb34e20d44e5cd78a324d9f9f6a2b0d byceps/byceps/blueprints/admin/brand/templates/macros/admin/brand.html -rw-r--r-- 547 bytes
4144a29f — Jochen Kupperschmidt Dim archived brands in admin brand navigation dropdown 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{% macro render_brand_admin_link(brand, class=None, dim_archived=False) -%}
<a href="{{ url_for('admin_dashboard.view_brand', brand_id=brand.id) }}"{% if class %} class="{{ class }}"{% endif %}>
  {%- if dim_archived and brand.archived -%}
    {{ brand.title|dim }}
  {%- else -%}
    {{ brand.title }}
  {%- endif -%}
</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 %}