neddit

the frontend of the frontpage of the internet  https://neddit.ce9e.org
git clone https://git.ce9e.org/neddit.git

commit
ba20bf1f5e424e326a8c623f399bb55e993103f7
parent
f760bf280d7cbcd1a60697186c254aa7bb2d69f1
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2022-07-01 16:23
fix gallery order

Diffstat

M templates/_post.html 12 +++++++-----

1 files changed, 7 insertions, 5 deletions


diff --git a/templates/_post.html b/templates/_post.html

@@ -19,11 +19,13 @@
   19    19 			<source src="{{ post.data.media.reddit_video.scrubber_media_url }}" type="video/mp4">
   20    20 		</video>
   21    21 	{% elif post.data.is_gallery %}
   22    -1 		{% for img in post.data.media_metadata.values() %}
   23    -1 			<picture>
   24    -1 				<source srcset="{% for res in img.p %}{{ res.u }} {{ res.x }}w{% if not loop.last %}, {% endif %}{% endfor %}" sizes="40em">
   25    -1 				<img class="poster" src="{{ img.p|last|attr('u') }}">
   26    -1 			</picture>
   -1    22 		{% for gallery_item in post.data.gallery_data['items'] %}
   -1    23 			{% with img = post.data.media_metadata[gallery_item.media_id] %}
   -1    24 				<picture>
   -1    25 					<source srcset="{% for res in img.p %}{{ res.u }} {{ res.x }}w{% if not loop.last %}, {% endif %}{% endfor %}" sizes="40em">
   -1    26 					<img class="poster" src="{{ img.p|last|attr('u') }}">
   -1    27 				</picture>
   -1    28 			{% endwith %}
   27    29 		{% endfor %}
   28    30 	{% elif post.data.post_hint == 'image' %}
   29    31 		<a href="{{ post.data.url }}" target="_blank">