diff options
author | Matthew Lemon <y@yulqen.org> | 2024-09-13 20:05:14 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-09-13 20:05:14 +0100 |
commit | d2abe12612108b94135dcb0701614dc216fb92d2 (patch) | |
tree | 1148f5ea6f20a73ecc9d3503f5107c08f7b338e3 | |
parent | dba3d4d65657e8ccefe35e026e7f64b96f255101 (diff) |
Adds Add to basket buttons to cards on resource list page
-rw-r--r-- | pyblackbird_cc/templates/resources/resource_card_featured.html | 21 | ||||
-rw-r--r-- | pyblackbird_cc/templates/resources/resource_card_standard.html | 9 |
2 files changed, 19 insertions, 11 deletions
diff --git a/pyblackbird_cc/templates/resources/resource_card_featured.html b/pyblackbird_cc/templates/resources/resource_card_featured.html index 473c928..586a851 100644 --- a/pyblackbird_cc/templates/resources/resource_card_featured.html +++ b/pyblackbird_cc/templates/resources/resource_card_featured.html @@ -28,15 +28,20 @@ {% else %} <p class="card-text my-2">{{ resource.description | markdown | safe }}</p> {% endif %} + <div class="d-flex flex-row justify-content-between align-items-end mt-2"> + <p class="card-text m-1"><small class="text-muted">1 credit</small></p> + <button type="button" class="btn btn-success fs-6 px-2 py-0">Add to basket</button> + </div> </div> + {% if request.user.is_authenticated and request.user.is_staff %} - <div class="card-footer"> - <a href="{% url 'resources:resource_update_metadata' resource.id %}" - class="btn btn-outline-primary btn-sm">Edit</a> - <a href="{% url 'resources:resource_update_thumbnails' resource.id %}" + <div class="card-footer"> + <a href="{% url 'resources:resource_update_metadata' resource.id %}" + class="btn btn-outline-primary btn-sm">Edit</a> + <a href="{% url 'resources:resource_update_thumbnails' resource.id %}" class="btn btn-outline-primary btn-sm">Edit Feature Images</a> - <a href="{% url 'resources:resource_update_pdfs' resource.id %}" - class="btn btn-outline-primary btn-sm">Add PDFs</a> - </div> + <a href="{% url 'resources:resource_update_pdfs' resource.id %}" + class="btn btn-outline-primary btn-sm">Add PDFs</a> + </div> {% endif %} -</div>
\ No newline at end of file +</div> diff --git a/pyblackbird_cc/templates/resources/resource_card_standard.html b/pyblackbird_cc/templates/resources/resource_card_standard.html index 9d560eb..b3d230e 100644 --- a/pyblackbird_cc/templates/resources/resource_card_standard.html +++ b/pyblackbird_cc/templates/resources/resource_card_standard.html @@ -33,12 +33,15 @@ {% endif %} </div> <p>{{ resource.card_description }}</p> - <p class="card-text m-1"><small class="text-muted">1 credit</small></p> + <div class="d-flex flex-row justify-content-between align-items-end mt-2"> + <p class="card-text m-1"><small class="text-muted">1 credit</small></p> + <button type="button" class="btn btn-success fs-6 px-2 py-0">Add to basket</button> + </div> </div> </div> {% if request.user.is_authenticated and request.user.is_staff %} - <div class="card-footer"> - <a href="{% url 'resources:resource_update_metadata' resource.id %}" + <div class="card-footer"> + <a href="{% url 'resources:resource_update_metadata' resource.id %}" class="btn btn-outline-primary btn-sm">Edit</a> <a href="{% url 'resources:resource_update_thumbnails' resource.id %}" class="btn btn-outline-primary btn-sm">Edit Feature Images</a> |