Skip to content

Commit

Permalink
Optimise album_list.html highlight handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Starcross committed Oct 30, 2024
1 parent c63c6a3 commit 16bbe4d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions templates/gallery/album_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@

{% for album in object_list %}
<a href="{% url 'gallery:album_detail' album.pk album.slug %}">

{% if album.display_highlight %}
{% with album.display_highlight as image %}
{% include "gallery/partials/thumbnail.html" %}

{% with image=album.display_highlight %}
{% if image %}
{% include "gallery/partials/thumbnail.html" %}
{% else %}
{% include "gallery/partials/thumbnail_empty.html" %}
{% endif %}
{% endwith %}
{% else %}
{% include "gallery/partials/thumbnail_empty.html" %}
{% endif %}


</a>
{% endfor %}

Expand Down

0 comments on commit 16bbe4d

Please sign in to comment.