Round the app header crest and show initials without a logo
The header crest was management.css's hexagon clip-path mark, and its no-logo fallback rendered an empty coloured hexagon with no initials at all. Both now render as a plain circle, and the fallback shows the club's initials on its own colour -- same source (Club.logo/Club.initials) the PWA install icon already uses, just inline in the header instead of a generated PNG. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
{% if club.logo %}
|
||||
<img class="app-crest" src="{{ club.logo.url }}" alt="">
|
||||
{% else %}
|
||||
<span class="app-crest"></span>
|
||||
<span class="app-crest app-crest-fallback">{{ club.initials }}</span>
|
||||
{% endif %}
|
||||
<span class="min-w-0">
|
||||
<span class="block truncate font-display text-[19px] leading-none font-extrabold text-white uppercase">{{ club.name }}</span>
|
||||
|
||||
@@ -51,6 +51,14 @@ class MobileShellTests(TestCase):
|
||||
self.assertContains(response, self.club.name)
|
||||
self.assertContains(response, 'rel="manifest"')
|
||||
|
||||
def test_header_crest_falls_back_to_round_initials_without_a_logo(self):
|
||||
self.client.force_login(self.user)
|
||||
|
||||
response = self._get("home")
|
||||
|
||||
self.assertContains(response, 'class="app-crest app-crest-fallback"')
|
||||
self.assertContains(response, self.club.initials)
|
||||
|
||||
def test_manifest_names_the_club_and_points_at_its_icon(self):
|
||||
response = self._get("manifest")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user