fix: replace blog.post.calendars url_for with events_url
Calendar routes no longer exist in blog service. Post nav, entry items, blog cards, and header templates now link to events service via events_url() helper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -76,14 +76,9 @@
|
|||||||
<div class="overflow-x-auto scrollbar-hide" style="scroll-behavior: smooth;">
|
<div class="overflow-x-auto scrollbar-hide" style="scroll-behavior: smooth;">
|
||||||
<div class="flex gap-2 px-2">
|
<div class="flex gap-2 px-2">
|
||||||
{% for entry in post.associated_entries %}
|
{% for entry in post.associated_entries %}
|
||||||
|
{% set _entry_path = '/calendars/' + entry.calendar.slug + '/' + entry.start_at.year|string + '/' + entry.start_at.month|string + '/' + entry.start_at.day|string + '/entries/' + entry.id|string + '/' %}
|
||||||
<a
|
<a
|
||||||
href="{{ url_for('blog.post.calendars.calendar.day.calendar_entries.calendar_entry.get',
|
href="{{ events_url(_entry_path) }}"
|
||||||
slug=post.slug,
|
|
||||||
calendar_slug=entry.calendar.slug,
|
|
||||||
year=entry.start_at.year,
|
|
||||||
month=entry.start_at.month,
|
|
||||||
day=entry.start_at.day,
|
|
||||||
entry_id=entry.id) }}"
|
|
||||||
class="flex flex-col gap-1 px-3 py-2 bg-stone-50 hover:bg-stone-100 rounded border border-stone-200 transition text-sm whitespace-nowrap flex-shrink-0 min-w-[180px]">
|
class="flex flex-col gap-1 px-3 py-2 bg-stone-50 hover:bg-stone-100 rounded border border-stone-200 transition text-sm whitespace-nowrap flex-shrink-0 min-w-[180px]">
|
||||||
<div class="font-medium text-stone-900 truncate">{{ entry.name }}</div>
|
<div class="font-medium text-stone-900 truncate">{{ entry.name }}</div>
|
||||||
<div class="text-xs text-stone-600">
|
<div class="text-xs text-stone-600">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% import 'macros/links.html' as links %}
|
{% import 'macros/links.html' as links %}
|
||||||
{% macro header_row(oob=False) %}
|
{% macro header_row(oob=False) %}
|
||||||
{% call links.menu_row(id='calendars-row', oob=oob) %}
|
{% call links.menu_row(id='calendars-row', oob=oob) %}
|
||||||
{% call links.link(url_for('blog.post.calendars.home', slug=post.slug), hx_select_search) %}
|
{% call links.link(events_url('/calendars/'), hx_select_search) %}
|
||||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
<i class="fa fa-calendar" aria-hidden="true"></i>
|
||||||
<div>
|
<div>
|
||||||
Calendars
|
Calendars
|
||||||
|
|||||||
@@ -4,14 +4,9 @@
|
|||||||
{% set has_more_entries = has_more if has_more is defined else (associated_entries.has_more if associated_entries is defined else False) %}
|
{% set has_more_entries = has_more if has_more is defined else (associated_entries.has_more if associated_entries is defined else False) %}
|
||||||
|
|
||||||
{% for entry in entry_list %}
|
{% for entry in entry_list %}
|
||||||
|
{% set _entry_path = '/calendars/' + entry.calendar.slug + '/' + entry.start_at.year|string + '/' + entry.start_at.month|string + '/' + entry.start_at.day|string + '/entries/' + entry.id|string + '/' %}
|
||||||
<a
|
<a
|
||||||
href="{{ url_for('blog.post.calendars.calendar.day.calendar_entries.calendar_entry.get',
|
href="{{ events_url(_entry_path) }}"
|
||||||
slug=entry.calendar.post.slug,
|
|
||||||
calendar_slug=entry.calendar.slug,
|
|
||||||
year=entry.start_at.year,
|
|
||||||
month=entry.start_at.month,
|
|
||||||
day=entry.start_at.day,
|
|
||||||
entry_id=entry.id) }}"
|
|
||||||
class="{{styles.nav_button_less_pad}}"
|
class="{{styles.nav_button_less_pad}}"
|
||||||
>
|
>
|
||||||
{% if entry.calendar.post.feature_image %}
|
{% if entry.calendar.post.feature_image %}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{% import 'macros/links.html' as links %}
|
{% import 'macros/links.html' as links %}
|
||||||
{% call links.link(url_for('blog.post.calendars.home', slug=post.slug), hx_select_search, select_colours, True, aclass=styles.nav_button) %}
|
{% call links.link(events_url('/calendars/'), hx_select_search, select_colours, True, aclass=styles.nav_button) %}
|
||||||
calendars
|
calendars
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
{% call links.link(url_for('blog.post.admin.entries', slug=post.slug), hx_select_search, select_colours, True, aclass=styles.nav_button) %}
|
{% call links.link(url_for('blog.post.admin.entries', slug=post.slug), hx_select_search, select_colours, True, aclass=styles.nav_button) %}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% import 'macros/links.html' as links %}
|
{% import 'macros/links.html' as links %}
|
||||||
{% macro header_row(oob=False) %}
|
{% macro header_row(oob=False) %}
|
||||||
{% call links.menu_row(id='post_data-row', oob=oob) %}
|
{% call links.menu_row(id='post_data-row', oob=oob) %}
|
||||||
{% call links.link(url_for('blog.post.calendars.home', slug=post.slug), hx_select_search) %}
|
{% call links.link(events_url('/calendars/'), hx_select_search) %}
|
||||||
<i class="fa fa-database" aria-hidden="true"></i>
|
<i class="fa fa-database" aria-hidden="true"></i>
|
||||||
<div>
|
<div>
|
||||||
data
|
data
|
||||||
|
|||||||
Reference in New Issue
Block a user