From 85ffe34fc9ec4c90db70ff8dfbbd66c141e1eec1 Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 24 Feb 2026 17:33:11 +0000 Subject: [PATCH] Remove cross-domain template copies, use shared macros - Blog hamburger: removed (inlined in shared layout.html) - Cart mini: use macros/cart_icon.html for add-to-cart OOB - Post header: use blog_url() instead of url_for('blog.post.post_detail') Co-Authored-By: Claude Opus 4.6 --- shared | 2 +- .../blog/mobile/_filter/_hamburger.html | 13 ------ templates/_types/cart/_mini.html | 45 ------------------- templates/_types/post/header/_header.html | 2 +- templates/_types/product/_added.html | 4 +- 5 files changed, 4 insertions(+), 62 deletions(-) delete mode 100644 templates/_types/blog/mobile/_filter/_hamburger.html delete mode 100644 templates/_types/cart/_mini.html diff --git a/shared b/shared index 5518c95..cf2e2ba 160000 --- a/shared +++ b/shared @@ -1 +1 @@ -Subproject commit 5518c9523729e5c1f6cdb8dd1892ded8d0ed8c71 +Subproject commit cf2e2ba1db3011f686de7b8f11dfaa7d928c0d1e diff --git a/templates/_types/blog/mobile/_filter/_hamburger.html b/templates/_types/blog/mobile/_filter/_hamburger.html deleted file mode 100644 index 10e0b9c..0000000 --- a/templates/_types/blog/mobile/_filter/_hamburger.html +++ /dev/null @@ -1,13 +0,0 @@ -
- - - - - - - - -
diff --git a/templates/_types/cart/_mini.html b/templates/_types/cart/_mini.html deleted file mode 100644 index a8255e4..0000000 --- a/templates/_types/cart/_mini.html +++ /dev/null @@ -1,45 +0,0 @@ -{% 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 %} diff --git a/templates/_types/post/header/_header.html b/templates/_types/post/header/_header.html index 143e79d..6655eb5 100644 --- a/templates/_types/post/header/_header.html +++ b/templates/_types/post/header/_header.html @@ -1,7 +1,7 @@ {% import 'macros/links.html' as links %} {% macro header_row(oob=False) %} {% call links.menu_row(id='post-row', oob=oob) %} - {% call links.link(url_for('blog.post.post_detail', slug=post.slug), hx_select_search ) %} + {% call links.link(blog_url('/' + post.slug + '/'), hx_select_search ) %} {% if post.feature_image %}