From 117e883061701f8cd8327b630a5a154b62a1df47 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 1 Sep 2024 20:07:27 +0100 Subject: Made the badges on the resource cards align horizontally --- .../resources/resource_card_featured.html | 12 ++-- .../resources/resource_card_standard.html | 78 ++++++++++------------ 2 files changed, 39 insertions(+), 51 deletions(-) diff --git a/pyblackbird_cc/templates/resources/resource_card_featured.html b/pyblackbird_cc/templates/resources/resource_card_featured.html index e920cef..473c928 100644 --- a/pyblackbird_cc/templates/resources/resource_card_featured.html +++ b/pyblackbird_cc/templates/resources/resource_card_featured.html @@ -10,10 +10,8 @@
{{ resource.name }}
-
+
{{ resource.age_range }} -
-
{% if resource.main_resource_category_name == "English as a Foreign Language (EFL)" %} EFL @@ -21,12 +19,10 @@ {{ resource.main_resource_category_name }} {% endif %} -
- {% if request.user.is_authenticated and request.user.is_staff %} -
+ {% if request.user.is_authenticated and request.user.is_staff %} Feature slot: {{ resource.feature_slot }} -
- {% endif %} + {% endif %} +
{% if resource.card_description %}

{{ resource.card_description | markdown | safe }}

{% else %} diff --git a/pyblackbird_cc/templates/resources/resource_card_standard.html b/pyblackbird_cc/templates/resources/resource_card_standard.html index 2b280a9..bdc3325 100644 --- a/pyblackbird_cc/templates/resources/resource_card_standard.html +++ b/pyblackbird_cc/templates/resources/resource_card_standard.html @@ -5,53 +5,45 @@
-
-
- {{ 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 %} -
+
+
+ {{ 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 }} -
+ Feature slot: {{ resource.feature_slot }} {% endif %} -{# {% if resource.card_description %}#} -{#

{{ resource.card_description | markdown | safe }}

#} -{# {% else %}#} -{#

{{ resource.description | markdown | safe }}

#} -{# {% endif %}#} -

FREE

+

1 credit

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