fix: preserve post admin nav bar across events app pages
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s

- Add post-admin-header-child row to calendars, calendar, markets,
  and payments index templates so the admin nav bar persists
- Create events-app-specific post/admin nav and header templates
  using coop_url() for blog endpoints instead of url_for()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 23:51:40 +00:00
parent e0679f8100
commit ac9d97d78d
6 changed files with 68 additions and 12 deletions

View File

@@ -5,11 +5,13 @@
{% block root_header_child %}
{% from '_types/root/_n/macros.html' import index_row with context %}
{% call index_row('post-header-child', '_types/post/header/_header.html') %}
{% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %}
{% call index_row('calendar-header-child', '_types/calendar/header/_header.html') %}
{% block calendar_header_child %}
{% endblock %}
{% endcall %}
{% endcall %}
{% endcall %}
{% endblock %}

View File

@@ -5,11 +5,13 @@
{% block root_header_child %}
{% from '_types/root/_n/macros.html' import index_row with context %}
{% call index_row('post-header-child', '_types/post/header/_header.html') %}
{% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %}
{% call index_row('calendars-header-child', '_types/calendars/header/_header.html') %}
{% block calendars_header_child %}
{% endblock %}
{% endcall %}
{% endcall %}
{% endcall %}
{% endblock %}

View File

@@ -5,11 +5,13 @@
{% block root_header_child %}
{% from '_types/root/_n/macros.html' import index_row with context %}
{% call index_row('post-header-child', '_types/post/header/_header.html') %}
{% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %}
{% call index_row('markets-header-child', '_types/markets/header/_header.html') %}
{% block markets_header_child %}
{% endblock %}
{% endcall %}
{% endcall %}
{% endcall %}
{% endblock %}
{% block _main_mobile_menu %}

View File

@@ -5,11 +5,13 @@
{% block root_header_child %}
{% from '_types/root/_n/macros.html' import index_row with context %}
{% call index_row('post-header-child', '_types/post/header/_header.html') %}
{% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %}
{% call index_row('payments-header-child', '_types/payments/header/_header.html') %}
{% block payments_header_child %}
{% endblock %}
{% endcall %}
{% endcall %}
{% endcall %}
{% endblock %}
{% block _main_mobile_menu %}

View File

@@ -0,0 +1,36 @@
{% import 'macros/links.html' as links %}
<div class="relative nav-group">
<a href="{{ events_url('/' + post.slug + '/calendars/') }}" class="{{styles.nav_button}}">
calendars
</a>
</div>
<div class="relative nav-group">
<a href="{{ events_url('/' + post.slug + '/markets/') }}" class="{{styles.nav_button}}">
markets
</a>
</div>
<div class="relative nav-group">
<a href="{{ events_url('/' + post.slug + '/payments/') }}" class="{{styles.nav_button}}">
payments
</a>
</div>
<div class="relative nav-group">
<a href="{{ coop_url('/' + post.slug + '/admin/entries/') }}" class="{{styles.nav_button}}">
entries
</a>
</div>
<div class="relative nav-group">
<a href="{{ coop_url('/' + post.slug + '/admin/data/') }}" class="{{styles.nav_button}}">
data
</a>
</div>
<div class="relative nav-group">
<a href="{{ coop_url('/' + post.slug + '/admin/edit/') }}" class="{{styles.nav_button}}">
edit
</a>
</div>
<div class="relative nav-group">
<a href="{{ coop_url('/' + post.slug + '/admin/settings/') }}" class="{{styles.nav_button}}">
settings
</a>
</div>

View File

@@ -0,0 +1,12 @@
{% import 'macros/links.html' as links %}
{% macro header_row(oob=False) %}
{% call links.menu_row(id='post-admin-row', oob=oob) %}
<a href="{{ coop_url('/' + post.slug + '/admin/') }}"
class="flex items-center gap-2 px-3 py-2 rounded">
{{ links.admin() }}
</a>
{% call links.desktop_nav() %}
{% include '_types/post/admin/_nav.html' %}
{% endcall %}
{% endcall %}
{% endmacro %}