refactor: make calendar header and nav cross-service (events_url)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,12 @@
|
|||||||
<!-- Desktop nav -->
|
<!-- Desktop nav -->
|
||||||
{% import 'macros/links.html' as links %}
|
{% import 'macros/links.html' as links %}
|
||||||
{% call links.link(
|
<a href="{{ events_url('/' + post.slug + '/calendars/' + calendar.slug + '/slots/') }}" class="{{styles.nav_button}}">
|
||||||
url_for('blog.post.calendars.calendar.slots.get', slug=post.slug, calendar_slug=calendar.slug),
|
|
||||||
hx_select_search,
|
|
||||||
select_colours,
|
|
||||||
aclass=styles.nav_button
|
|
||||||
) %}
|
|
||||||
<i class="fa fa-clock" aria-hidden="true"></i>
|
<i class="fa fa-clock" aria-hidden="true"></i>
|
||||||
<div>
|
<div>Slots</div>
|
||||||
Slots
|
</a>
|
||||||
</div>
|
|
||||||
{% endcall %}
|
|
||||||
{% if g.rights.admin %}
|
{% if g.rights.admin %}
|
||||||
{% from 'macros/admin_nav.html' import admin_nav_item %}
|
{% from 'macros/admin_nav.html' import admin_nav_item %}
|
||||||
{{admin_nav_item(url_for('blog.post.calendars.calendar.admin.admin', slug=post.slug, calendar_slug=calendar.slug))}}
|
<a href="{{ events_url('/' + post.slug + '/calendars/' + calendar.slug + '/admin/') }}" class="{{styles.nav_button}}">
|
||||||
|
<i class="fa fa-cog" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -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='calendar-row', oob=oob) %}
|
{% call links.menu_row(id='calendar-row', oob=oob) %}
|
||||||
{% call links.link(url_for('blog.post.calendars.calendar.get', slug=post.slug, calendar_slug= calendar.slug), hx_select_search) %}
|
<a href="{{ events_url('/' + post.slug + '/calendars/' + calendar.slug + '/') }}" class="flex items-center gap-2 px-3 py-2 rounded whitespace-normal text-center break-words leading-snug">
|
||||||
<div class="flex flex-col md:flex-row md:gap-2 items-center min-w-0">
|
<div class="flex flex-col md:flex-row md:gap-2 items-center min-w-0">
|
||||||
<div class="flex flex-row items-center gap-2">
|
<div class="flex flex-row items-center gap-2">
|
||||||
<i class="fa fa-calendar"></i>
|
<i class="fa fa-calendar"></i>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
{% from '_types/calendar/_description.html' import description %}
|
{% from '_types/calendar/_description.html' import description %}
|
||||||
{{description(calendar)}}
|
{{description(calendar)}}
|
||||||
</div>
|
</div>
|
||||||
{% endcall %}
|
</a>
|
||||||
{% call links.desktop_nav() %}
|
{% call links.desktop_nav() %}
|
||||||
{% include '_types/calendar/_nav.html' %}
|
{% include '_types/calendar/_nav.html' %}
|
||||||
{% endcall %}
|
{% endcall %}
|
||||||
|
|||||||
Reference in New Issue
Block a user