Move image attachments on posts into the content warning block. (#148)
Also adds alt text to image attachments.
This commit is contained in:
parent
a576c5b5ed
commit
39bcd7ac00
|
@ -900,7 +900,7 @@ table.metadata td.name {
|
||||||
}
|
}
|
||||||
|
|
||||||
.post .attachments {
|
.post .attachments {
|
||||||
margin: 10px 0 10px 64px;
|
padding-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post .attachments a.image {
|
.post .attachments a.image {
|
||||||
|
|
|
@ -70,6 +70,18 @@
|
||||||
|
|
||||||
<div class="content {% if post.summary %}hidden{% endif %}">
|
<div class="content {% if post.summary %}hidden{% endif %}">
|
||||||
{{ post.safe_content_local }}
|
{{ post.safe_content_local }}
|
||||||
|
|
||||||
|
{% if post.attachments.exists %}
|
||||||
|
<div class="attachments">
|
||||||
|
{% for attachment in post.attachments.all %}
|
||||||
|
{% if attachment.is_image %}
|
||||||
|
<a href="{{ attachment.full_url }}" class="image">
|
||||||
|
<img src="{{ attachment.thumbnail_url }}" title="{{ attachment.name }}" alt="{{ attachment.name }}" />
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if post.edited %}
|
{% if post.edited %}
|
||||||
|
@ -78,15 +90,5 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if post.attachments.exists %}
|
|
||||||
<div class="attachments">
|
|
||||||
{% for attachment in post.attachments.all %}
|
|
||||||
{% if attachment.is_image %}
|
|
||||||
<a href="{{ attachment.full_url }}" class="image"><img src="{{ attachment.thumbnail_url }}" title="{{ attachment.name }}"></a>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<a class="whole-box" href="{{ post.urls.view }}" tabindex="-1"></a>
|
<a class="whole-box" href="{{ post.urls.view }}" tabindex="-1"></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue