From ee2952e8851dd477b68ba6a2b0b937c48101cd6b Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 24 Feb 2026 16:55:50 +0000 Subject: [PATCH] Own account domain templates (Phase 6) Auth templates moved from shared to account/templates/. Co-Authored-By: Claude Opus 4.6 --- shared | 2 +- templates/_types/auth/_bookings_panel.html | 44 +++++++++++++++++ templates/_types/auth/_fragment_panel.html | 1 + templates/_types/auth/_main_panel.html | 49 +++++++++++++++++++ templates/_types/auth/_nav.html | 7 +++ templates/_types/auth/_newsletter_toggle.html | 17 +++++++ templates/_types/auth/_newsletters_panel.html | 46 +++++++++++++++++ templates/_types/auth/_oob_elements.html | 29 +++++++++++ templates/_types/auth/_tickets_panel.html | 44 +++++++++++++++++ templates/_types/auth/check_email.html | 33 +++++++++++++ templates/_types/auth/header/_header.html | 12 +++++ templates/_types/auth/index copy.html | 18 +++++++ templates/_types/auth/index.html | 18 +++++++ templates/_types/auth/login.html | 46 +++++++++++++++++ 14 files changed, 365 insertions(+), 1 deletion(-) create mode 100644 templates/_types/auth/_bookings_panel.html create mode 100644 templates/_types/auth/_fragment_panel.html create mode 100644 templates/_types/auth/_main_panel.html create mode 100644 templates/_types/auth/_nav.html create mode 100644 templates/_types/auth/_newsletter_toggle.html create mode 100644 templates/_types/auth/_newsletters_panel.html create mode 100644 templates/_types/auth/_oob_elements.html create mode 100644 templates/_types/auth/_tickets_panel.html create mode 100644 templates/_types/auth/check_email.html create mode 100644 templates/_types/auth/header/_header.html create mode 100644 templates/_types/auth/index copy.html create mode 100644 templates/_types/auth/index.html create mode 100644 templates/_types/auth/login.html diff --git a/shared b/shared index 65c4989..322ae48 160000 --- a/shared +++ b/shared @@ -1 +1 @@ -Subproject commit 65c4989d08b85a821a0932e4376f2ab088f50d0c +Subproject commit 322ae481eeb47418245e669c3585f6d2195656da diff --git a/templates/_types/auth/_bookings_panel.html b/templates/_types/auth/_bookings_panel.html new file mode 100644 index 0000000..28f8280 --- /dev/null +++ b/templates/_types/auth/_bookings_panel.html @@ -0,0 +1,44 @@ +
+
+ +

Bookings

+ + {% if bookings %} +
+ {% for booking in bookings %} +
+
+
+

{{ booking.name }}

+
+ {{ booking.start_at.strftime('%d %b %Y, %H:%M') }} + {% if booking.end_at %} + – {{ booking.end_at.strftime('%H:%M') }} + {% endif %} + {% if booking.calendar_name %} + · {{ booking.calendar_name }} + {% endif %} + {% if booking.cost %} + · £{{ booking.cost }} + {% endif %} +
+
+
+ {% if booking.state == 'confirmed' %} + confirmed + {% elif booking.state == 'provisional' %} + provisional + {% else %} + {{ booking.state }} + {% endif %} +
+
+
+ {% endfor %} +
+ {% else %} +

No bookings yet.

+ {% endif %} + +
+
diff --git a/templates/_types/auth/_fragment_panel.html b/templates/_types/auth/_fragment_panel.html new file mode 100644 index 0000000..f27345c --- /dev/null +++ b/templates/_types/auth/_fragment_panel.html @@ -0,0 +1 @@ +{{ page_fragment_html | safe }} diff --git a/templates/_types/auth/_main_panel.html b/templates/_types/auth/_main_panel.html new file mode 100644 index 0000000..e80fd12 --- /dev/null +++ b/templates/_types/auth/_main_panel.html @@ -0,0 +1,49 @@ +
+
+ + {% if error %} +
+ {{ error }} +
+ {% endif %} + + {# Account header #} +
+
+

Account

+ {% if g.user %} +

{{ g.user.email }}

+ {% if g.user.name %} +

{{ g.user.name }}

+ {% endif %} + {% endif %} +
+
+ + +
+
+ + {# Labels #} + {% set labels = g.user.labels if g.user is defined and g.user.labels is defined else [] %} + {% if labels %} +
+

Labels

+
+ {% for label in labels %} + + {{ label.name }} + + {% endfor %} +
+
+ {% endif %} + +
+
diff --git a/templates/_types/auth/_nav.html b/templates/_types/auth/_nav.html new file mode 100644 index 0000000..ff5de92 --- /dev/null +++ b/templates/_types/auth/_nav.html @@ -0,0 +1,7 @@ +{% import 'macros/links.html' as links %} +{% call links.link(account_url('/newsletters/'), hx_select_search, select_colours, True, aclass=styles.nav_button) %} + newsletters +{% endcall %} +{% if account_nav_html %} + {{ account_nav_html | safe }} +{% endif %} diff --git a/templates/_types/auth/_newsletter_toggle.html b/templates/_types/auth/_newsletter_toggle.html new file mode 100644 index 0000000..8bb3f69 --- /dev/null +++ b/templates/_types/auth/_newsletter_toggle.html @@ -0,0 +1,17 @@ +
+ +
diff --git a/templates/_types/auth/_newsletters_panel.html b/templates/_types/auth/_newsletters_panel.html new file mode 100644 index 0000000..0f3fdbb --- /dev/null +++ b/templates/_types/auth/_newsletters_panel.html @@ -0,0 +1,46 @@ +
+
+ +

Newsletters

+ + {% if newsletter_list %} +
+ {% for item in newsletter_list %} +
+
+

{{ item.newsletter.name }}

+ {% if item.newsletter.description %} +

{{ item.newsletter.description }}

+ {% endif %} +
+
+ {% if item.un %} + {% with un=item.un %} + {% include "_types/auth/_newsletter_toggle.html" %} + {% endwith %} + {% else %} + {# No subscription row yet — show an off toggle that will create one #} +
+ +
+ {% endif %} +
+
+ {% endfor %} +
+ {% else %} +

No newsletters available.

+ {% endif %} + +
+
diff --git a/templates/_types/auth/_oob_elements.html b/templates/_types/auth/_oob_elements.html new file mode 100644 index 0000000..cafb113 --- /dev/null +++ b/templates/_types/auth/_oob_elements.html @@ -0,0 +1,29 @@ +{% extends 'oob_elements.html' %} + +{# OOB elements for HTMX navigation - all elements that need updating #} + +{# Import shared OOB macros #} +{% from '_types/root/_oob_menu.html' import mobile_menu with context %} + +{# Header with app title - includes cart-mini, navigation, and market-specific header #} + +{% block oobs %} + + {% from '_types/root/_n/macros.html' import oob_header with context %} + {{oob_header('root-header-child', 'auth-header-child', '_types/auth/header/_header.html')}} + + {% from '_types/root/header/_header.html' import header_row with context %} + {{ header_row(oob=True) }} +{% endblock %} + + +{% block mobile_menu %} + {% include '_types/auth/_nav.html' %} +{% endblock %} + + +{% block content %} + {% include oob.main %} +{% endblock %} + + diff --git a/templates/_types/auth/_tickets_panel.html b/templates/_types/auth/_tickets_panel.html new file mode 100644 index 0000000..69f7596 --- /dev/null +++ b/templates/_types/auth/_tickets_panel.html @@ -0,0 +1,44 @@ +
+
+ +

Tickets

+ + {% if tickets %} +
+ {% for ticket in tickets %} +
+
+
+ + {{ ticket.entry_name }} + +
+ {{ ticket.entry_start_at.strftime('%d %b %Y, %H:%M') }} + {% if ticket.calendar_name %} + · {{ ticket.calendar_name }} + {% endif %} + {% if ticket.ticket_type_name %} + · {{ ticket.ticket_type_name }} + {% endif %} +
+
+
+ {% if ticket.state == 'checked_in' %} + checked in + {% elif ticket.state == 'confirmed' %} + confirmed + {% else %} + {{ ticket.state }} + {% endif %} +
+
+
+ {% endfor %} +
+ {% else %} +

No tickets yet.

+ {% endif %} + +
+
diff --git a/templates/_types/auth/check_email.html b/templates/_types/auth/check_email.html new file mode 100644 index 0000000..e4cea28 --- /dev/null +++ b/templates/_types/auth/check_email.html @@ -0,0 +1,33 @@ +{% extends "_types/root/index.html" %} +{% block content %} +
+
+

Check your email

+ +

+ If an account exists for + {{ email }}, + you’ll receive a link to sign in. It expires in 15 minutes. +

+ + {% if email_error %} + + {% endif %} + +

+ + ← Back + +

+
+
+{% endblock %} diff --git a/templates/_types/auth/header/_header.html b/templates/_types/auth/header/_header.html new file mode 100644 index 0000000..c59a712 --- /dev/null +++ b/templates/_types/auth/header/_header.html @@ -0,0 +1,12 @@ +{% import 'macros/links.html' as links %} +{% macro header_row(oob=False) %} + {% call links.menu_row(id='auth-row', oob=oob) %} + {% call links.link(account_url('/'), hx_select_search ) %} + +
account
+ {% endcall %} + {% call links.desktop_nav() %} + {% include "_types/auth/_nav.html" %} + {% endcall %} + {% endcall %} +{% endmacro %} \ No newline at end of file diff --git a/templates/_types/auth/index copy.html b/templates/_types/auth/index copy.html new file mode 100644 index 0000000..cd4d6d3 --- /dev/null +++ b/templates/_types/auth/index copy.html @@ -0,0 +1,18 @@ +{% extends "_types/root/_index.html" %} + + +{% block root_header_child %} + {% from '_types/root/_n/macros.html' import index_row with context %} + {% call index_row('auth-header-child', '_types/auth/header/_header.html') %} + {% block auth_header_child %} + {% endblock %} + {% endcall %} +{% endblock %} + +{% block _main_mobile_menu %} + {% include "_types/auth/_nav.html" %} +{% endblock %} + +{% block content %} + {% include '_types/auth/_main_panel.html' %} +{% endblock %} diff --git a/templates/_types/auth/index.html b/templates/_types/auth/index.html new file mode 100644 index 0000000..3c66bf1 --- /dev/null +++ b/templates/_types/auth/index.html @@ -0,0 +1,18 @@ +{% extends oob.extends %} + + +{% block root_header_child %} + {% from '_types/root/_n/macros.html' import index_row with context %} + {% call index_row(oob.child_id, oob.header) %} + {% block auth_header_child %} + {% endblock %} + {% endcall %} +{% endblock %} + +{% block _main_mobile_menu %} + {% include oob.nav %} +{% endblock %} + +{% block content %} + {% include oob.main %} +{% endblock %} diff --git a/templates/_types/auth/login.html b/templates/_types/auth/login.html new file mode 100644 index 0000000..b55ea99 --- /dev/null +++ b/templates/_types/auth/login.html @@ -0,0 +1,46 @@ +{% extends "_types/root/index.html" %} +{% block content %} +
+
+

Sign in

+

+ Enter your email and we’ll email you a one-time sign-in link. +

+ + {% if error %} +
+ {{ error }} +
+ {% endif %} + +
+ +
+ + +
+ + +
+
+
+{% endblock %}