diff --git a/django_lostplaces/lostplaces/templates/explorer/profile.html b/django_lostplaces/lostplaces/templates/explorer/profile.html index 4cf7948..68c0072 100644 --- a/django_lostplaces/lostplaces/templates/explorer/profile.html +++ b/django_lostplaces/lostplaces/templates/explorer/profile.html @@ -63,25 +63,8 @@
-

{% trans 'Images submitted by' %} {{explorer.user.username}}

-
- -
+ {% translate 'Images submitted by' as submitted_by %} + {% include 'partials/placeImageGrid.html' with headline=submitted_by|add:' '|add:explorer.user.username image_list=assets.placeimages.all%}
diff --git a/django_lostplaces/lostplaces/templates/partials/placeImageGrid.html b/django_lostplaces/lostplaces/templates/partials/placeImageGrid.html new file mode 100644 index 0000000..7623d04 --- /dev/null +++ b/django_lostplaces/lostplaces/templates/partials/placeImageGrid.html @@ -0,0 +1,21 @@ + {% load static %} + + {% if headline %} +

{{headline}}

+ {% endif %} +
+ +
\ No newline at end of file diff --git a/django_lostplaces/lostplaces/templates/place/place_detail.html b/django_lostplaces/lostplaces/templates/place/place_detail.html index 6d91170..aba45ac 100644 --- a/django_lostplaces/lostplaces/templates/place/place_detail.html +++ b/django_lostplaces/lostplaces/templates/place/place_detail.html @@ -25,9 +25,9 @@

{{ place.name }}

{% if place.placeimages.first.filename.hero.url %} -
- -
+
+ {% include 'partials/image.html' with source_url=place.placeimages.first.filename.hero.url %} +
{% endif %}
@@ -90,30 +90,8 @@
-

{% trans 'Images' %}

-
- -
+ {% translate 'Images' as t_images %} + {% include 'partials/placeImageGrid.html' with headline=t_images image_list=place.placeimages.all%}