diff options
author | Matthew Lemon <y@yulqen.org> | 2024-07-29 14:37:38 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-07-29 14:37:38 +0100 |
commit | 58c17f31ce0709e62a9565e362db86eb69dc72d1 (patch) | |
tree | 78e3cc82a2d6ed6a8c2b4a1fddd4425886ea7142 | |
parent | bea8fa333266552b44f09b35994a41657b666d11 (diff) |
Now handles EFL badges for non-featured cards
-rw-r--r-- | pyblackbird_cc/templates/resources/resource_list.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pyblackbird_cc/templates/resources/resource_list.html b/pyblackbird_cc/templates/resources/resource_list.html index ac27d69..73c9113 100644 --- a/pyblackbird_cc/templates/resources/resource_list.html +++ b/pyblackbird_cc/templates/resources/resource_list.html @@ -113,8 +113,13 @@ href="{% url 'resources:resource_detail' resource_id=resource.id %}">{{ resource.name }}</a></h5> <div class="d-flex flex-row justify-content-start align-content-center"> <div> - <span class="badge me-2" - style="background-color: {{ resource.main_resource_category_colour_css_class }}; color: {{ resource.main_resource_badge_foreground_colour }}">{{ resource.main_resource_category_name }}</span> + {% if resource.main_resource_category_name == "English as a Foreign Language (EFL)" %} + <span class="badge me-2" + style="background-color: {{ resource.main_resource_category_colour_css_class }}; color: {{ resource.main_resource_badge_foreground_colour }}">EFL</span> + {% else %} + <span class="badge me-2" + style="background-color: {{ resource.main_resource_category_colour_css_class }}; color: {{ resource.main_resource_badge_foreground_colour }}">{{ resource.main_resource_category_name }}</span> + {% endif %} </div> <div> <span class="badge bg-secondary me-2">{{ resource.age_range }}</span> |