Let the club logo fill more of its ring, match it in the control panel
Drops the inner padding on the logo image so it fills the circle right up to the ring, rather than floating small in the middle of it -- most visible on logos with generous internal whitespace (e.g. some SVGs). The control panel's club-detail page now frames the logo the same way. It doesn't get the page-wide --color-primary override the club's own site uses (the panel must never dress itself up as the club), so the ring colour is set as a locally-scoped custom property on just this element instead.
This commit is contained in:
@@ -961,6 +961,19 @@ class ClubDetailMetricsTests(ControlPanelTestBase):
|
||||
|
||||
self.assertContains(response, "cannot take a signup")
|
||||
|
||||
def test_a_club_logo_gets_a_primary_coloured_ring(self):
|
||||
# The control panel never injects a page-wide --color-primary override (that would
|
||||
# dress the whole panel up as the club), so the ring colour is scoped locally to
|
||||
# this element instead — assert the club's own colour reaches it regardless.
|
||||
self.club.logo = "clubs/ajax-united/crest.png"
|
||||
self.club.primary_color = "#1e40af"
|
||||
self.club.save()
|
||||
|
||||
response = self.client.get(reverse("controlpanel:club_detail", args=[self.club.pk]))
|
||||
|
||||
self.assertContains(response, "ring-primary")
|
||||
self.assertContains(response, "--color-primary: #1e40af")
|
||||
|
||||
|
||||
class NewMemberTests(TestCase):
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user