From 0580a7f16230d5f7fd91838f54befffa1f759011 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 30 Mar 2017 18:54:18 -0700 Subject: [PATCH] Only generate tags T div if photo has tags --- templates/photo_card.html | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/templates/photo_card.html b/templates/photo_card.html index 8b12a63..84a763e 100644 --- a/templates/photo_card.html +++ b/templates/photo_card.html @@ -45,16 +45,17 @@ {{photo.basename}}
-
- {% set tags = photo.tags() %} - {% set tag_names = [] %} - {% for tag in tags %} - {% do tag_names.append(tag.name) %} - {% endfor %} - {% if tags %} - T - {% endif %} -
+ {% set tags = photo.tags() %} + {% set tag_names = [] %} + {% for tag in tags %} + {% do tag_names.append(tag.name) %} + {% endfor %} + {% if tag_names %} +
+ {% set tag_names = ", ".join(tag_names) %} + T +
+ {% endif %} {% if photo.width %} {{photo.width}}×{{photo.height}},