fix: preserve post admin nav bar across events app pages
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s
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:
@@ -5,9 +5,11 @@
|
|||||||
{% block root_header_child %}
|
{% block root_header_child %}
|
||||||
{% from '_types/root/_n/macros.html' import index_row with context %}
|
{% 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-header-child', '_types/post/header/_header.html') %}
|
||||||
{% call index_row('calendar-header-child', '_types/calendar/header/_header.html') %}
|
{% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %}
|
||||||
{% block calendar_header_child %}
|
{% call index_row('calendar-header-child', '_types/calendar/header/_header.html') %}
|
||||||
{% endblock %}
|
{% block calendar_header_child %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -5,9 +5,11 @@
|
|||||||
{% block root_header_child %}
|
{% block root_header_child %}
|
||||||
{% from '_types/root/_n/macros.html' import index_row with context %}
|
{% 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-header-child', '_types/post/header/_header.html') %}
|
||||||
{% call index_row('calendars-header-child', '_types/calendars/header/_header.html') %}
|
{% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %}
|
||||||
{% block calendars_header_child %}
|
{% call index_row('calendars-header-child', '_types/calendars/header/_header.html') %}
|
||||||
{% endblock %}
|
{% block calendars_header_child %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -5,9 +5,11 @@
|
|||||||
{% block root_header_child %}
|
{% block root_header_child %}
|
||||||
{% from '_types/root/_n/macros.html' import index_row with context %}
|
{% 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-header-child', '_types/post/header/_header.html') %}
|
||||||
{% call index_row('markets-header-child', '_types/markets/header/_header.html') %}
|
{% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %}
|
||||||
{% block markets_header_child %}
|
{% call index_row('markets-header-child', '_types/markets/header/_header.html') %}
|
||||||
{% endblock %}
|
{% block markets_header_child %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -5,9 +5,11 @@
|
|||||||
{% block root_header_child %}
|
{% block root_header_child %}
|
||||||
{% from '_types/root/_n/macros.html' import index_row with context %}
|
{% 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-header-child', '_types/post/header/_header.html') %}
|
||||||
{% call index_row('payments-header-child', '_types/payments/header/_header.html') %}
|
{% call index_row('post-admin-header-child', '_types/post/admin/header/_header.html') %}
|
||||||
{% block payments_header_child %}
|
{% call index_row('payments-header-child', '_types/payments/header/_header.html') %}
|
||||||
{% endblock %}
|
{% block payments_header_child %}
|
||||||
|
{% endblock %}
|
||||||
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
36
templates/_types/post/admin/_nav.html
Normal file
36
templates/_types/post/admin/_nav.html
Normal 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>
|
||||||
12
templates/_types/post/admin/header/_header.html
Normal file
12
templates/_types/post/admin/header/_header.html
Normal 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 %}
|
||||||
Reference in New Issue
Block a user