From 46f11648d902b22a177b878e35d6049a7a127ce7 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 14 May 2024 12:53:28 +0100 Subject: Can now upload to Spaces --- .../templates/resources/hx_download_button.html | 3 ++ .../templates/resources/resource_create.html | 21 ++++++++ .../templates/resources/resource_detail.html | 50 ++++++++++++++++++ .../templates/resources/resource_list.html | 61 ++++++++++++++++++++++ 4 files changed, 135 insertions(+) create mode 100644 pyblackbird_cc/templates/resources/hx_download_button.html create mode 100644 pyblackbird_cc/templates/resources/resource_create.html create mode 100644 pyblackbird_cc/templates/resources/resource_detail.html create mode 100644 pyblackbird_cc/templates/resources/resource_list.html (limited to 'pyblackbird_cc/templates/resources') diff --git a/pyblackbird_cc/templates/resources/hx_download_button.html b/pyblackbird_cc/templates/resources/hx_download_button.html new file mode 100644 index 0000000..1c956a5 --- /dev/null +++ b/pyblackbird_cc/templates/resources/hx_download_button.html @@ -0,0 +1,3 @@ +

+ Download the resource +

diff --git a/pyblackbird_cc/templates/resources/resource_create.html b/pyblackbird_cc/templates/resources/resource_create.html new file mode 100644 index 0000000..03a192a --- /dev/null +++ b/pyblackbird_cc/templates/resources/resource_create.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% load static %} +{% load crispy_forms_tags %} + +{# {% block extra_css %}#} +{# #} +{# {% endblock %}#} +{% block content %} +
+

Upload a new resource

+

{% lorem %}

+
+ {% csrf_token %} + {{ form|crispy }} + +
+
+{% endblock content %} diff --git a/pyblackbird_cc/templates/resources/resource_detail.html b/pyblackbird_cc/templates/resources/resource_detail.html new file mode 100644 index 0000000..61d9265 --- /dev/null +++ b/pyblackbird_cc/templates/resources/resource_detail.html @@ -0,0 +1,50 @@ +{% extends 'base.html' %} + +{% block content %} +
+
+

{{ resource.name }}

+
+
+
Subject: {{ resource.main_resource_category }}
+
Age range: {{ resource.age_range }}
+
Resource type: {{ resource.resource_type }}
+
+
+
+

Feature images

+
+ {% for tn_url, tn_filename in resource.thumbnails %}{{ tn_filename }}{% endfor %} +
+

Resource preview

+
+ {% for snapshot_filename, snapshot_urls in resource.snapshot_urls.items %} +
+

{{ snapshot_filename }}

+
+
+ {% for snapshot_url in snapshot_urls %}{{ snapshot_filename }} + {% endfor %} +
+
+

What's included?

+
{{ resource.description }}
+

What's it for?

+
{% lorem %}
+

Resource Details

+
{% lorem %}
+
+
+

Download the resource

+
+ Click + + to download the resource +
+
+
+
+
+
Logged in as {{ request.user.username }}
+ {% endblock content %} diff --git a/pyblackbird_cc/templates/resources/resource_list.html b/pyblackbird_cc/templates/resources/resource_list.html new file mode 100644 index 0000000..5b11ff6 --- /dev/null +++ b/pyblackbird_cc/templates/resources/resource_list.html @@ -0,0 +1,61 @@ +{% extends "base.html" %} + +{% block title %} + Joanna Lemon Resources - Resource List +{% endblock title %} +{% block content %} +
+ {% if request.user.is_authenticated %} + + {% endif %} + {% if resource_list %} + {% for resource in resource_list %} + +
+
+ {% for img in resource.thumbnail_urls %} + {{ resource.thumbnail_filename }} + {% endfor %} +
+
+ Click + + to download the resource +
+
+
+
+ {% endfor %} + {% else %} +

There are no resources

+ {% endif %} +
+
Logged in as {{ request.user.username }}
+{% endblock content %} -- cgit v1.2.3