feat: add post header (village hall menu bar) to calendar pages
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 37s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 10:47:16 +00:00
parent 43dd4d6db4
commit fb0fc5999e
4 changed files with 38 additions and 6 deletions

View File

@@ -4,10 +4,12 @@
{% 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('calendar-header-child', '_types/calendar/header/_header.html') %}
{% block calendar_header_child %}
{% endblock %}
{% endcall %}
{% endcall %}
{% endblock %}

View File

@@ -4,10 +4,12 @@
{% 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('calendars-header-child', '_types/calendars/header/_header.html') %}
{% block calendars_header_child %}
{% endblock %}
{% endcall %}
{% endcall %}
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% import 'macros/links.html' as links %}
{% if calendars %}
{% for calendar in calendars %}
{% call links.link(url_for('calendars.calendar.get', calendar_slug=calendar.slug), hx_select_search, select_colours, True, aclass=styles.nav_button_less_pad) %}
<i class="fa fa-calendar" aria-hidden="true"></i>
<div>{{ calendar.name }}</div>
{% endcall %}
{% endfor %}
{% endif %}

View File

@@ -0,0 +1,19 @@
{% import 'macros/links.html' as links %}
{% macro header_row(oob=False) %}
{% call links.menu_row(id='post-row', oob=oob) %}
<a href="{{ coop_url('/' + post.slug + '/') }}" class="flex items-center gap-2 px-3 py-2 rounded whitespace-normal text-center break-words leading-snug">
{% if post.feature_image %}
<img
src="{{ post.feature_image }}"
class="h-8 w-8 rounded-full object-cover border border-stone-300 flex-shrink-0"
>
{% endif %}
<span>
{{ post.title | truncate(160, True, '…') }}
</span>
</a>
{% call links.desktop_nav() %}
{% include '_types/post/_nav.html' %}
{% endcall %}
{% endcall %}
{% endmacro %}