only show card footer if there are reactions
This commit is contained in:
parent
ba8935a3d3
commit
04f860e06a
@ -25,16 +25,16 @@
|
||||
<p class="card-text">{{ gallery.description | default('') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-body-secondary text-end">
|
||||
{% if gallery.reactions %}
|
||||
<div class="card-footer text-body-secondary text-end">
|
||||
{% for reaction in gallery.reactions %}
|
||||
{# TODO: limit total number of reactions shown #}
|
||||
<span class="badge rounded-pill text-body">
|
||||
<i class="bi-{{ reaction }}"></i>
|
||||
</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
7
test.py
7
test.py
@ -73,7 +73,12 @@ template_vars = {
|
||||
"src": "https://files.c0defox.es/Pictures/arctic-fox.jpg",
|
||||
"description": "An arctic fox :3",
|
||||
"title": "fox",
|
||||
"reactions": ["heart", "backpack3", "balloon", "bag-x"],
|
||||
"reactions": [],
|
||||
},
|
||||
{
|
||||
"src": "https://files.c0defox.es/Pictures/arctic-fox.jpg",
|
||||
"description": "An arctic fox :3",
|
||||
"title": "fox",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user