From d209dcbbcc36e65b8e16aca94add3f39de6414ef Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 26 May 2024 15:56:17 +0100 Subject: Basic feature slot presentation in index page --- .../templates/resources/resource_list.html | 140 +++++++++++++-------- 1 file changed, 91 insertions(+), 49 deletions(-) (limited to 'pyblackbird_cc/templates/resources/resource_list.html') diff --git a/pyblackbird_cc/templates/resources/resource_list.html b/pyblackbird_cc/templates/resources/resource_list.html index 046aa7f..eb2506a 100644 --- a/pyblackbird_cc/templates/resources/resource_list.html +++ b/pyblackbird_cc/templates/resources/resource_list.html @@ -2,71 +2,113 @@ {% load static %} -{% block title %} + {% block title %} Joanna Lemon Learning - Resource List -{% endblock title %} -{% block content %} + {% endblock title %} + {% block content %} {% 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 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 %} -
-
-
Featured resources
-
+ {% endif %} +
+ +
- {% if resource_list %} + {% if featured_resources %} +
+
+
Featured resources
+
+
+
+ {% for resource in featured_resources %} +
+ {{ resource.thumbnail_filename }} +
+
{{ resource.name }}
+
+
+ {{ resource.main_resource_category_name }} +
+
+ {{ resource.age_range }} +
+
+

{{ resource.description }}

+ Details +
+
+ {% endfor %} + {% else %} +

There are no featured resources

+ {% endif %} +
+
+ +
+ +
+ {% if resource_list %} +
+
+
Standard resources
+
+
{% for resource in resource_list %} -
- {{ resource.thumbnail_filename }} -
-
{{ resource.name }}
-
-
- {{ resource.main_resource_category_name }} -
-
- {{ resource.age_range }} -
+
+ {{ resource.thumbnail_filename }} +
+
{{ resource.name }}
+
+
+ {{ resource.main_resource_category_name }} +
+
+ {{ resource.age_range }}
-

{{ resource.description }}

- Details
+

{{ resource.description }}

+ Details
+
{% endfor %}
+
+ {% else %} -

There are no resources

+

There are no resources

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