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 --- pyblackbird_cc/templates/base.html | 70 +++++++++++----------- .../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 +++++++++++++++++++ 5 files changed, 170 insertions(+), 35 deletions(-) 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') diff --git a/pyblackbird_cc/templates/base.html b/pyblackbird_cc/templates/base.html index 1eb9966..ce0a4ca 100644 --- a/pyblackbird_cc/templates/base.html +++ b/pyblackbird_cc/templates/base.html @@ -18,27 +18,27 @@ {% block extra_css %} {% endblock extra_css %} {% block css %} - - {# #} + + - - + + {# #} {% endblock css %} + ================================================== --> {# Placed at the top of the document so pages load faster with defer #} {% block javascript %} - {##} + @@ -47,32 +47,32 @@
-
+
 
-
-

Joanna Lemon Learning

-

- Experienced primary school teacher, dedicated to creating colourful and - clear educational learning resources. -

+
+
+

Joanna Lemon Learning

+

+ Experienced primary school teacher, dedicated to creating colourful and + clear educational learning resources. +

+
-
 
-
 
-
+

For information: please contact joanna@joannalemon.com

-
-
- TES Shop -
-
- Etsy -
-
- Blog -
+
+
+
+ TES Shop +
+
+ Etsy +
+
+ Blog
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 %} + +
+

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