diff --git a/templates/_types/browse/desktop/_filter/search.html b/templates/_types/browse/desktop/_filter/search.html new file mode 100644 index 0000000..2e0ea8e --- /dev/null +++ b/templates/_types/browse/desktop/_filter/search.html @@ -0,0 +1,44 @@ + +{% macro search(current_local_href,search, search_count, hx_select) -%} + + +
+ + +
+ {% if search %} + {{search_count}} + {% endif %} + {{zap_filter}} +
+
+{% endmacro %} \ No newline at end of file diff --git a/templates/_types/browse/mobile/_filter/search.html b/templates/_types/browse/mobile/_filter/search.html new file mode 100644 index 0000000..0f39178 --- /dev/null +++ b/templates/_types/browse/mobile/_filter/search.html @@ -0,0 +1,40 @@ +{% macro search(current_local_href, search, search_count, hx_select) -%} + +
+ + +
+ {% if search %} + {{search_count}} + {% endif %} +
+
+{% endmacro %} \ No newline at end of file diff --git a/templates/_types/cart/_mini.html b/templates/_types/cart/_mini.html new file mode 100644 index 0000000..a8255e4 --- /dev/null +++ b/templates/_types/cart/_mini.html @@ -0,0 +1,45 @@ +{% macro mini(oob=False, count=None) %} +
+ {# cart_count is set by the context processor in all apps. + Cart app computes it from g.cart + calendar_cart_entries; + other apps get it from the cart internal API. + count param allows explicit override when macro is imported without context. #} + {% if count is not none %} + {% set _count = count %} + {% elif cart_count is defined and cart_count is not none %} + {% set _count = cart_count %} + {% elif cart is defined and cart is not none %} + {% set _count = (cart | sum(attribute="quantity")) + ((calendar_cart_entries | length) if calendar_cart_entries else 0) %} + {% else %} + {% set _count = 0 %} + {% endif %} + + {% if _count == 0 %} +
+ + + +
+ {% else %} + + + + + + {{ _count }} + + + {% endif %} +
+{% endmacro %}