diff options
author | Matthew Lemon <y@yulqen.org> | 2024-05-14 13:59:52 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-05-14 13:59:52 +0100 |
commit | ced16ee9dc3bf1790c0345e874dc7861e27c99ca (patch) | |
tree | 17cc73c5232b1043d241736c4728904b0fb8f9ed /pyblackbird_cc/templates | |
parent | 46f11648d902b22a177b878e35d6049a7a127ce7 (diff) |
Adds crispy forms helper
Diffstat (limited to 'pyblackbird_cc/templates')
-rw-r--r-- | pyblackbird_cc/templates/resources/resource_create.html | 21 | ||||
-rw-r--r-- | pyblackbird_cc/templates/resources/resource_detail.html | 40 |
2 files changed, 32 insertions, 29 deletions
diff --git a/pyblackbird_cc/templates/resources/resource_create.html b/pyblackbird_cc/templates/resources/resource_create.html index 03a192a..c10e7b8 100644 --- a/pyblackbird_cc/templates/resources/resource_create.html +++ b/pyblackbird_cc/templates/resources/resource_create.html @@ -8,14 +8,17 @@ {# {% endblock %}#} {% block content %} <div class="container"> - <h2>Upload a new resource</h2> - <p>{% lorem %}</p> - <form action="{% url 'resources:create_resource' %}" - method="post" - enctype="multipart/form-data"> - {% csrf_token %} - {{ form|crispy }} - <input type="submit" class="btn btn-primary" value="Upload" /> - </form> + <div class="row d-flex justify-content-center"> + <div class="col-md-10 bg-light mt-lg-4"> + <h2>Upload a new resource</h2> + <p>{% lorem %}</p> + <form action="{% url 'resources:create_resource' %}" + method="post" + enctype="multipart/form-data"> + {% csrf_token %} + {% crispy form form.helper %} + </form> + </div> + </div> </div> {% endblock content %} diff --git a/pyblackbird_cc/templates/resources/resource_detail.html b/pyblackbird_cc/templates/resources/resource_detail.html index 61d9265..a52c2c6 100644 --- a/pyblackbird_cc/templates/resources/resource_detail.html +++ b/pyblackbird_cc/templates/resources/resource_detail.html @@ -23,28 +23,28 @@ <h4>{{ snapshot_filename }}</h4> </div> <div> - {% for snapshot_url in snapshot_urls %}<img src="{{ snapshot_url }}" alt="{{ snapshot_filename }}"{% endfor %} </div /> - {% endfor %} - </div> - <div class="resource-description-panel"> - <h3>What's included?</h3> - <div>{{ resource.description }}</div> - <h3>What's it for?</h3> - <div>{% lorem %}</div> - <h3>Resource Details</h3> - <div>{% lorem %}</div> - </div> - <div class="resource-download-panel"> - <h4>Download the resource</h4> - <div> - Click - <button hx-get="/hx-download-btn?rn={{ resource.pdf_filename }}" - hx-target="next #download-reveal">here</button> - to download the resource + {% for snapshot_url in snapshot_urls %}<img src="{{ snapshot_url }}" alt="{{ snapshot_filename }}" />{% endfor %} + <div class="resource-description-panel"> + <h3>What's included?</h3> + <div>{{ resource.description }}</div> + <h3>What's it for?</h3> + <div>{% lorem %}</div> + <h3>Resource Details</h3> + <div>{% lorem %}</div> + </div> + <div class="resource-download-panel"> + <h4>Download the resource</h4> + <div> + Click + <button hx-get="/hx-download-btn?rn={{ resource.pdf_filename }}" + hx-target="next #download-reveal">here</button> + to download the resource + </div> + <div id="download-reveal"></div> </div> - <div id="download-reveal"></div> </div> </div> - </div> + {% endfor %} <div>Logged in as {{ request.user.username }}</div> {% endblock content %} +</div> |