refactor: Style photo display

This commit is contained in:
moanos [he/him] 2024-03-20 14:04:51 +01:00
parent b0b5b185d6
commit f50d0ae873
2 changed files with 27 additions and 3 deletions

View File

@ -1,3 +1,8 @@
html, body {
margin: 0;
height: 100%;
}
.content-box {
margin-top: 25px;
}
@ -321,4 +326,19 @@ h1 {
.card-rule {
width: 100%;
}
}
.photos {
display: flex;
flex-wrap: wrap;
}
.card-photo {
flex: 1 16%;
margin: 10px;
}
.card-photo img {
max-width: 100%;
border-radius: 10%;
}

View File

@ -18,7 +18,11 @@
</div>
<p>{{ animal.description }}</p>
<h2>Bilder</h2>
{% for image in animal.photos_list %}
<img src="/media/{{ image.image }}">
{% endfor %}
<div class="photos">
{% for image in animal.photos_list %}
<div class="card-photo">
<img src="/media/{{ image.image }}" alt="{{ image.alt_text }}">
</div>
{% endfor %}
</div>
</div>