{% import 'macros/stickers.html' as stick %} {# One row only; center when not overflowing; horizontal scroll when needed #} {% for s in labels %} {% set is_on = (selected_labels and (s.name|lower in selected_labels)) %} {% set qs = {"remove_label": s.name, "page": None}|qs if is_on else {"add_label": s.name, "page": None}|qs %} {% set href = (current_local_href ~ qs)|host %} {{ stick.sticker(asset_url('nav-labels/' + s.name + '.svg'), s.name, is_on)}} {% if s.count is not none %} {{ s.count }} {% endif %} {% endfor %} {# Optional: hide horizontal scrollbar on mobile while keeping scrollable #}