From 809e499de660df6f10b80df6026894cac1e561f7 Mon Sep 17 00:00:00 2001 From: ebremner <ebremner@uwaterloo.ca> Date: Thu, 17 Jun 2021 09:27:50 -0400 Subject: [PATCH] ISTWCMS-4704: adding classes for node types and with image on nodes --- .../04-components/card/card--node/card--node.twig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/_patterns/04-components/card/card--node/card--node.twig b/source/_patterns/04-components/card/card--node/card--node.twig index 384e351a..a882838d 100644 --- a/source/_patterns/04-components/card/card--node/card--node.twig +++ b/source/_patterns/04-components/card/card--node/card--node.twig @@ -1,3 +1,6 @@ +{% if featured_image and node.image.img_element %} + <div class="uw-node__with-image"> +{% endif %} {% include '@components/card/card.twig' with { 'title': node.title, 'sub_title': node.sub_title, @@ -21,5 +24,8 @@ 'additional_info': node.additional_info, 'contact_for': node.contact_for, 'groups': node.groups, - 'featured_image': 'yes', + 'featured_image': featured_image, } %} +{% if featured_image and img_element %} + </div> +{% endif %} \ No newline at end of file -- GitLab