From 26b16586b81172ee0aedfac8fad3aa3e9f786eb3 Mon Sep 17 00:00:00 2001 From: moanos Date: Fri, 31 May 2024 14:40:35 +0200 Subject: [PATCH] feat: Add edit buttons to animal --- .../static/fellchensammlung/css/styles.css | 15 +++++++++++++-- .../partials/partial-animal-card.html | 18 +++++++++++------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/fellchensammlung/static/fellchensammlung/css/styles.css b/src/fellchensammlung/static/fellchensammlung/css/styles.css index 20f1f01..596a433 100644 --- a/src/fellchensammlung/static/fellchensammlung/css/styles.css +++ b/src/fellchensammlung/static/fellchensammlung/css/styles.css @@ -190,6 +190,14 @@ h1, h2 { border: none; } +.container-edit-buttons { + display: flex; + flex-wrap: wrap; + .btn { + margin: 5px; + } +} + .form-button:hover, .link-button a:hover, .link-button a:active { background-color: #4090b6; } @@ -308,6 +316,7 @@ h1, h2 { border-radius: 5px; display: flex; align-items: center; + justify-content: space-between; } .tag { @@ -348,7 +357,7 @@ h1, h2 { } .card { - flex: 1 16%; + flex: 1 25%; margin: 10px; border-radius: 8px; padding: 5px; @@ -369,7 +378,9 @@ h1, h2 { .header-card-adoption-notice { display: flex; + justify-content: space-evenly; align-items: center; + flex-wrap: wrap; } @@ -402,7 +413,7 @@ h1, h2 { } .tags { - margin-left: auto; + margin-right: auto; padding: 5px; } diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-animal-card.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-animal-card.html index 3e2da36..34d837d 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-animal-card.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-animal-card.html @@ -1,20 +1,24 @@ {% load i18n %}
-

{{ animal.name }}

+

{{ animal.name }}

+ +
{{ animal.species }}
{{ animal.get_sex_display }}
+ +
{% if animal.description %}

{{ animal.description }}

{% endif %} - {% if animal.get_photo %} - {{ animal.get_photo.alt_text }} -
- {% else %} - {% translate "Keine Foto" %} - {% endif %} + {% for photo in animal.get_photos %} + {{ photo.alt_text }} + {% endfor %}