From cec38ecaedd000c1f6919e63cc8bab837b2f24f7 Mon Sep 17 00:00:00 2001 From: Vivaan Verma Date: Sat, 14 Aug 2021 22:34:08 +0100 Subject: chore: Add tag to resource boxes --- pydis_site/templates/resources/resource_box.html | 20 ++++++++++++++++---- pydis_site/templates/resources/resources.html | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'pydis_site/templates') diff --git a/pydis_site/templates/resources/resource_box.html b/pydis_site/templates/resources/resource_box.html index 8146be6f..40f692c3 100644 --- a/pydis_site/templates/resources/resource_box.html +++ b/pydis_site/templates/resources/resource_box.html @@ -1,4 +1,5 @@ {% load as_icon %} +{% load get_category_icon %}
{% if 'title_url' in resource %} @@ -11,7 +12,7 @@

{{ resource.description|safe }}

-
+
{# Icons #} {% for icon in resource.urls %} @@ -20,8 +21,19 @@ {% endfor %} - +
+ {% for tag in resource.tags.topics %} + {{ tag|title }} + {% endfor %} + {% for tag in resource.tags.type %} + {{ tag|title }} + {% endfor %} + {% for tag in resource.tags.payment_tiers %} + {{ tag|title }} + {% endfor %} + {% for tag in resource.tags.complexity %} + {{ tag|title }} + {% endfor %} +
diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index fb482345..38cd3d9d 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -104,7 +104,7 @@ {% if resources|length > 0 %}
-
+
{% for resource in resources %} {% include "resources/resource_box.html" %} -- cgit v1.2.3