From f4931b474cbdbe8a2e1c0bad3df0e1b90510e8d4 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sat, 1 Jun 2024 22:58:11 +1200 Subject: [PATCH] smaller images on mobile, using srcset --- app/templates/post/_post_full.html | 184 +++++++++++++++-------------- 1 file changed, 95 insertions(+), 89 deletions(-) diff --git a/app/templates/post/_post_full.html b/app/templates/post/_post_full.html index ea5bf961..d2e3baf3 100644 --- a/app/templates/post/_post_full.html +++ b/app/templates/post/_post_full.html @@ -1,207 +1,213 @@
{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) %} + {% endif -%} +
{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) -%} - {% endif %}submitted {{ moment(post.posted_at).fromNow() }} by {{ render_username(post.author) }} - {% if post.edited_at %} edited {{ moment(post.edited_at).fromNow() }}{% endif %} + {% endif -%}submitted {{ moment(post.posted_at).fromNow() }} by {{ render_username(post.author) }} + {% if post.edited_at -%} edited {{ moment(post.edited_at).fromNow() }}{% endif -%}
{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) %} + {% endif -%} +
{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) -%} - {% endif %}submitted {{ moment(post.posted_at).fromNow() }} by + {% endif -%}submitted {{ moment(post.posted_at).fromNow() }} by {{ render_username(post.author) }} - {% if post.edited_at %} edited {{ moment(post.edited_at).fromNow() }}{% endif %} + {% if post.edited_at -%} edited {{ moment(post.edited_at).fromNow() }}{% endif -%}
- {% if post.type == POST_TYPE_LINK %} + {% if post.type == POST_TYPE_LINK -%} - {% if post.url.endswith('.mp3') %} + {% if post.url.endswith('.mp3') -%} - {% elif post.url.endswith('.mp4') or post.url.endswith('.webm') %} + {% elif post.url.endswith('.mp4') or post.url.endswith('.webm') -%}- {% elif post.url.startswith('https://streamable.com') %} + {% elif post.url.startswith('https://streamable.com') -%} - {% elif post.url.startswith('https://www.redgifs.com/watch/') %} + {% elif post.url.startswith('https://www.redgifs.com/watch/') -%} - {% endif %} - {% if 'youtube.com' in post.url %} + {% endif -%} + {% if 'youtube.com' in post.url -%}
{{ _('Watch on piped.video') }}
- {% endif %} - {% elif post.type == POST_TYPE_VIDEO %} + {% endif -%} + {% elif post.type == POST_TYPE_VIDEO -%} - {% if post.url.endswith('.mp4') or post.url.endswith('.webm') %} + {% if post.url.endswith('.mp4') or post.url.endswith('.webm') -%}- {% elif post.url.startswith('https://streamable.com') %} + {% elif post.url.startswith('https://streamable.com') -%} - {% elif post.url.startswith('https://www.redgifs.com/watch/') %} + {% elif post.url.startswith('https://www.redgifs.com/watch/') -%} - {% endif %} - {% if 'youtube.com' in post.url %} + {% endif -%} + {% if 'youtube.com' in post.url -%}
{{ _('Watch on piped.video') }}
- {% endif %} - {% if 'videos/watch' in post.url %} + {% endif -%} + {% if 'videos/watch' in post.url -%} - {% endif %} - {% elif post.type == POST_TYPE_IMAGE %} + {% endif -%} + {% elif post.type == POST_TYPE_IMAGE -%} - {% else %} - {% if post.image_id and not (post.url and 'youtube.com' in post.url) %} + {% else -%} + {% if post.image_id and not (post.url and 'youtube.com' in post.url) -%} - {% endif %} - {% endif %} + {% endif -%} + {% endif -%}{{ _('The poll has finished, yet no votes were cast.') }}
- {% elif poll_results and poll_total_votes %} + {% elif poll_results and poll_total_votes -%}{{ _('Total votes: %(total_votes)d.', total_votes=poll_total_votes) }}
{{ _('Poll closes') }} {{ moment(poll_data.end_poll).fromNow(refresh=True) }}.
- {% elif poll_form %} - {% if current_user.is_authenticated %} + {% elif poll_form -%} + {% if current_user.is_authenticated -%} - {% endif %} + {% endif -%}