fileinfo.html: do not generate file related html if there are no files

This commit is contained in:
Zankaria 2025-10-10 23:46:38 +02:00
parent 16451374ab
commit 58b6478e47

View file

@ -1,6 +1,6 @@
{% if post.embed %} {% if post.embed %}
{{ post.embed }} {{ post.embed }}
{% else %} {% elseif post.num_files > 0 %}
<div class="files {% if post.num_files > 1 %} multifile{% endif %}"> <div class="files {% if post.num_files > 1 %} multifile{% endif %}">
{% for file in post.files %} {% for file in post.files %}
<div class="file{% if post.num_files > 1 %} multifile" style="width:{{ file.thumbwidth + 40 }}px"{% else %}"{% endif %}> <div class="file{% if post.num_files > 1 %} multifile" style="width:{{ file.thumbwidth + 40 }}px"{% else %}"{% endif %}>
@ -31,7 +31,7 @@
{% include "post/file_controls.html" %}</span></p> {% include "post/file_controls.html" %}</span></p>
{% include "post/image.html" with {'post':file} %} {% include "post/image.html" with {'post':file} %}
{% endif %} {% endif %}
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}