From 7d01ab2c815d681c997addad810e42117e1c4a05 Mon Sep 17 00:00:00 2001 From: Joe Tower Date: Tue, 18 Jun 2024 16:51:35 -0500 Subject: [PATCH 01/13] fix(YSP-335): wiring new component --- ...ck--inline-block--inline-message.html.twig | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 templates/block/layout-builder/block--inline-block--inline-message.html.twig diff --git a/templates/block/layout-builder/block--inline-block--inline-message.html.twig b/templates/block/layout-builder/block--inline-block--inline-message.html.twig new file mode 100644 index 000000000..b7a81e341 --- /dev/null +++ b/templates/block/layout-builder/block--inline-block--inline-message.html.twig @@ -0,0 +1,20 @@ +{% extends "@atomic/block/layout-builder/_layout-builder-block-template.twig" %} + +{% block content %} + + {% if parentNode == 'post' or parentNode == 'event' %} + {% set inline_message__width = "content" %} + {% set inline_message__alignment = "center" %} + {% else %} + {% set inline_message__width = "site" %} + {% set inline_message__alignment = "left" %} + {% endif %} + + {% embed "@molecules/inline-message/yds-inline-message.twig" with { + inline_message__heading: content.field_heading.0, + inline_message__content: content.field_text.0, + } %} + + {% endembed %} + +{% endblock %} From d1cb3d46e0991435af0ef09fd442da228a2bb2f0 Mon Sep 17 00:00:00 2001 From: Joe Tower Date: Tue, 18 Jun 2024 17:31:13 -0500 Subject: [PATCH 02/13] fix(YSP-335): wiring new component - update color options --- .../layout-builder/block--inline-block--inline-message.html.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/block/layout-builder/block--inline-block--inline-message.html.twig b/templates/block/layout-builder/block--inline-block--inline-message.html.twig index b7a81e341..0c36acc3f 100644 --- a/templates/block/layout-builder/block--inline-block--inline-message.html.twig +++ b/templates/block/layout-builder/block--inline-block--inline-message.html.twig @@ -13,6 +13,7 @@ {% embed "@molecules/inline-message/yds-inline-message.twig" with { inline_message__heading: content.field_heading.0, inline_message__content: content.field_text.0, + inline_message__theme: content.field_style_color.0['#markup'], } %} {% endembed %} From baa280484079807848bb6fccccc0bc9449389a19 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Wed, 26 Jun 2024 16:17:27 -0400 Subject: [PATCH 03/13] fix(YSP-535): do not show empty content moderation block In our markup, we have an empty div that is the result of the content moderation control not being needed. This results in undesirable spacing issues in multiple places. This fixes this by allowing the content through or not dispaying anything. --- ...field-block--node--page--content-moderation-control.html.twig | 1 + 1 file changed, 1 insertion(+) create mode 100644 templates/block/extra-field-block/node/page/block--extra-field-block--node--page--content-moderation-control.html.twig diff --git a/templates/block/extra-field-block/node/page/block--extra-field-block--node--page--content-moderation-control.html.twig b/templates/block/extra-field-block/node/page/block--extra-field-block--node--page--content-moderation-control.html.twig new file mode 100644 index 000000000..cddd07099 --- /dev/null +++ b/templates/block/extra-field-block/node/page/block--extra-field-block--node--page--content-moderation-control.html.twig @@ -0,0 +1 @@ +{{ content }} From cc996216d17211b42cc28f3a109094f7279493a2 Mon Sep 17 00:00:00 2001 From: Joe Tower Date: Fri, 28 Jun 2024 13:34:02 -0500 Subject: [PATCH 04/13] fix(YSP-335): wiring optional link --- .../block--inline-block--inline-message.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/block/layout-builder/block--inline-block--inline-message.html.twig b/templates/block/layout-builder/block--inline-block--inline-message.html.twig index 0c36acc3f..246ad6a54 100644 --- a/templates/block/layout-builder/block--inline-block--inline-message.html.twig +++ b/templates/block/layout-builder/block--inline-block--inline-message.html.twig @@ -13,9 +13,9 @@ {% embed "@molecules/inline-message/yds-inline-message.twig" with { inline_message__heading: content.field_heading.0, inline_message__content: content.field_text.0, + inline_message__link__content: content.field_link_text.0, + inline_message__link__url: content.field_link_url.0, inline_message__theme: content.field_style_color.0['#markup'], } %} - {% endembed %} - {% endblock %} From adb1861b0e018bfaa369ed536922caa63d72d174 Mon Sep 17 00:00:00 2001 From: Joe Tower Date: Fri, 28 Jun 2024 14:17:24 -0500 Subject: [PATCH 05/13] fix(YSP-335): update embed to include since we have no blocks --- .../block--inline-block--inline-message.html.twig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/templates/block/layout-builder/block--inline-block--inline-message.html.twig b/templates/block/layout-builder/block--inline-block--inline-message.html.twig index 246ad6a54..bbdd6e14a 100644 --- a/templates/block/layout-builder/block--inline-block--inline-message.html.twig +++ b/templates/block/layout-builder/block--inline-block--inline-message.html.twig @@ -4,18 +4,17 @@ {% if parentNode == 'post' or parentNode == 'event' %} {% set inline_message__width = "content" %} - {% set inline_message__alignment = "center" %} + {% set inline_message__alignment = "center" %}() {% else %} {% set inline_message__width = "site" %} {% set inline_message__alignment = "left" %} {% endif %} - {% embed "@molecules/inline-message/yds-inline-message.twig" with { + {% include "@molecules/inline-message/yds-inline-message.twig" with { inline_message__heading: content.field_heading.0, inline_message__content: content.field_text.0, - inline_message__link__content: content.field_link_text.0, - inline_message__link__url: content.field_link_url.0, + inline_message__link__content: content.field_link.0['#title'], + inline_message__link__url: content.field_link.0['#url_title'], inline_message__theme: content.field_style_color.0['#markup'], } %} - {% endembed %} {% endblock %} From 592a753ca9b94d71df36cd2bb25318bdfed3dc57 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Tue, 30 Jul 2024 13:56:35 -0400 Subject: [PATCH 06/13] feat(YSP-495): pass branding_name/link to CL This allows the transfer of the branding name and URL settings to the rendering of the secondary header. This enables a customization of the branding that is shown sitewide, along with the URL it links to. --- templates/layout/region--header.html.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/layout/region--header.html.twig b/templates/layout/region--header.html.twig index e58b65ce5..33fde5cb7 100644 --- a/templates/layout/region--header.html.twig +++ b/templates/layout/region--header.html.twig @@ -19,6 +19,8 @@ site_header__accent: getThemeSetting('header_accent'), site_header__menu__variation: getHeaderSetting('header_variation'), site_header__nav_position: getHeaderSetting('nav_position'), + site_header__branding_name: getHeaderSetting('site_wide_branding_name'), + site_header__branding_link: getHeaderSetting('site_wide_branding_link'), drupal_utility_nav: elements.utility_navigation, } %} {% block site_header__primary_nav %} From 8520d3beca7e2ff647768afd58fd71b3efd18ad3 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Tue, 30 Jul 2024 15:57:51 -0400 Subject: [PATCH 07/13] fix(YSP-495): default null values to previous defaults --- templates/layout/region--header.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/layout/region--header.html.twig b/templates/layout/region--header.html.twig index 33fde5cb7..0a79117ba 100644 --- a/templates/layout/region--header.html.twig +++ b/templates/layout/region--header.html.twig @@ -19,8 +19,8 @@ site_header__accent: getThemeSetting('header_accent'), site_header__menu__variation: getHeaderSetting('header_variation'), site_header__nav_position: getHeaderSetting('nav_position'), - site_header__branding_name: getHeaderSetting('site_wide_branding_name'), - site_header__branding_link: getHeaderSetting('site_wide_branding_link'), + site_header__branding_name: getHeaderSetting('site_wide_branding_name')|default('Yale University'), + site_header__branding_link: getHeaderSetting('site_wide_branding_link')|default('https://www.yale.edu'), drupal_utility_nav: elements.utility_navigation, } %} {% block site_header__primary_nav %} From cf4e8d1cc5aadb5952a8184b139f78afe2fd2d87 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Tue, 16 Jul 2024 10:43:40 -0400 Subject: [PATCH 08/13] chore(YSP-581): only for multidev --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6720c1296..1d06ea8c0 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,5 @@ A Drupal theme for the YaleSites platform # Contributing + See [CONTRIBUTING.md](CONTRIBUTING.md) for details on contributing to this theme. From 3eb68e1a856b11527c82f38b3baec186d4e4cfd6 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Tue, 16 Jul 2024 11:11:05 -0400 Subject: [PATCH 09/13] fix(YSP-581): explicitly pass menu variables --- templates/layout/region--header.html.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/layout/region--header.html.twig b/templates/layout/region--header.html.twig index e58b65ce5..11f976e6b 100644 --- a/templates/layout/region--header.html.twig +++ b/templates/layout/region--header.html.twig @@ -20,6 +20,8 @@ site_header__menu__variation: getHeaderSetting('header_variation'), site_header__nav_position: getHeaderSetting('nav_position'), drupal_utility_nav: elements.utility_navigation, + primary_nav__items: primary_nav__items, + utility_nav__items: utility_nav__items, } %} {% block site_header__primary_nav %} {{ elements.main_navigation }} From 1f4b0b711d06c8da602c4537e3cd1cb54083306c Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Tue, 23 Jul 2024 11:37:44 -0400 Subject: [PATCH 10/13] fix(YSP-581): remove conditional hamburger --- templates/layout/region--header.html.twig | 7 ------- 1 file changed, 7 deletions(-) diff --git a/templates/layout/region--header.html.twig b/templates/layout/region--header.html.twig index 11f976e6b..98bc963f7 100644 --- a/templates/layout/region--header.html.twig +++ b/templates/layout/region--header.html.twig @@ -5,13 +5,6 @@ {% set site_header__site_name_is_image = getHeaderSetting('site_name_image') %} {% endif %} -{# set primary and utility nave variables equal to their drupal elements #} -{# this is necessary to pass the truthiness of the elements to the site-header organism #} -{# which will set {% set site_header__hamburger = 'yes' %} #} -{# and render the hamburger icon if the primary nav exists or the ulitity nav exists #} -{% set primary_nav__items = elements.main_navigation.content['#items'] %} -{% set utility_nav__items = elements.utility_navigation.content['#items'] %} - {% embed "@organisms/site-header/yds-site-header.twig" with { site_name: site_name, site_header__border_thickness: '8', From beab9a718d29e852a72fb4541c89ffc4c6406112 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Thu, 1 Aug 2024 15:23:57 -0400 Subject: [PATCH 11/13] Revert "chore(YSP-581): only for multidev" This reverts commit cf4e8d1cc5aadb5952a8184b139f78afe2fd2d87. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 1d06ea8c0..6720c1296 100644 --- a/README.md +++ b/README.md @@ -3,5 +3,4 @@ A Drupal theme for the YaleSites platform # Contributing - See [CONTRIBUTING.md](CONTRIBUTING.md) for details on contributing to this theme. From d19069d3370147416e34cf5e7e10060110f1f95f Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Thu, 1 Aug 2024 15:24:50 -0400 Subject: [PATCH 12/13] fix(YSP-581): remove passing of menu items --- templates/layout/region--header.html.twig | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/layout/region--header.html.twig b/templates/layout/region--header.html.twig index 98bc963f7..888eb0dce 100644 --- a/templates/layout/region--header.html.twig +++ b/templates/layout/region--header.html.twig @@ -13,8 +13,6 @@ site_header__menu__variation: getHeaderSetting('header_variation'), site_header__nav_position: getHeaderSetting('nav_position'), drupal_utility_nav: elements.utility_navigation, - primary_nav__items: primary_nav__items, - utility_nav__items: utility_nav__items, } %} {% block site_header__primary_nav %} {{ elements.main_navigation }} From bf4c9357ed7be7970c88b41ade3bba60e5926af2 Mon Sep 17 00:00:00 2001 From: Vincent Massaro Date: Tue, 6 Aug 2024 11:52:02 -0400 Subject: [PATCH 13/13] feat: update component-library-twig to 1.44.0 --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 04ba72d02..f67bd7b8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2068,9 +2068,9 @@ "inBundle": true }, "node_modules/@yalesites-org/component-library-twig": { - "version": "1.43.2", - "resolved": "https://npm.pkg.github.com/download/@yalesites-org/component-library-twig/1.43.2/dfffcc967d8c9a30fcabd4baadd09a1f4f9eda50", - "integrity": "sha512-EVPS1cEAtpV+Jz9wtoARnzXjYiqjlSpLdbLytB1WnHNEp3G5ardNn78f2ogGh3+DPqdM3XOD5G97GcZe1hwLdQ==", + "version": "1.44.0", + "resolved": "https://npm.pkg.github.com/download/@yalesites-org/component-library-twig/1.44.0/1e87e839f5edbfebce72ab6d13a4dbaa4c194f3c", + "integrity": "sha512-HJEkqRUJiuNrqGYG3PT2+SARy0iXoX4E0lXxm667V/I8mYhDPwVE8zpCXqJ1gqerx2mS36l7Row7nDZ8QDRKMQ==", "hasInstallScript": true, "inBundle": true, "dependencies": { @@ -22730,9 +22730,9 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "@yalesites-org/component-library-twig": { - "version": "1.43.2", - "resolved": "https://npm.pkg.github.com/download/@yalesites-org/component-library-twig/1.43.2/dfffcc967d8c9a30fcabd4baadd09a1f4f9eda50", - "integrity": "sha512-EVPS1cEAtpV+Jz9wtoARnzXjYiqjlSpLdbLytB1WnHNEp3G5ardNn78f2ogGh3+DPqdM3XOD5G97GcZe1hwLdQ==", + "version": "1.44.0", + "resolved": "https://npm.pkg.github.com/download/@yalesites-org/component-library-twig/1.44.0/1e87e839f5edbfebce72ab6d13a4dbaa4c194f3c", + "integrity": "sha512-HJEkqRUJiuNrqGYG3PT2+SARy0iXoX4E0lXxm667V/I8mYhDPwVE8zpCXqJ1gqerx2mS36l7Row7nDZ8QDRKMQ==", "requires": { "@storybook/storybook-deployer": "^2.8.11", "@yalesites-org/tokens": "^1.20.0",