-
-
Notifications
You must be signed in to change notification settings - Fork 48
Show inline image in replies; add icon to copy user handle #1088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,13 +32,29 @@ | |
{% else %} | ||
{{ post.safe_content_local }} | ||
{% endif %} | ||
{% for attachment in post.attachments.all %} | ||
<a href="{{ attachment.full_url.relative }}" class="download"> | ||
<div> | ||
<i class="fa-solid fa-download"></i> {{ attachment.file_display_name }} | ||
</div> | ||
</a> | ||
{% endfor %} | ||
<div class="attachments"> | ||
{% for attachment in post.attachments.all %} | ||
{% if attachment.is_image %} | ||
<a href="#img_{{ post.pk }}_{{ loop.index }}"> | ||
<img src="{{ attachment.thumbnail_url.relative }}" | ||
alt="image attachment" | ||
class="preview"> | ||
</a> | ||
<a href="#" class="lightbox" id="img_{{ post.pk }}_{{ loop.index }}"> | ||
<span style="background-image: url('{{ attachment.full_url.relative }}')"></span> | ||
</a> | ||
{% endif %} | ||
Comment on lines
+36
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
{% endfor %} | ||
{% for attachment in post.attachments.all %} | ||
{% if not attachment.is_image %} | ||
<a href="{{ attachment.full_url.relative }}" class="download"> | ||
<div> | ||
<i class="fa-solid fa-download"></i> {{ attachment.file_display_name }} | ||
</div> | ||
</a> | ||
{% endif %} | ||
{% endfor %} | ||
Comment on lines
+36
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The attachment display logic is duplicated. The code iterates through |
||
</div> | ||
<div id="replies_{{ post.pk }}"></div> | ||
</div> | ||
{% empty %} | ||
|
+8 −1 | activities/models/post.py | |
+4 −2 | activities/models/post_interaction.py | |
+0 −1 | requirements-dev.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding an
aria-label
attribute to the<i>
tag to improve accessibility. This will provide a text alternative for screen reader users, describing the purpose of the icon. For example,aria-label="Copy user handle"
.