check if section attributes exist
This commit is contained in:
parent
9623f7105b
commit
0f8f26c8a0
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue