{# trade-pro macro library: passthrough copy of the shared themes/_professional_components.html with English strings, plus the trade-pro inline SVG icon set (Task 9). Icons are decorative server-side inlines: no JS dependency, currentColor strokes. #} {# ── SVG icon set (Task 9) ────────────────────────────────────────────── Style contract: 24×24 viewBox, stroke=currentColor, stroke-width 1.5, fill none, round caps/joins — the same modern line language as the ported cms design. Every glyph is ONE (subpaths allowed) so the d attribute survives autoescaping without |safe. Unknown names fall back to arrow-right instead of raising (page code typos must never take a build down). #} {% set _tp_icon_paths={ 'arrow-right':'M5 12h14M12 5l7 7-7 7', 'arrow-left':'M19 12H5M12 19l-7-7 7-7', 'chevron-down':'M6 9l6 6 6-6', 'check':'M20 6 9 17 4 12', 'phone':'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z', 'mail':'M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2Zm18 2-10 7L2 6', 'location':'M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0ZM12 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z', 'download':'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3', 'search':'M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16ZM21 21l-4.35-4.35', 'quote':'M8 3a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 1 1 0 0 0-1 1v1a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2 1 1 0 0 0 1-1v-1a1 1 0 0 0-1-1 2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4ZM16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2 1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1 2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-4Z' } %} {% macro icon(name, size=None, cls='') -%} {%- set _d=_tp_icon_paths.get(name) or _tp_icon_paths['arrow-right'] -%} {%- endmacro %} {% macro cover(item, kind='product') %} {% if item.cover %}{{ item.title }} {% else %}
{{ (item.title or 'SF')[:2] }}{{ kind|upper }}
{% endif %} {% endmacro %} {% macro card(item, kind='product', position=0) %}
{{ cover(item,kind) }}
{{ fields_of(item).get('brand') or fields_of(item).get('category') or {'product':'PRODUCT','vehicle':'VEHICLE','post':'NEWS','case':'CASE','brand':'BRAND','service':'SERVICE'}.get(item.type,'CONTENT') }}{{ '%02d'|format(position+1) }}

{{ item.title }}

{{ (item.summary or '')[:128] }}

View details {{ icon('arrow-right') }}
{% endmacro %} {% macro grid(items,kind='product') %}
{% for item in items %}{{ card(item,kind,loop.index0) }}{% else %}
No published content in this section yet.
{% endfor %}
{% endmacro %} {% macro section_title(eyebrow,heading,href='') %}
{{ eyebrow }}

{{ heading }}

{% if href %}Browse all {{ icon('arrow-right') }}{% endif %}
{% endmacro %} {% macro filters() %}
{% endmacro %} {% macro footer_links(nav) %}{% endmacro %} {% macro body_copy(content,page) %}{% if content %}
{{ content }}
{% elif page.summary %}

{{ page.summary }}

{% else %}

Complete this page's content in the admin console.

{% endif %}{% endmacro %}