{# Main panel fragment for HTMX navigation - product detail content #} {% import 'macros/stickers.html' as stick %} {% import '_types/product/prices.html' as prices %} {% set prices_ns = namespace() %} {{ prices.set_prices(d, prices_ns)}} {# Product detail grid from content block #}
{% if d.images and d.images|length > 0 %}
{# --- like button overlay in top-right --- #} {% if g.user %}
{% set slug = d.slug %} {% set liked = liked_by_current_user %} {% include "_types/browse/like/button.html" %}
{% endif %}
{{ d.title }} {% for l in d.labels %} {% endfor %}
{{ d.brand }}
{% if d.images|length > 1 %} {% endif %}
{% for u in d.images %} {% endfor %}
{% else %}
{# Even if no image, still render the like button in the corner for consistency #} {% if g.user %}
{% set slug = d.slug %} {% set liked = liked_by_current_user %} {% include "_types/browse/like/button.html" %}
{% endif %} No image
{% endif %}
{% for s in d.stickers %} {{ stick.sticker(asset_url('stickers/' + s + '.svg'), s, True, size=40) }} {% endfor %}
{# Optional extras shown quietly #}
{% if d.price_per_unit or d.price_per_unit_raw %}
Unit price: {{ prices.price_str(d.price_per_unit, d.price_per_unit_raw, d.price_per_unit_currency) }}
{% endif %} {% if d.case_size_raw %}
Case size: {{ d.case_size_raw }}
{% endif %}
{% if d.description_short or d.description_html %}
{% if d.description_short %}

{{ d.description_short }}

{% endif %} {% if d.description_html %}
{{ d.description_html | safe }}
{% endif %}
{% endif %} {% if d.sections and d.sections|length %}
{% for sec in d.sections %}
{{ sec.title }}
{{ sec.html | safe }}
{% endfor %}
{% endif %}