diff --git a/templates/_types/calendar/index.html b/templates/_types/calendar/index.html index f3af5fa..4652897 100644 --- a/templates/_types/calendar/index.html +++ b/templates/_types/calendar/index.html @@ -4,12 +4,14 @@ {% block root_header_child %} {% from '_types/root/_n/macros.html' import index_row with context %} - {% call index_row('calendar-header-child', '_types/calendar/header/_header.html') %} - {% block calendar_header_child %} + {% 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 %} - + {% block _main_mobile_menu %} {% include '_types/calendar/_nav.html' %} diff --git a/templates/_types/calendars/index.html b/templates/_types/calendars/index.html index 0b7e29b..e685a6e 100644 --- a/templates/_types/calendars/index.html +++ b/templates/_types/calendars/index.html @@ -4,9 +4,11 @@ {% block root_header_child %} {% from '_types/root/_n/macros.html' import index_row with context %} - {% call index_row('calendars-header-child', '_types/calendars/header/_header.html') %} - {% block calendars_header_child %} - {% endblock %} + {% 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 %} diff --git a/templates/_types/post/_nav.html b/templates/_types/post/_nav.html new file mode 100644 index 0000000..fe1f60e --- /dev/null +++ b/templates/_types/post/_nav.html @@ -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) %} + +
{{ calendar.name }}
+ {% endcall %} + {% endfor %} +{% endif %} diff --git a/templates/_types/post/header/_header.html b/templates/_types/post/header/_header.html new file mode 100644 index 0000000..f0ad06c --- /dev/null +++ b/templates/_types/post/header/_header.html @@ -0,0 +1,19 @@ +{% import 'macros/links.html' as links %} +{% macro header_row(oob=False) %} + {% call links.menu_row(id='post-row', oob=oob) %} + + {% if post.feature_image %} + + {% endif %} + + {{ post.title | truncate(160, True, '…') }} + + + {% call links.desktop_nav() %} + {% include '_types/post/_nav.html' %} + {% endcall %} + {% endcall %} +{% endmacro %}