Skip to content
Snippets Groups Projects
Commit e63c3809 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4704: adding logic for featured image

parent 20afada4
No related branches found
No related tags found
1 merge request!66ISTWCMS-4704: adding date component with ability to handle multiple dates and...
......@@ -21,4 +21,5 @@
'additional_info': node.additional_info,
'contact_for': node.contact_for,
'groups': node.groups,
'featured_image': 'yes',
} %}
{% import '@base/macros/uw.macro.twig' as macros %}
<article class="card {{ modifier_classes }} {% if show_hover %} card--show-hover {% endif %} {{ type }}" >
{% if featured_image and img_element %}
<div class="card__featured-image" style="background-image: url({{ img_element }});" role="img" aria-label="{{ alt }}">
</div>
{% endif %}
<div class="card__body">
{% if title or author or date or sub_title %}
<div class="card__header">
......@@ -41,7 +47,7 @@
{% endif %}
</div>
{% endif %}
{% if sources or img_element %}
{% if not featured_image and (sources or img_element) %}
<div class="card__media">
{% if url %}
<a href="{{ url }}">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment