From 3c2485f46c524de7ffa79c8611f34e2537aa6de9 Mon Sep 17 00:00:00 2001 From: Joe Tower Date: Wed, 26 Jul 2023 13:46:16 -0500 Subject: [PATCH] fix(yalb-85): update block to wrap content in block-wrapper with block_wrapper__label --- .../ys-profile-contact-block.html.twig | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/templates/ys-profile-contact-block.html.twig b/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/templates/ys-profile-contact-block.html.twig index 82ae4fe9fe..7c30e8b5d9 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/templates/ys-profile-contact-block.html.twig +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_layouts/templates/ys-profile-contact-block.html.twig @@ -1,53 +1,53 @@ - -{% embed '@atoms/typography/headings/yds-heading.twig' with { - heading: 'Contact Info', - heading__level: '3', +{% embed "@organisms/block-wrapper/yds-block-wrapper.twig" with { + block_wrapper__label: 'Contact Info', + block_wrapper__heading__level: '3' } %} -{% endembed %} - -{% if email %} - - {{ attach_library('atomic/text-link') }} - {% embed '@atoms/controls/text-link/yds-text-link.twig' with { - link__url: '', - link__pre_text: email, - link__content: '(copy)', - link__type: 'email', - link__extra_class: ['copy-trigger'], - } %} - -{% endembed %} + {% block block_wrapper__inner %} + + {% if email %} + + {{ attach_library('atomic/text-link') }} + {% embed '@atoms/controls/text-link/yds-text-link.twig' with { + link__url: '', + link__pre_text: email, + link__content: '(copy)', + link__type: 'email', + link__extra_class: ['copy-trigger'], + } %} + {% endembed %} +
+ {% endif %} -{% endif %} + {% if phone %} -{% if phone %} + {% embed '@atoms/controls/text-link/yds-text-link.twig' with { + link__url: 'tel:' ~ phone, + link__content: phone, + } %} + {% endembed %} + {% endif %} - {% embed '@atoms/controls/text-link/yds-text-link.twig' with { - link__url: 'tel:' ~ phone, - link__content: phone, - } %} + {% if address %} - {% endembed %} + {% set address %} +
+ {{ address.address_line1 }}
+ {{ address.address_line2 }}
+ {% if address.locality %} + {{ address.locality }}, + {% endif %} + {{ address.administrative_area }} {{ address.postal_code }} + {% endset %} -{% endif %} + {% embed '@molecules/text/yds-text-field.twig' with { + text_field__content: address, + text_field__alignment: 'left' + } %} -{% if address %} + {% endembed %} - {% set address %} - {{ address.address_line1 }}
- {{ address.address_line2 }}
- {% if address.locality %} - {{ address.locality }}, {% endif %} - {{ address.administrative_area }} {{ address.postal_code }} - {% endset %} - - {% embed '@molecules/text/yds-text-field.twig' with { - text_field__content: address, - text_field__alignment: 'left' - } %} + {% endblock %} {% endembed %} - -{% endif %}