Only try and display an image if there is one

This commit is contained in:
Oliver Davies 2019-05-23 11:26:54 +01:00
parent a1cb960169
commit 02c80f35ef

View file

@ -14,11 +14,13 @@
</span> </span>
</span> </span>
<span class="tw-w-24 md:tw-w-32 tw-mr-6"> {% if speaker.image %}
<span class="tw-rounded-full tw-overflow-hidden tw-block tw-border-4 tw-border-solid tw-border-purple-500 group-hocus:tw-border-pink-500 tw-transition-border tw-transition-100"> <span class="tw-w-24 md:tw-w-32 tw-mr-6">
<img class="tw-block tw-w-full" src="/images/speakers/{{ speaker.image }}" alt="Photo of {{ speaker.name }}"> <span class="tw-rounded-full tw-overflow-hidden tw-block tw-border-4 tw-border-solid tw-border-purple-500 group-hocus:tw-border-pink-500 tw-transition-border tw-transition-100">
</span> <img class="tw-block tw-w-full" src="/images/speakers/{{ speaker.image }}" alt="Photo of {{ speaker.name }}">
</span> </span>
</span>
{% endif %}
</a> </a>
</li> </li>
{% endfor %} {% endfor %}