check if section attributes exist

This commit is contained in:
krmax44 2022-03-14 14:10:55 +01:00
parent 9623f7105b
commit 0f8f26c8a0
No known key found for this signature in database
GPG key ID: 5C499A4F4EC4EE03

View file

@ -2,9 +2,11 @@
<style>
{% for section in sections %}
{% if section.image %}
#govsection-{{ section.pk }}::after {
background-image: url('{% thumbnail section.image 350x150 crop subject_location=instance.picture.subject_location %}');
}
{% endif %}
{% endfor %}
</style>
@ -16,11 +18,13 @@
<div>
<div class="box-card-header tight-margin d-flex align-items-center has-background p-3 p-md-4 bg-blue-20" id="govsection-{{ section.pk }}">
<h3 class="h5 m-0">{{ section.title }}</h3>
{% if section.icon %}
<div class="ml-auto">
<div class="box-card-icon position-static bg-white">
<i class="fa fa-{{ section.icon }}"></i>
</div>
</div>
{% endif %}
</div>
<div class="flex-grow-1 tight-margin p-3 p-md-4 cms-plugin cms-plugin-87888">
progress bar