From a75aca148ba7db29e14e30f2e0707b1efac1ff94 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 2 Aug 2024 16:17:53 +0100 Subject: Refactored list template into includes to fix div hell. --- .../templates/resources/resource_card.html | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pyblackbird_cc/templates/resources/resource_card.html (limited to 'pyblackbird_cc/templates/resources/resource_card.html') diff --git a/pyblackbird_cc/templates/resources/resource_card.html b/pyblackbird_cc/templates/resources/resource_card.html new file mode 100644 index 0000000..67807cc --- /dev/null +++ b/pyblackbird_cc/templates/resources/resource_card.html @@ -0,0 +1,42 @@ +{% load markdown_extras %} + + +
+ {{ resource.thumbnail_filename }} +
+ +
+ {{ resource.age_range }} +
+
+ {% if resource.main_resource_category_name == "English as a Foreign Language (EFL)" %} + EFL + {% else %} + {{ resource.main_resource_category_name }} + {% endif %} +
+ {% if request.user.is_authenticated and request.user.is_staff %} +
+ Feature slot: {{ resource.feature_slot }} +
+ {% endif %} + {% if resource.card_description %} +

{{ resource.card_description | markdown | safe }}

+ {% else %} +

{{ resource.description | markdown | safe }}

+ {% endif %} +
+ {% if request.user.is_authenticated and request.user.is_staff %} + + {% endif %} +
\ No newline at end of file -- cgit v1.2.3