From 27576670437e9edd139bae93efc5bd9577f83e35 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 1 Aug 2024 19:10:30 +0100 Subject: wip: trying to fix fucked divs on index page More to come - going to have to redo all the HTML on this page. --- .../templates/resources/resource_list.html | 279 +++++++++++---------- 1 file changed, 140 insertions(+), 139 deletions(-) (limited to 'pyblackbird_cc/templates/resources') diff --git a/pyblackbird_cc/templates/resources/resource_list.html b/pyblackbird_cc/templates/resources/resource_list.html index d60ac61..2f137e0 100644 --- a/pyblackbird_cc/templates/resources/resource_list.html +++ b/pyblackbird_cc/templates/resources/resource_list.html @@ -4,157 +4,158 @@ {% load markdown_extras %} {% block title %} - Joanna Lemon Learning - Resource List + Joanna Lemon Learning - Resource List {% endblock title %} {% block content %} - {# admin block #} - {% if request.user.is_authenticated and request.user.is_staff %} -
-
Admin bar
-

- Only you will see this bar - normal users will not see it. It allows us to - include buttons for adding new resources, etc. -

-
-
-
- Add a new resource -
-
- Logged in as - {{ request.user.email }} -
-
-
- {% csrf_token %} - -
-
-
-
+ {# admin block #} + {% if request.user.is_authenticated and request.user.is_staff %} +
+
Admin bar
+

+ Only you will see this bar - normal users will not see it. It allows us to + include buttons for adding new resources, etc. +

+
+
+ +
+ Logged in as + {{ request.user.email }} +
+
+
+ {% csrf_token %} + +
+
- {% endif %} +
+
+ {% endif %} - {# featured resources#} -
-
- {% if featured_resources %} -
-
-
Featured resources
-
-
-
- {% for resource in featured_resources %} - {% if featured_resources|length == 1 %} -
- {% elif featured_resources|length == 2 %} -
+ {# featured resources#} +
+
+ {% if featured_resources %} +
+
+
Featured resources
+
+
+
+ {% for resource in featured_resources %} + {% if featured_resources|length == 1 %} +
+ {% elif featured_resources|length == 2 %} +
+ {% else %} +
+ {% endif %} +
+ {{ resource.thumbnail_filename }} +
+
{{ resource.name }}
+
+
+ {% if resource.main_resource_category_name == "English as a Foreign Language (EFL)" %} + EFL {% else %} -
+ {{ resource.main_resource_category_name }} {% endif %} -
- {{ resource.thumbnail_filename }} -
-
{{ resource.name }} -
-
-
- {% if resource.main_resource_category_name == "English as a Foreign Language (EFL)" %} - EFL - {% else %} - {{ resource.main_resource_category_name }} - {% endif %} -
-
- {{ resource.age_range }} -
- {% 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 %} - +
+
+ {{ resource.age_range }} +
+ {% if request.user.is_authenticated and request.user.is_staff %} +
+ Feature slot: {{ resource.feature_slot }}
- {% endfor %} - {% else %} -

There are no featured resources

- {% endif %} + {% 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 %} + +
+
+ {% endfor %} + {% else %} +

There are no featured resources

+ {% endif %} +
- {# standard resources #} -
+{# standard resources #} +
+
+ {% if resource_list %} +
- {% if resource_list %} -
-
-
Standard resources
-
+
Standard resources
+
+
+
+ {% for resource in resource_list %} + {#
#} +
+ {{ resource.thumbnail_filename }} +
+
{{ resource.name }}
+
+
+ {% if resource.main_resource_category_name == "English as a Foreign Language (EFL)" %} + EFL + {% else %} + {{ resource.main_resource_category_name }} + {% endif %}
-
- {% for resource in resource_list %} - {#
#} -
- {{ resource.thumbnail_filename }} -
-
{{ resource.name }} -
-
-
- {% if resource.main_resource_category_name == "English as a Foreign Language (EFL)" %} - EFL - {% else %} - {{ resource.main_resource_category_name }} - {% endif %} -
-
- {{ resource.age_range }} -
-
- {% 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 %} - - {% endfor %} -
+
+ {{ resource.age_range }}
- {% else %} -

There are no resources

+
+ {% 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 %} + -
+
+
+ {% endfor %} +
+
+ {% else %} +

There are no resources

+ {% endif %} +
+
{% endblock content %} -- cgit v1.2.3