{% extends "management/base.html" %} {% load i18n lucide ui %} {% comment %} A club's own self-service identity/branding editor -- see management/forms.py's ClubSettingsForm for exactly which fields are editable here versus platform-staff-only (slug, seasons). D9 "Club identity & branding" in the design handoff is the reference, followed closely for the Colours card (merged swatch+hex row, side-by-side contrast-check boxes) and the Logo card (dashed drop zone) -- markup pulled straight from the design canvas (RosterChief Platform.dc.html), not the prose summary. Three top-level tabs, not just a preview card: Identity (the settings form, plus a small live-updating App & Website mock -- colours from the unsaved form inputs, via the script below) is D9 as designed. Email and PDF are real, not mocks -- every branded email (management/email_previews.py) and generated PDF (management/pdf_previews.py) this club can actually send, rendered with sample data. Those two read the club's *saved* colours (server-rendered in an iframe, see EmailPreviewRenderView/PDFPreviewRenderView), so -- unlike the Identity tab's own mock -- they only reflect a colour change after it's saved, not as you type. The colour math (content colour, contrast ratio) mirrors Club._content_color_for exactly, so what's shown on the Identity tab is the real number the server computes on save, not an approximation. {% endcomment %} {% block panel_title %}{% trans "Club identity" %}{% endblock panel_title %} {% block heading %}{% trans "Club identity" %}{% endblock heading %} {% block actions %} {% endblock actions %} {% block filter_strip %}
{# Calendar/List segmented toggle -- event_list.html's own pattern (in turn member_list.html's Members/Guardians/Both). #}
{% endblock filter_strip %} {% block panel %}
{% csrf_token %} {% for error in form.non_field_errors %}
{% lucide "circle-x" size=18 %} {{ error }}
{% endfor %}
{% lucide "building-2" size=16 %} {% trans "Club" %}
{% form_field form.name %} {% form_field form.legal_name %} {% form_field form.contact_email %} {% form_field form.website %}
{% lucide "map-pin" size=16 %} {% trans "Legal address" %}
{% form_field form.legal_address %}
{% form_field form.legal_zip_code %} {% form_field form.legal_city %}

{% trans "Used on official documents (invoices, the referee payment form). Leave blank to use the club's home location instead." %}

{% lucide "image" size=16 %} {% trans "Logo" %}
{% trans "Crest" %}
{% if club.logo %} {% else %} {{ club.initials }} {% endif %}
{% form_field form.logo %}
{% lucide "image" size=16 %} {% trans "Event background" %}

{% trans "A generic background photo for event screens in the mobile app -- individual events don't have a photo of their own, so this is the one club-wide stand-in. Shown in black & white under a dark gradient so text always stays readable. Without one, a plain dark background is used instead." %}

{% trans "Preview" %}
{% if club.event_background %} {% endif %}
{% form_field form.event_background %}
{% lucide "palette" size=16 %} {% trans "Colours" %}
{% trans "Accents only" %}
{% comment %} Physically outside
(moved next to the preview it drives) -- form="club-settings-form" on each text input is what still submits them with the rest of the identity form. {% endcomment %}
{{ form.primary_color.label|capfirst }}
{% if form.primary_color.errors %}

{{ form.primary_color.errors|join:" " }}

{% endif %}
{{ form.secondary_color.label|capfirst }}
{% if form.secondary_color.errors %}

{{ form.secondary_color.errors|join:" " }}

{% endif %}
{% trans "Contrast check" %}
{% lucide "eye" size=16 %} {% trans "Live preview" %}
{{ club.initials|default:"CL" }} {{ club.name|default:_("Your club") }}
{% trans "Member" %} {% trans "Coach" %}
{# A notice, not a call to action -- primary (chrome), not secondary (accent), so it doesn't visually compete with an actual button. #}
{% trans "Next up" %}
{% trans "U16 vs Leuven" %}
{{ club.initials|default:"CL" }} {{ club.name|default:_("Your club") }} {% trans "Teams · Club" %} {% trans "Join" %}
{% trans "#Fear the Sharks" %}
{% trans "Where the brand shows up" %}
  • {% trans "Sidebar, active nav item, primary buttons" %}
  • {% trans "Public site header and join button" %}
  • {% trans "Mobile app header and highlights" %}
  • {% trans "Emails and PDFs -- see the Email/PDF tabs above" %}
  • {% trans "Never: status colours, tables, form fields" %}
{% endblock panel %} {% block extra_body %} {% endblock extra_body %}