Add a club event-background photo, shown in black & white on event heroes

New Club.event_background, uploaded from the identity page. Individual
events have no photo of their own (an established, deliberate scope
decision for this build), so this is the one club-wide stand-in for the
photo the design canvas's own hero mockups call for -- shown under the
same dark gradient the hero already used, filtered to grayscale so it
never fights the club's own brand colours. Falls back to the existing
plain dark background when nothing's uploaded.

Applied to both event hero treatments: M2's own event-detail screen (the
"big black thing" this was reported against) and Home's "next up" card.
The image and gradient are separate absolutely-positioned layers behind
a z-10 content wrapper, not a filter on the card itself, so the
grayscale treatment never touches the text/buttons drawn on top of it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
2026-08-21 18:11:02 +02:00
parent c7887637ff
commit 9e581370e4
10 changed files with 177 additions and 43 deletions

View File

@@ -4885,6 +4885,29 @@ class ClubSettingsPreviewTests(ManagementTestBase):
self.assertEqual(self.club.legal_zip_code, "9000")
self.assertEqual(self.club.legal_city, "Ghent")
def test_the_event_background_can_be_uploaded(self):
response = self.club_post(
"club_settings",
{
"name": "Ajax United",
"legal_name": "",
"contact_email": "",
"website": "",
"primary_color": "",
"secondary_color": "",
"event_background": make_image_file("event-bg.png"),
},
)
self.assertRedirects(response, reverse("management:club_settings"))
self.club.refresh_from_db()
self.assertTrue(self.club.event_background)
def test_the_event_background_field_is_editable(self):
response = self.club_get("club_settings")
self.assertContains(response, 'name="event_background"')
class ClubSettingsDocumentTabTests(ManagementTestBase):
"""The Email and PDF tabs on the Club identity page -- every branded