From a1e11c10d41e15bf009f5189a09db9700688fa60 Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 10 Feb 2026 10:54:50 +0000 Subject: [PATCH] refactor: make post header/nav cross-service (coop_url instead of url_for) Blog overrides these with its own url_for + HTMX versions. Co-Authored-By: Claude Opus 4.6 --- suma_browser/templates/_types/post/_nav.html | 8 -------- suma_browser/templates/_types/post/header/_header.html | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/suma_browser/templates/_types/post/_nav.html b/suma_browser/templates/_types/post/_nav.html index 5cc37ae..a124ae2 100644 --- a/suma_browser/templates/_types/post/_nav.html +++ b/suma_browser/templates/_types/post/_nav.html @@ -6,11 +6,3 @@ {% include '_types/post/admin/_nav_entries.html' %} {% endif %} - - {# Admin link #} - {% if post and has_access('blog.post.admin.admin') %} - {% import 'macros/links.html' as links %} - {% call links.link(url_for('blog.post.admin.admin', slug=post.slug), hx_select_search, select_colours, True, aclass=styles.nav_button) %} - - {% endcall %} - {% endif %} diff --git a/suma_browser/templates/_types/post/header/_header.html b/suma_browser/templates/_types/post/header/_header.html index 16bdf45..a75eda3 100644 --- a/suma_browser/templates/_types/post/header/_header.html +++ b/suma_browser/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 ) %} + {% if post.feature_image %} {{ post.title | truncate(160, True, '…') }} - {% endcall %} - {% call links.desktop_nav() %} + + {% call links.desktop_nav() %} {% include '_types/post/_nav.html' %} {% endcall %} {% endcall %}