only add wrapper when needed

This commit is contained in:
krmax44 2022-03-17 16:40:31 +01:00
parent 03342fde2d
commit ce22ac69cf
No known key found for this signature in database
GPG key ID: 5C499A4F4EC4EE03

View file

@ -1,7 +1,7 @@
{% load markup %} {% load markup %}
{% for update in updates %} {% for update in updates %}
<div class="{{ wrapper_classes }}"> {% if wrapper_classes %}<div class="{{ wrapper_classes }}">{% endif %}
<div class="box-card border-blue shadow-blue" id="update-{{ update.pk }}"> <div class="box-card border-blue shadow-blue" id="update-{{ update.pk }}">
<div> <div>
<a href="{{ update.get_absolute_url }}" class="text-body text-decoration-none"> <a href="{{ update.get_absolute_url }}" class="text-body text-decoration-none">
@ -36,7 +36,7 @@
{{ update.content|markdown }} {{ update.content|markdown }}
</div> </div>
{% endif %} {% endif %}
</div>
{% if update.url or update.foirequest %} {% if update.url or update.foirequest %}
<div class="p-3 p-md-4 {% if update.content %}box-card-links{% else %}d-flex mt-auto{% endif %}"> <div class="p-3 p-md-4 {% if update.content %}box-card-links{% else %}d-flex mt-auto{% endif %}">
{% if update.url %} {% if update.url %}
@ -50,4 +50,5 @@
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% if wrapper_classes %}</div>{% endif %}
{% endfor %} {% endfor %}