From ff0f229349278049d7f326d033b7e71ddb34c006 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Thu, 18 Jul 2024 19:11:17 +0300 Subject: [PATCH 01/27] YOR-33: Add tags/categories fields templates for the 'card' and 'list-item' node view modes --- atomic.theme | 14 ++++++++++++++ .../field--node--field-category--card.html.twig | 1 + ...ield--node--field-category--list-item.html.twig | 1 + .../field/field--node--field-tags--card.html.twig | 1 + .../field--node--field-tags--list-item.html.twig | 1 + 5 files changed, 18 insertions(+) create mode 100644 templates/field/field--node--field-category--card.html.twig create mode 100644 templates/field/field--node--field-category--list-item.html.twig create mode 100644 templates/field/field--node--field-tags--card.html.twig create mode 100644 templates/field/field--node--field-tags--list-item.html.twig diff --git a/atomic.theme b/atomic.theme index 0d6632237..c7027564f 100644 --- a/atomic.theme +++ b/atomic.theme @@ -91,3 +91,17 @@ function atomic_preprocess_paragraph__accordion_item(&$variables) { } } } + +/** + * Implements hook_theme_suggestions_HOOK_alter() for field templates. + */ +function atomic_theme_suggestions_field_alter(array &$suggestions, array $variables) { + // Check if the field is attached to a node. + if ($variables['element']['#entity_type'] == 'node') { + $view_mode = $variables['element']['#view_mode']; + $field_name = $variables['element']['#field_name']; + + // Add a theme suggestion for the field based on the parent node's view mode. + $suggestions[] = 'field__' . $variables['element']['#entity_type'] . '__' . $field_name . '__' . $view_mode; + } +} diff --git a/templates/field/field--node--field-category--card.html.twig b/templates/field/field--node--field-category--card.html.twig new file mode 100644 index 000000000..cf2942b92 --- /dev/null +++ b/templates/field/field--node--field-category--card.html.twig @@ -0,0 +1 @@ +{% extends "@atomic/field/field--node--field-category--list-item.html.twig" %} diff --git a/templates/field/field--node--field-category--list-item.html.twig b/templates/field/field--node--field-category--list-item.html.twig new file mode 100644 index 000000000..2bf81b1be --- /dev/null +++ b/templates/field/field--node--field-category--list-item.html.twig @@ -0,0 +1 @@ +{% include "@atoms/lists/taxonomy/yds-categories-list.twig" %} diff --git a/templates/field/field--node--field-tags--card.html.twig b/templates/field/field--node--field-tags--card.html.twig new file mode 100644 index 000000000..8174b14dc --- /dev/null +++ b/templates/field/field--node--field-tags--card.html.twig @@ -0,0 +1 @@ +{% extends "@atomic/field/field--node--field-tags--list-item.html.twig" %} diff --git a/templates/field/field--node--field-tags--list-item.html.twig b/templates/field/field--node--field-tags--list-item.html.twig new file mode 100644 index 000000000..c9e083ea5 --- /dev/null +++ b/templates/field/field--node--field-tags--list-item.html.twig @@ -0,0 +1 @@ +{% include "@atoms/lists/taxonomy/yds-tags-list.twig" %} From 88a4aa773ffe2d465e67a97993af375d9d827022 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Thu, 18 Jul 2024 19:12:11 +0300 Subject: [PATCH 02/27] YOR-33: Update CT node templates with tags/categories blocks --- templates/node/node--event--card.html.twig | 11 +++++++++++ templates/node/node--event--list-item.html.twig | 11 +++++++++++ templates/node/node--page--card.html.twig | 11 +++++++++++ templates/node/node--page--list-item.html.twig | 11 +++++++++++ templates/node/node--post--card.html.twig | 11 +++++++++++ templates/node/node--post--list-item.html.twig | 11 +++++++++++ templates/node/node--profile--card.html.twig | 9 +++++++++ templates/node/node--profile--list-item.html.twig | 9 +++++++++ 8 files changed, 84 insertions(+) diff --git a/templates/node/node--event--card.html.twig b/templates/node/node--event--card.html.twig index 5b7e0fac8..b50d7fb25 100644 --- a/templates/node/node--event--card.html.twig +++ b/templates/node/node--event--card.html.twig @@ -46,7 +46,18 @@ reference_card__cta_secondary__content: 'Add to Calendar', reference_card__cta_secondary__href: ics_url, reference_card__image_aria: heading[0]['#context'].value, + show_categories: show_categories, + show_tags: show_tags, } %} + + {% block reference_card__tags %} + {{ content.field_tags }} + {% endblock %} + + {% block reference_card__categories %} + {{ content.field_category }} + {% endblock %} + {% block reference_card__image %} {% if localist_image_url %} {% include "@atoms/images/image/_responsive-image.twig" with { diff --git a/templates/node/node--event--list-item.html.twig b/templates/node/node--event--list-item.html.twig index ac780a87e..70cc12427 100644 --- a/templates/node/node--event--list-item.html.twig +++ b/templates/node/node--event--list-item.html.twig @@ -42,7 +42,18 @@ reference_card__cta_secondary__content: 'Add to Calendar', reference_card__cta_secondary__href: ics_url, reference_card__image_aria: heading[0]['#context'].value, + show_categories: show_categories, + show_tags: show_tags, } %} + + {% block reference_card__tags %} + {{ content.field_tags }} + {% endblock %} + + {% block reference_card__categories %} + {{ content.field_category }} + {% endblock %} + {% block reference_card__image %} {% if localist_image_url %} {% include "@atoms/images/image/_responsive-image.twig" with { diff --git a/templates/node/node--page--card.html.twig b/templates/node/node--page--card.html.twig index c3e554ed5..85284e486 100644 --- a/templates/node/node--page--card.html.twig +++ b/templates/node/node--page--card.html.twig @@ -9,7 +9,18 @@ reference_card__snippet: content.field_teaser_text, reference_card__image: 'true', reference_card__image_aria: heading[0]['#context'].value, + show_categories: show_categories, + show_tags: show_tags, } %} + + {% block reference_card__tags %} + {{ content.field_tags }} + {% endblock %} + + {% block reference_card__categories %} + {{ content.field_category }} + {% endblock %} + {% block reference_card__image %} {% if content.field_teaser_media[0] %} diff --git a/templates/node/node--page--list-item.html.twig b/templates/node/node--page--list-item.html.twig index 3f4c5d70c..25349053c 100644 --- a/templates/node/node--page--list-item.html.twig +++ b/templates/node/node--page--list-item.html.twig @@ -7,7 +7,18 @@ reference_card__url: url, reference_card__snippet: content.field_teaser_text, reference_card__image_aria: heading[0]['#context'].value, + show_categories: show_categories, + show_tags: show_tags, } %} + + {% block reference_card__tags %} + {{ content.field_tags }} + {% endblock %} + + {% block reference_card__categories %} + {{ content.field_category }} + {% endblock %} + {% block reference_card__image %} {% if content.field_teaser_media[0] %} diff --git a/templates/node/node--post--card.html.twig b/templates/node/node--post--card.html.twig index f0a26f8e4..e15882867 100644 --- a/templates/node/node--post--card.html.twig +++ b/templates/node/node--post--card.html.twig @@ -15,7 +15,18 @@ reference_card__url: url, reference_card__snippet: content.field_teaser_text, reference_card__image_aria: heading[0]['#context'].value, + show_categories: show_categories, + show_tags: show_tags, } %} + + {% block reference_card__tags %} + {{ content.field_tags }} + {% endblock %} + + {% block reference_card__categories %} + {{ content.field_category }} + {% endblock %} + {% block reference_card__image %} {% if content.field_teaser_media[0] %} diff --git a/templates/node/node--post--list-item.html.twig b/templates/node/node--post--list-item.html.twig index 6f3bfd6f4..46a21fa59 100644 --- a/templates/node/node--post--list-item.html.twig +++ b/templates/node/node--post--list-item.html.twig @@ -15,7 +15,18 @@ reference_card__url: url, reference_card__snippet: content.field_teaser_text, reference_card__image_aria: heading[0]['#context'].value, + show_categories: show_categories, + show_tags: show_tags, } %} + + {% block reference_card__tags %} + {{ content.field_tags }} + {% endblock %} + + {% block reference_card__categories %} + {{ content.field_category }} + {% endblock %} + {% block reference_card__image %} {% if content.field_teaser_media[0] %} diff --git a/templates/node/node--profile--card.html.twig b/templates/node/node--profile--card.html.twig index b6c679a00..5ee0177ed 100644 --- a/templates/node/node--profile--card.html.twig +++ b/templates/node/node--profile--card.html.twig @@ -9,7 +9,16 @@ reference_card__snippet: content.field_subtitle, reference_card__image: 'true', reference_card__image_aria: heading[0]['#context'].value, + show_categories: show_categories, + show_tags: show_tags, } %} + + {% block reference_card__tags %} + {{ content.field_tags }} + {% endblock %} + {% block reference_card__categories %} + {{ content.field_category }} + {% endblock %} {% block reference_card__image %} {% if content.field_teaser_media[0] %} {{ content.field_teaser_media }} diff --git a/templates/node/node--profile--list-item.html.twig b/templates/node/node--profile--list-item.html.twig index c6cf1eac1..cfd4c2ebb 100644 --- a/templates/node/node--profile--list-item.html.twig +++ b/templates/node/node--profile--list-item.html.twig @@ -8,7 +8,16 @@ reference_card__url: url, reference_card__snippet: content.field_subtitle, reference_card__image_aria: heading[0]['#context'].value, + show_categories: show_categories, + show_tags: show_tags, } %} + + {% block reference_card__tags %} + {{ content.field_tags }} + {% endblock %} + {% block reference_card__categories %} + {{ content.field_category }} + {% endblock %} {% block reference_card__image %} {% if content.field_teaser_media[0] %} {{ content.field_teaser_media }} From 9191d6afc00d71360e34cb80bc059834de5f8213 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Fri, 19 Jul 2024 12:59:31 +0300 Subject: [PATCH 03/27] YOR-33: Provide 'url' value for the node URL in the field template --- templates/field/field--node--field-tags--list-item.html.twig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/field/field--node--field-tags--list-item.html.twig b/templates/field/field--node--field-tags--list-item.html.twig index c9e083ea5..ab04a42fd 100644 --- a/templates/field/field--node--field-tags--list-item.html.twig +++ b/templates/field/field--node--field-tags--list-item.html.twig @@ -1 +1,3 @@ -{% include "@atoms/lists/taxonomy/yds-tags-list.twig" %} +{% include "@atoms/lists/taxonomy/yds-tags-list.twig" with { + url: url('entity.node.canonical', {'node': element['#object'].id}), +}%} From 3da985472374cab555df34e6a8ba295ae93cb193 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Fri, 19 Jul 2024 16:11:25 +0300 Subject: [PATCH 04/27] YOR-33: Update templates for the Profile CT, that has a different name for the category taxonomy field --- .../field/field--node--field-affiliation--card.html.twig | 1 + .../field/field--node--field-affiliation--list-item.html.twig | 1 + templates/node/node--profile--card.html.twig | 2 +- templates/node/node--profile--list-item.html.twig | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 templates/field/field--node--field-affiliation--card.html.twig create mode 100644 templates/field/field--node--field-affiliation--list-item.html.twig diff --git a/templates/field/field--node--field-affiliation--card.html.twig b/templates/field/field--node--field-affiliation--card.html.twig new file mode 100644 index 000000000..cf2942b92 --- /dev/null +++ b/templates/field/field--node--field-affiliation--card.html.twig @@ -0,0 +1 @@ +{% extends "@atomic/field/field--node--field-category--list-item.html.twig" %} diff --git a/templates/field/field--node--field-affiliation--list-item.html.twig b/templates/field/field--node--field-affiliation--list-item.html.twig new file mode 100644 index 000000000..cf2942b92 --- /dev/null +++ b/templates/field/field--node--field-affiliation--list-item.html.twig @@ -0,0 +1 @@ +{% extends "@atomic/field/field--node--field-category--list-item.html.twig" %} diff --git a/templates/node/node--profile--card.html.twig b/templates/node/node--profile--card.html.twig index 5ee0177ed..70374e19e 100644 --- a/templates/node/node--profile--card.html.twig +++ b/templates/node/node--profile--card.html.twig @@ -17,7 +17,7 @@ {{ content.field_tags }} {% endblock %} {% block reference_card__categories %} - {{ content.field_category }} + {{ content.field_affiliation }} {% endblock %} {% block reference_card__image %} {% if content.field_teaser_media[0] %} diff --git a/templates/node/node--profile--list-item.html.twig b/templates/node/node--profile--list-item.html.twig index cfd4c2ebb..0b9c64537 100644 --- a/templates/node/node--profile--list-item.html.twig +++ b/templates/node/node--profile--list-item.html.twig @@ -8,7 +8,7 @@ reference_card__url: url, reference_card__snippet: content.field_subtitle, reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, + show_categories: 1, show_tags: show_tags, } %} @@ -16,7 +16,7 @@ {{ content.field_tags }} {% endblock %} {% block reference_card__categories %} - {{ content.field_category }} + {{ content.field_affiliation }} {% endblock %} {% block reference_card__image %} {% if content.field_teaser_media[0] %} From b04bc830d2a8358fd534fc432c0b6b8abfd18ce1 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Fri, 19 Jul 2024 16:13:50 +0300 Subject: [PATCH 05/27] YOR-33: Update templates for the Profile CT, that has a different name for the category taxonomy field --- templates/node/node--profile--list-item.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/node/node--profile--list-item.html.twig b/templates/node/node--profile--list-item.html.twig index 0b9c64537..4371eb73d 100644 --- a/templates/node/node--profile--list-item.html.twig +++ b/templates/node/node--profile--list-item.html.twig @@ -8,7 +8,7 @@ reference_card__url: url, reference_card__snippet: content.field_subtitle, reference_card__image_aria: heading[0]['#context'].value, - show_categories: 1, + show_categories: show_categories, show_tags: show_tags, } %} From ab95ec40777b21628ad29c49a5a60fd2b42d19b4 Mon Sep 17 00:00:00 2001 From: Constantin Marjina Date: Tue, 23 Jul 2024 15:08:48 +0300 Subject: [PATCH 06/27] YOR-33: Provide real values for show_tags and show_categories configurations --- templates/node/node--event--card.html.twig | 4 ++-- templates/node/node--event--list-item.html.twig | 4 ++-- templates/node/node--page--card.html.twig | 4 ++-- templates/node/node--page--list-item.html.twig | 4 ++-- templates/node/node--post--card.html.twig | 4 ++-- templates/node/node--post--list-item.html.twig | 4 ++-- templates/node/node--profile--card.html.twig | 4 ++-- templates/node/node--profile--list-item.html.twig | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/templates/node/node--event--card.html.twig b/templates/node/node--event--card.html.twig index b50d7fb25..9388bccd2 100644 --- a/templates/node/node--event--card.html.twig +++ b/templates/node/node--event--card.html.twig @@ -46,8 +46,8 @@ reference_card__cta_secondary__content: 'Add to Calendar', reference_card__cta_secondary__href: ics_url, reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, - show_tags: show_tags, + show_categories: node.show_categories, + show_tags: node.show_tags, } %} {% block reference_card__tags %} diff --git a/templates/node/node--event--list-item.html.twig b/templates/node/node--event--list-item.html.twig index 70cc12427..edf862b63 100644 --- a/templates/node/node--event--list-item.html.twig +++ b/templates/node/node--event--list-item.html.twig @@ -42,8 +42,8 @@ reference_card__cta_secondary__content: 'Add to Calendar', reference_card__cta_secondary__href: ics_url, reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, - show_tags: show_tags, + show_categories: node.show_categories, + show_tags: node.show_tags, } %} {% block reference_card__tags %} diff --git a/templates/node/node--page--card.html.twig b/templates/node/node--page--card.html.twig index 85284e486..ca6f4046b 100644 --- a/templates/node/node--page--card.html.twig +++ b/templates/node/node--page--card.html.twig @@ -9,8 +9,8 @@ reference_card__snippet: content.field_teaser_text, reference_card__image: 'true', reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, - show_tags: show_tags, + show_categories: node.show_categories, + show_tags: node.show_tags, } %} {% block reference_card__tags %} diff --git a/templates/node/node--page--list-item.html.twig b/templates/node/node--page--list-item.html.twig index 25349053c..0eca1954a 100644 --- a/templates/node/node--page--list-item.html.twig +++ b/templates/node/node--page--list-item.html.twig @@ -7,8 +7,8 @@ reference_card__url: url, reference_card__snippet: content.field_teaser_text, reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, - show_tags: show_tags, + show_categories: node.show_categories, + show_tags: node.show_tags, } %} {% block reference_card__tags %} diff --git a/templates/node/node--post--card.html.twig b/templates/node/node--post--card.html.twig index e15882867..3eae2d189 100644 --- a/templates/node/node--post--card.html.twig +++ b/templates/node/node--post--card.html.twig @@ -15,8 +15,8 @@ reference_card__url: url, reference_card__snippet: content.field_teaser_text, reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, - show_tags: show_tags, + show_categories: node.show_categories, + show_tags: node.show_tags, } %} {% block reference_card__tags %} diff --git a/templates/node/node--post--list-item.html.twig b/templates/node/node--post--list-item.html.twig index 46a21fa59..fef7fdcc9 100644 --- a/templates/node/node--post--list-item.html.twig +++ b/templates/node/node--post--list-item.html.twig @@ -15,8 +15,8 @@ reference_card__url: url, reference_card__snippet: content.field_teaser_text, reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, - show_tags: show_tags, + show_categories: node.show_categories, + show_tags: node.show_tags, } %} {% block reference_card__tags %} diff --git a/templates/node/node--profile--card.html.twig b/templates/node/node--profile--card.html.twig index 70374e19e..4b8224151 100644 --- a/templates/node/node--profile--card.html.twig +++ b/templates/node/node--profile--card.html.twig @@ -9,8 +9,8 @@ reference_card__snippet: content.field_subtitle, reference_card__image: 'true', reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, - show_tags: show_tags, + show_categories: node.show_categories, + show_tags: node.show_tags, } %} {% block reference_card__tags %} diff --git a/templates/node/node--profile--list-item.html.twig b/templates/node/node--profile--list-item.html.twig index 4371eb73d..a892c17d0 100644 --- a/templates/node/node--profile--list-item.html.twig +++ b/templates/node/node--profile--list-item.html.twig @@ -8,8 +8,8 @@ reference_card__url: url, reference_card__snippet: content.field_subtitle, reference_card__image_aria: heading[0]['#context'].value, - show_categories: show_categories, - show_tags: show_tags, + show_categories: node.show_categories, + show_tags: node.show_tags, } %} {% block reference_card__tags %} From be0b87886dceef866f965f3bf6a638c1355d9027 Mon Sep 17 00:00:00 2001 From: Ion Eftodii Date: Tue, 30 Jul 2024 13:34:57 +0300 Subject: [PATCH 07/27] YOR-8: Remove the exposed filters from views template --- ...iew--views-basic-scaffold-events.html.twig | 36 +++++++++++++++++++ ...views-view--views-basic-scaffold.html.twig | 1 - 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 templates/views/views-view--views-basic-scaffold-events.html.twig diff --git a/templates/views/views-view--views-basic-scaffold-events.html.twig b/templates/views/views-view--views-basic-scaffold-events.html.twig new file mode 100644 index 000000000..c589c24b2 --- /dev/null +++ b/templates/views/views-view--views-basic-scaffold-events.html.twig @@ -0,0 +1,36 @@ +{# @todo refactor how views basic is rendered. #} +{% set type = view.rowPlugin.options['view_mode'] == 'list_item' ? 'list' : 'grid' %} + +{% set dom_id_class = dom_id ? 'js-view-dom-id-' ~ dom_id %} + +
+ {{ title_prefix }} + {{ title }} + {{ title_suffix }} + + {% if header %} +
+ {{ header }} +
+ {% endif %} + + {{ attachment_before }} + + {% if rows -%} + {{ rows }} + {% elseif empty -%} + {{ empty }} + {% endif %} + {{ pager }} + + {{ attachment_after }} + {{ more }} + + {% if footer %} +
+ {{ footer }} +
+ {% endif %} + + {{ feed_icons }} +
diff --git a/templates/views/views-view--views-basic-scaffold.html.twig b/templates/views/views-view--views-basic-scaffold.html.twig index da6d3a579..c589c24b2 100644 --- a/templates/views/views-view--views-basic-scaffold.html.twig +++ b/templates/views/views-view--views-basic-scaffold.html.twig @@ -14,7 +14,6 @@ {% endif %} - {{ exposed }} {{ attachment_before }} {% if rows -%} From 0dbc250b8410a04fe4a231afa8bb497277ab0436 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Mon, 22 Jul 2024 15:13:30 +0300 Subject: [PATCH 08/27] YOR-29: Provide field_link_two data in the Content Spotlight templates --- .../block--inline-block--content-spotlight-portrait.html.twig | 2 ++ .../block--inline-block--content-spotlight.html.twig | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/block/layout-builder/block--inline-block--content-spotlight-portrait.html.twig b/templates/block/layout-builder/block--inline-block--content-spotlight-portrait.html.twig index ccca18c6e..2f53ebffb 100644 --- a/templates/block/layout-builder/block--inline-block--content-spotlight-portrait.html.twig +++ b/templates/block/layout-builder/block--inline-block--content-spotlight-portrait.html.twig @@ -9,6 +9,8 @@ content_spotlight_portrait__text: content.field_text, content_spotlight_portrait__link__content: content.field_link.0['#title'], content_spotlight_portrait__link__url: content.field_link.0['#url_title'], + content_spotlight_portrait__link_two__content: content.field_link_two.0['#title'], + content_spotlight_portrait__link_two__url: content.field_link_two.0['#url_title'], content_spotlight_portrait__style: content.field_style_variation.0['#markup'], content_spotlight_portrait__position: content.field_style_position.0['#markup'], content_spotlight_portrait__theme: content.field_style_color.0['#markup'], diff --git a/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig b/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig index d61fea94e..542f552ad 100644 --- a/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig +++ b/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig @@ -8,7 +8,9 @@ text_with_image__subheading: content.field_subheading.0, text_with_image__text: content.field_text, text_with_image__link__content: content.field_link.0['#title'], - text_with_image__link__url: content.field_link.0['#url_title'], + text_with_image__link_two__url: content.field_link.0['#url_title'], + text_with_image__link_two__content: content.field_link_two.0['#title'], + text_with_image__link__url: content.field_link_two.0['#url_title'], text_with_image__focus: content.field_style_variation.0['#markup'], text_with_image__position: content.field_style_position.0['#markup'], text_with_image__width: content.field_style_width.0['#markup'], From ab373fd426f38dfd27cb7cf2666f2a3ce95a1fb7 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Wed, 31 Jul 2024 16:18:34 +0300 Subject: [PATCH 09/27] YOR-29: Fix variables mapping for the link and link_two fields --- .../block--inline-block--content-spotlight.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig b/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig index 542f552ad..5693b09b1 100644 --- a/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig +++ b/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig @@ -8,9 +8,9 @@ text_with_image__subheading: content.field_subheading.0, text_with_image__text: content.field_text, text_with_image__link__content: content.field_link.0['#title'], - text_with_image__link_two__url: content.field_link.0['#url_title'], + text_with_image__link__url: content.field_link.0['#url_title'], text_with_image__link_two__content: content.field_link_two.0['#title'], - text_with_image__link__url: content.field_link_two.0['#url_title'], + text_with_image__link_two__url: content.field_link_two.0['#url_title'], text_with_image__focus: content.field_style_variation.0['#markup'], text_with_image__position: content.field_style_position.0['#markup'], text_with_image__width: content.field_style_width.0['#markup'], From dadf7f0c74116e7fbbcb9ec8f67bfa36b88952e9 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Mon, 8 Jul 2024 12:41:53 +0300 Subject: [PATCH 10/27] YOR-27: Conditional rendering of the heading_links field in the View block --- .../layout-builder/block--inline-block--view.html.twig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/block/layout-builder/block--inline-block--view.html.twig b/templates/block/layout-builder/block--inline-block--view.html.twig index 016896840..cd3f888ea 100644 --- a/templates/block/layout-builder/block--inline-block--view.html.twig +++ b/templates/block/layout-builder/block--inline-block--view.html.twig @@ -17,13 +17,18 @@ class: bem(view__base_class, view__modifiers), } %} {% endif %} - +
{% embed "@organisms/component-wrapper/yds-component-wrapper.twig" with { component_wrapper__width: component_wrapper__width|default('site'), component_wrapper__label: content.field_heading.0 ? content.field_heading : '', }%} {% block component_wrapper_inner %} + {% if content.field_heading_links %} +
+ {{ content.field_heading_links|children }} +
+ {% endif %} {% if content.field_view_params %} {{ content.field_view_params }} {% endif %} From b7eae6b5481e323d13990f2a8d2ddc34918a9c1a Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Mon, 8 Jul 2024 17:53:11 +0300 Subject: [PATCH 11/27] YOR-27: Add CTA Link parargaph template --- templates/paragraphs/paragraph--cta-link.html.twig | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 templates/paragraphs/paragraph--cta-link.html.twig diff --git a/templates/paragraphs/paragraph--cta-link.html.twig b/templates/paragraphs/paragraph--cta-link.html.twig new file mode 100644 index 000000000..6dd7c7c6c --- /dev/null +++ b/templates/paragraphs/paragraph--cta-link.html.twig @@ -0,0 +1,4 @@ +{% include "@atoms/controls/text-link/yds-text-link.twig" with { + link__content: content.field_link.0['#title'], + link__url: content.field_link.0['#url_title'], +} %} From b73d442cf70bd229d839cec4fb55333bbe8395c4 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Thu, 11 Jul 2024 12:43:06 +0300 Subject: [PATCH 12/27] YOR-27: Update field_heading_links checking condition --- .../block/layout-builder/block--inline-block--view.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/block/layout-builder/block--inline-block--view.html.twig b/templates/block/layout-builder/block--inline-block--view.html.twig index cd3f888ea..abab5f68c 100644 --- a/templates/block/layout-builder/block--inline-block--view.html.twig +++ b/templates/block/layout-builder/block--inline-block--view.html.twig @@ -24,7 +24,7 @@ component_wrapper__label: content.field_heading.0 ? content.field_heading : '', }%} {% block component_wrapper_inner %} - {% if content.field_heading_links %} + {% if content.field_heading_links.0 %}
{{ content.field_heading_links|children }}
From 6132c9bcfef1b097e707543eaa799372566f0ce6 Mon Sep 17 00:00:00 2001 From: Mihail Bejenari Date: Fri, 9 Aug 2024 15:29:06 +0300 Subject: [PATCH 13/27] YOR-8: Rewrite templates to form and form-element --- .../form/form--views--views-basic-scaffold-events.html.twig | 1 + templates/form/form--views--views-basic-scaffold.html.twig | 1 + ...ement--views--views-basic-scaffold--block-1--search.html.twig | 1 + ...views--views-basic-scaffold-events--block-1--search.html.twig | 1 + 4 files changed, 4 insertions(+) create mode 100644 templates/form/form--views--views-basic-scaffold-events.html.twig create mode 100644 templates/form/form--views--views-basic-scaffold.html.twig create mode 100644 templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig create mode 100644 templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig diff --git a/templates/form/form--views--views-basic-scaffold-events.html.twig b/templates/form/form--views--views-basic-scaffold-events.html.twig new file mode 100644 index 000000000..5eab5cd4d --- /dev/null +++ b/templates/form/form--views--views-basic-scaffold-events.html.twig @@ -0,0 +1 @@ +{% include '@organisms/forms/form-desktop-inline/form-desktop-inline.twig' %} diff --git a/templates/form/form--views--views-basic-scaffold.html.twig b/templates/form/form--views--views-basic-scaffold.html.twig new file mode 100644 index 000000000..5eab5cd4d --- /dev/null +++ b/templates/form/form--views--views-basic-scaffold.html.twig @@ -0,0 +1 @@ +{% include '@organisms/forms/form-desktop-inline/form-desktop-inline.twig' %} diff --git a/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig b/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig new file mode 100644 index 000000000..e74329a18 --- /dev/null +++ b/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig @@ -0,0 +1 @@ +{% include '@organisms/forms/textfields/form-element--search.twig' %} diff --git a/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig b/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig new file mode 100644 index 000000000..e74329a18 --- /dev/null +++ b/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig @@ -0,0 +1 @@ +{% include '@organisms/forms/textfields/form-element--search.twig' %} From ffe4b0fe96eec105f05064f286604ec9caecc997 Mon Sep 17 00:00:00 2001 From: Mihail Bejenari Date: Fri, 9 Aug 2024 15:43:38 +0300 Subject: [PATCH 14/27] YOR-8: include Fix path --- ...ment--views--views-basic-scaffold--block-1--search.html.twig | 2 +- ...iews--views-basic-scaffold-events--block-1--search.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig b/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig index e74329a18..b9cb14833 100644 --- a/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig +++ b/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig @@ -1 +1 @@ -{% include '@organisms/forms/textfields/form-element--search.twig' %} +{% include '@atoms/forms/textfields/form-element--search.twig' %} diff --git a/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig b/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig index e74329a18..b9cb14833 100644 --- a/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig +++ b/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig @@ -1 +1 @@ -{% include '@organisms/forms/textfields/form-element--search.twig' %} +{% include '@atoms/forms/textfields/form-element--search.twig' %} From 9cbcd64cdfcbd793e81c43e8f02d9af952bae70f Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Fri, 12 Jul 2024 11:35:56 +0300 Subject: [PATCH 15/27] YOR-6: Update search form markup: include search icon, add content type filter form item --- templates/form/ys-search-form.html.twig | 28 +++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/templates/form/ys-search-form.html.twig b/templates/form/ys-search-form.html.twig index 1d037f89c..986b677a9 100644 --- a/templates/form/ys-search-form.html.twig +++ b/templates/form/ys-search-form.html.twig @@ -1,7 +1,31 @@
-
- + + {% if show_content_type_filter %} +
+ +
+ +
+
+ {% endif %}
{% include '@atoms/controls/cta/yds-cta.twig' with { control__element: 'input', From 9d0519d4b1bd9c4a1118de1d97605cce14bb3fdd Mon Sep 17 00:00:00 2001 From: Constantin Marjina Date: Fri, 26 Jul 2024 15:03:23 +0300 Subject: [PATCH 16/27] YOR-6: Add default values to search form fields --- templates/form/ys-search-form.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/form/ys-search-form.html.twig b/templates/form/ys-search-form.html.twig index 986b677a9..ccbb61ea9 100644 --- a/templates/form/ys-search-form.html.twig +++ b/templates/form/ys-search-form.html.twig @@ -9,7 +9,7 @@ icon__decorative: true, } %} -
{% if show_content_type_filter %} @@ -20,7 +20,7 @@ class="form-select form-item__select"> {% for key, value in content_type_list %} - + {% endfor %}
From ca2f2ebf144014d1067423b9bf663d99e5e1422a Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Fri, 16 Aug 2024 19:02:16 +0300 Subject: [PATCH 17/27] YOR-8: Add 'chosen-select' theme library, update form templates --- atomic.libraries.yml | 7 +++++ ...ews--views-basic-scaffold-events.html.twig | 2 +- ...orm--views--views-basic-scaffold.html.twig | 26 ++++++++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/atomic.libraries.yml b/atomic.libraries.yml index eb167d053..0b0d93d13 100644 --- a/atomic.libraries.yml +++ b/atomic.libraries.yml @@ -87,3 +87,10 @@ event-localist: js: node_modules/@yalesites-org/component-library-twig/dist/js/02-molecules/meta/event-meta/event-meta-localist.js: {} +chosen-select: + js: + node_modules/@yalesites-org/component-library-twig/dist/js/01-atoms/forms/select/yds-select.js: + {} + dependencies: + - core/once + - libraries/chosen diff --git a/templates/form/form--views--views-basic-scaffold-events.html.twig b/templates/form/form--views--views-basic-scaffold-events.html.twig index 5eab5cd4d..52f63b09a 100644 --- a/templates/form/form--views--views-basic-scaffold-events.html.twig +++ b/templates/form/form--views--views-basic-scaffold-events.html.twig @@ -1 +1 @@ -{% include '@organisms/forms/form-desktop-inline/form-desktop-inline.twig' %} +{% extends "@atomic/form/form--views--views-basic-scaffold.html.twig" %} diff --git a/templates/form/form--views--views-basic-scaffold.html.twig b/templates/form/form--views--views-basic-scaffold.html.twig index 5eab5cd4d..3aa1267c1 100644 --- a/templates/form/form--views--views-basic-scaffold.html.twig +++ b/templates/form/form--views--views-basic-scaffold.html.twig @@ -1 +1,25 @@ -{% include '@organisms/forms/form-desktop-inline/form-desktop-inline.twig' %} +{# +/** + * @file + * Theme override for a 'form' element. + * + * Available variables + * - attributes: A list of HTML attributes for the wrapper element. + * - children: The child elements of the form. + * + * @see template_preprocess_form() + */ +#} + +{{ attach_library('atomic/chosen-select') }} + +{% + set classes = [ + 'ys-filter-form', + 'ys-filter-form--scaffold', +] +%} + + + {{ children }} + From 89ea8a150b0f16920a5ec8b5d3a96835ae112272 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Fri, 16 Aug 2024 19:03:44 +0300 Subject: [PATCH 18/27] YOR-8: Delete unused form elements templates --- ...ement--views--views-basic-scaffold--block-1--search.html.twig | 1 - ...views--views-basic-scaffold-events--block-1--search.html.twig | 1 - 2 files changed, 2 deletions(-) delete mode 100644 templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig delete mode 100644 templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig diff --git a/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig b/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig deleted file mode 100644 index b9cb14833..000000000 --- a/templates/form/form-element--views--views-basic-scaffold--block-1--search.html.twig +++ /dev/null @@ -1 +0,0 @@ -{% include '@atoms/forms/textfields/form-element--search.twig' %} diff --git a/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig b/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig deleted file mode 100644 index b9cb14833..000000000 --- a/templates/form/form-element--views--views-basic-scaffold-events--block-1--search.html.twig +++ /dev/null @@ -1 +0,0 @@ -{% include '@atoms/forms/textfields/form-element--search.twig' %} From 33c2a4b5c8cf50ed6a5c54011b9e6ce6a238d556 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Thu, 29 Aug 2024 13:11:38 +0300 Subject: [PATCH 19/27] YOR-6: Add content type label to the search result view mode node template --- templates/node/node--search-result.html.twig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/node/node--search-result.html.twig b/templates/node/node--search-result.html.twig index caa2ce2a5..9305dc946 100644 --- a/templates/node/node--search-result.html.twig +++ b/templates/node/node--search-result.html.twig @@ -4,5 +4,6 @@ search_result__title: label, search_result__url: url, search_result__highlighted: content.search_api_excerpt, - search_result__teaser: content.field_teaser_text + search_result__teaser: content.field_teaser_text, + search_result__content_type: node.bundle|clean_class } %} From 8c4eb3d1ed25e8c0f23cb15d2fb127ff418a2618 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Wed, 4 Sep 2024 12:54:46 -0400 Subject: [PATCH 20/27] feat(YSP-641): add image banner --- ...lock--inline-block--image-banner.html.twig | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 templates/block/layout-builder/block--inline-block--image-banner.html.twig diff --git a/templates/block/layout-builder/block--inline-block--image-banner.html.twig b/templates/block/layout-builder/block--inline-block--image-banner.html.twig new file mode 100644 index 000000000..66449f68a --- /dev/null +++ b/templates/block/layout-builder/block--inline-block--image-banner.html.twig @@ -0,0 +1,22 @@ +{% extends "@atomic/block/layout-builder/_layout-builder-block-template.twig" %} + +{% block content %} + + {% embed "@molecules/banner/image/yds-image.twig" with { + grand_hero__content__background: content.field_style_color.0['#markup'], + grand_hero__width: 'site', + } %} + {% block grand_hero__video %} + {% if paragraph.field_media.entity.field_media_video_file.entity.uri.value is not empty %} + {% set grand_hero__video = true %} + {{ content.field_media }} + {% endif %} + {% endblock %} + + {% block grand_hero__image %} + {% if paragraph.field_media.entity.field_media_video_file.entity.uri.value is empty %} + {{ content.field_media }} + {% endif %} + {% endblock %} + {% endembed %} +{% endblock %} From c39ae02ff61d2e6f74df59659c5b52ae67b077b9 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Thu, 5 Sep 2024 10:25:29 -0400 Subject: [PATCH 21/27] fix(YSP-641): update naming --- .../block--inline-block--image-banner.html.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/block/layout-builder/block--inline-block--image-banner.html.twig b/templates/block/layout-builder/block--inline-block--image-banner.html.twig index 66449f68a..ead22fcfd 100644 --- a/templates/block/layout-builder/block--inline-block--image-banner.html.twig +++ b/templates/block/layout-builder/block--inline-block--image-banner.html.twig @@ -6,14 +6,14 @@ grand_hero__content__background: content.field_style_color.0['#markup'], grand_hero__width: 'site', } %} - {% block grand_hero__video %} + {% block image_banner__video %} {% if paragraph.field_media.entity.field_media_video_file.entity.uri.value is not empty %} - {% set grand_hero__video = true %} + {% set image_banner__video = true %} {{ content.field_media }} {% endif %} {% endblock %} - {% block grand_hero__image %} + {% block banner__image %} {% if paragraph.field_media.entity.field_media_video_file.entity.uri.value is empty %} {{ content.field_media }} {% endif %} From bcb9b4a65541f3280e60c3baab2dddef05e97d8f Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Mon, 9 Sep 2024 10:19:54 -0400 Subject: [PATCH 22/27] feat(YSP-641): use the component --- .../block--inline-block--image-banner.html.twig | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/block/layout-builder/block--inline-block--image-banner.html.twig b/templates/block/layout-builder/block--inline-block--image-banner.html.twig index ead22fcfd..bf58154f1 100644 --- a/templates/block/layout-builder/block--inline-block--image-banner.html.twig +++ b/templates/block/layout-builder/block--inline-block--image-banner.html.twig @@ -1,20 +1,21 @@ {% extends "@atomic/block/layout-builder/_layout-builder-block-template.twig" %} -{% block content %} +{% set image_banner__video = paragraph.field_media.entity.field_media_video_file.entity.uri.value is not empty %} - {% embed "@molecules/banner/image/yds-image.twig" with { - grand_hero__content__background: content.field_style_color.0['#markup'], - grand_hero__width: 'site', +{% block content %} + {% embed "@molecules/banner/image/yds-image-banner.twig" with { + image_banner__video: image_banner__video, + image_banner__content_background: image_banner__content_background } %} - {% block image_banner__video %} - {% if paragraph.field_media.entity.field_media_video_file.entity.uri.value is not empty %} + {% block image_banner__video %} + {% if image_banner__video %} {% set image_banner__video = true %} {{ content.field_media }} {% endif %} {% endblock %} - {% block banner__image %} - {% if paragraph.field_media.entity.field_media_video_file.entity.uri.value is empty %} + {% block image_banner__image %} + {% if not image_banner__video %} {{ content.field_media }} {% endif %} {% endblock %} From 2e0049d297e6ca6ec6389285ab3a2bf173d86649 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Tue, 10 Sep 2024 13:14:29 -0400 Subject: [PATCH 23/27] feat(YSP-662): wire up alignment setting for video --- .../layout-builder/block--inline-block--video.html.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/block/layout-builder/block--inline-block--video.html.twig b/templates/block/layout-builder/block--inline-block--video.html.twig index d98f8aa2a..2ac55a70b 100644 --- a/templates/block/layout-builder/block--inline-block--video.html.twig +++ b/templates/block/layout-builder/block--inline-block--video.html.twig @@ -1,13 +1,13 @@ {% extends "@atomic/block/layout-builder/_layout-builder-block-template.twig" %} +{% set video__width = "site" %} +{% set video__alignment = content.field_style_alignment.0['#markup']|default('left') %} + {% block content %} {% if parentNode == 'post' or parentNode == 'event' %} {% set video__width = "content" %} {% set video__alignment = "center" %} - {% else %} - {% set video__width = "site" %} - {% set video__alignment = "left" %} {% endif %} {% embed "@molecules/video/yds-video.twig" with { From 9ba63ab4e2178f6f40c28496cc95606eeaed2f55 Mon Sep 17 00:00:00 2001 From: Rodica Ciorba Date: Thu, 12 Sep 2024 16:51:30 +0300 Subject: [PATCH 24/27] YOR-40: Add show_thumbnail value in node templates, that use the reference card --- templates/node/node--event--card.html.twig | 1 + templates/node/node--event--list-item.html.twig | 1 + templates/node/node--page--card.html.twig | 1 + templates/node/node--page--list-item.html.twig | 1 + templates/node/node--post--card.html.twig | 1 + templates/node/node--post--list-item.html.twig | 1 + templates/node/node--profile--card.html.twig | 1 + templates/node/node--profile--list-item.html.twig | 1 + 8 files changed, 8 insertions(+) diff --git a/templates/node/node--event--card.html.twig b/templates/node/node--event--card.html.twig index 9388bccd2..eae3ecad7 100644 --- a/templates/node/node--event--card.html.twig +++ b/templates/node/node--event--card.html.twig @@ -48,6 +48,7 @@ reference_card__image_aria: heading[0]['#context'].value, show_categories: node.show_categories, show_tags: node.show_tags, + show_thumbnail: node.show_thumbnail, } %} {% block reference_card__tags %} diff --git a/templates/node/node--event--list-item.html.twig b/templates/node/node--event--list-item.html.twig index edf862b63..a53f140a2 100644 --- a/templates/node/node--event--list-item.html.twig +++ b/templates/node/node--event--list-item.html.twig @@ -44,6 +44,7 @@ reference_card__image_aria: heading[0]['#context'].value, show_categories: node.show_categories, show_tags: node.show_tags, + show_thumbnail: node.show_thumbnail, } %} {% block reference_card__tags %} diff --git a/templates/node/node--page--card.html.twig b/templates/node/node--page--card.html.twig index ca6f4046b..22c760fa9 100644 --- a/templates/node/node--page--card.html.twig +++ b/templates/node/node--page--card.html.twig @@ -11,6 +11,7 @@ reference_card__image_aria: heading[0]['#context'].value, show_categories: node.show_categories, show_tags: node.show_tags, + show_thumbnail: node.show_thumbnail, } %} {% block reference_card__tags %} diff --git a/templates/node/node--page--list-item.html.twig b/templates/node/node--page--list-item.html.twig index 0eca1954a..3c59828be 100644 --- a/templates/node/node--page--list-item.html.twig +++ b/templates/node/node--page--list-item.html.twig @@ -9,6 +9,7 @@ reference_card__image_aria: heading[0]['#context'].value, show_categories: node.show_categories, show_tags: node.show_tags, + show_thumbnail: node.show_thumbnail, } %} {% block reference_card__tags %} diff --git a/templates/node/node--post--card.html.twig b/templates/node/node--post--card.html.twig index 3eae2d189..f7fbb2f38 100644 --- a/templates/node/node--post--card.html.twig +++ b/templates/node/node--post--card.html.twig @@ -17,6 +17,7 @@ reference_card__image_aria: heading[0]['#context'].value, show_categories: node.show_categories, show_tags: node.show_tags, + show_thumbnail: node.show_thumbnail, } %} {% block reference_card__tags %} diff --git a/templates/node/node--post--list-item.html.twig b/templates/node/node--post--list-item.html.twig index fef7fdcc9..a60fb34e0 100644 --- a/templates/node/node--post--list-item.html.twig +++ b/templates/node/node--post--list-item.html.twig @@ -17,6 +17,7 @@ reference_card__image_aria: heading[0]['#context'].value, show_categories: node.show_categories, show_tags: node.show_tags, + show_thumbnail: node.show_thumbnail, } %} {% block reference_card__tags %} diff --git a/templates/node/node--profile--card.html.twig b/templates/node/node--profile--card.html.twig index 4b8224151..79a61837d 100644 --- a/templates/node/node--profile--card.html.twig +++ b/templates/node/node--profile--card.html.twig @@ -11,6 +11,7 @@ reference_card__image_aria: heading[0]['#context'].value, show_categories: node.show_categories, show_tags: node.show_tags, + show_thumbnail: node.show_thumbnail, } %} {% block reference_card__tags %} diff --git a/templates/node/node--profile--list-item.html.twig b/templates/node/node--profile--list-item.html.twig index a892c17d0..ac4ca2e95 100644 --- a/templates/node/node--profile--list-item.html.twig +++ b/templates/node/node--profile--list-item.html.twig @@ -10,6 +10,7 @@ reference_card__image_aria: heading[0]['#context'].value, show_categories: node.show_categories, show_tags: node.show_tags, + show_thumbnail: node.show_thumbnail, } %} {% block reference_card__tags %} From 5304f8e1976b216429c39f179d61682bb7b204b5 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Thu, 12 Sep 2024 10:44:48 -0400 Subject: [PATCH 25/27] feat(YSP-670): pass through heading level --- .../block--inline-block--content-spotlight-portrait.html.twig | 1 + .../block--inline-block--content-spotlight.html.twig | 1 + 2 files changed, 2 insertions(+) diff --git a/templates/block/layout-builder/block--inline-block--content-spotlight-portrait.html.twig b/templates/block/layout-builder/block--inline-block--content-spotlight-portrait.html.twig index ccca18c6e..315711d19 100644 --- a/templates/block/layout-builder/block--inline-block--content-spotlight-portrait.html.twig +++ b/templates/block/layout-builder/block--inline-block--content-spotlight-portrait.html.twig @@ -5,6 +5,7 @@ {% embed "@molecules/content-spotlight-portrait/yds-content-spotlight-portrait.twig" with { content_spotlight_portrait__heading: content.field_heading.0, + content_spotlight_portrait__heading_level: content.field_heading_level.0['#markup'], content_spotlight_portrait__subheading: content.field_subheading.0, content_spotlight_portrait__text: content.field_text, content_spotlight_portrait__link__content: content.field_link.0['#title'], diff --git a/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig b/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig index d61fea94e..6eefb7fd0 100644 --- a/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig +++ b/templates/block/layout-builder/block--inline-block--content-spotlight.html.twig @@ -5,6 +5,7 @@ {% embed "@molecules/text-with-image/yds-text-with-image.twig" with { text_with_image__heading: content.field_heading.0, + text_with_image__heading_level: content.field_heading_level.0['#markup'], text_with_image__subheading: content.field_subheading.0, text_with_image__text: content.field_text, text_with_image__link__content: content.field_link.0['#title'], From b07a17c6dc0e994fa48591669e07118b899231b6 Mon Sep 17 00:00:00 2001 From: David Blankenship Date: Thu, 12 Sep 2024 13:49:59 -0400 Subject: [PATCH 26/27] fix(YSP-670): fix top margin of first spotlights in banner --- css/layout-builder.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/css/layout-builder.css b/css/layout-builder.css index f2e5ede2e..acdbf57e9 100644 --- a/css/layout-builder.css +++ b/css/layout-builder.css @@ -33,6 +33,18 @@ would be used instead resulting in top margin of size-spacing-6. */ margin-top: 0; } +/* We allow spotlights in the banner now, but they appear a little to close to + * the top of the page. This allows us to adjust the top margin to give a + * little more space to just the first one. + */ +.main-content .layout--banner .layout__region > .text-with-image:first-child, +.main-content + .layout--banner + .layout__region + > .content-spotlight-portrait:first-child { + margin-top: var(--size-spacing-8); +} + /* The last item inside the `.main-content` area should have some space between // it and the site footer (size-spacing-12 below) - unless it is designated as // `$flush-bottom` above. Then it will have no bottom-margin separating it from From 341950c7669081db7e7b4d5f299397bd5c644d13 Mon Sep 17 00:00:00 2001 From: Vincent Massaro Date: Mon, 16 Sep 2024 22:40:25 -0400 Subject: [PATCH 27/27] feat: update component-library-twig to 1.45.0 --- package-lock.json | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 363204e92..40a6a2cc7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -438,6 +438,13 @@ "postcss-selector-parser": "^6.0.10" } }, + "node_modules/@drupal/once": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@drupal/once/-/once-1.0.1.tgz", + "integrity": "sha512-O8tQmNDBgSm3ADuFZ5OZlGxsrdsc+pEqd1NBoMpSzWwiOnWwC91tqDwnlX+mDh7sBJoJ+4vVwFh0NLUV4LPFvg==", + "inBundle": true, + "license": "GPL-2.0-or-later" + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -2068,12 +2075,13 @@ "inBundle": true }, "node_modules/@yalesites-org/component-library-twig": { - "version": "1.44.2", - "resolved": "https://npm.pkg.github.com/download/@yalesites-org/component-library-twig/1.44.2/a352874fa5ddf8b7d56e1408d16045e096ed7587", - "integrity": "sha512-+ESlETph5sDehuduDFJLkydhfpBQ0G385YczG7zBu47tBmd+n8OWaD9bWaDunVmICD9MOymQY48hwtR551fbjQ==", + "version": "1.45.0", + "resolved": "https://npm.pkg.github.com/download/@yalesites-org/component-library-twig/1.45.0/d4fe31c39d7913364cd8d6dbcde1a803ab39474e", + "integrity": "sha512-E9y4IYMgOzaf0m0Lh7/t7mamDdRaZCulR7cTnl13Fll5RRL+0CW0uz2M68woxbOB3/SvrDviTjWcmZQM1Ao9HA==", "hasInstallScript": true, "inBundle": true, "dependencies": { + "@drupal/once": "^1.0.1", "@storybook/storybook-deployer": "^2.8.11", "@yalesites-org/tokens": "^1.20.0", "add-attributes-twig-extension": "^0.1.0", @@ -2083,6 +2091,7 @@ "glob": "^7.2.0", "highlight.js": "^11.9.0", "imagemin-webpack-plugin": "^2.4.2", + "jquery": "^3.7.1", "mini-css-extract-plugin": "^1.6.2", "node-sass-glob-importer": "^5.3.2", "normalize.css": "^8.0.1", @@ -10002,6 +10011,13 @@ "node": ">=6" } }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "inBundle": true, + "license": "MIT" + }, "node_modules/js-base64": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", @@ -21515,6 +21531,11 @@ "peer": true, "requires": {} }, + "@drupal/once": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@drupal/once/-/once-1.0.1.tgz", + "integrity": "sha512-O8tQmNDBgSm3ADuFZ5OZlGxsrdsc+pEqd1NBoMpSzWwiOnWwC91tqDwnlX+mDh7sBJoJ+4vVwFh0NLUV4LPFvg==" + }, "@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -22730,10 +22751,11 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "@yalesites-org/component-library-twig": { - "version": "1.44.2", - "resolved": "https://npm.pkg.github.com/download/@yalesites-org/component-library-twig/1.44.2/a352874fa5ddf8b7d56e1408d16045e096ed7587", - "integrity": "sha512-+ESlETph5sDehuduDFJLkydhfpBQ0G385YczG7zBu47tBmd+n8OWaD9bWaDunVmICD9MOymQY48hwtR551fbjQ==", + "version": "1.45.0", + "resolved": "https://npm.pkg.github.com/download/@yalesites-org/component-library-twig/1.45.0/d4fe31c39d7913364cd8d6dbcde1a803ab39474e", + "integrity": "sha512-E9y4IYMgOzaf0m0Lh7/t7mamDdRaZCulR7cTnl13Fll5RRL+0CW0uz2M68woxbOB3/SvrDviTjWcmZQM1Ao9HA==", "requires": { + "@drupal/once": "^1.0.1", "@storybook/storybook-deployer": "^2.8.11", "@yalesites-org/tokens": "^1.20.0", "add-attributes-twig-extension": "^0.1.0", @@ -22743,6 +22765,7 @@ "glob": "^7.2.0", "highlight.js": "^11.9.0", "imagemin-webpack-plugin": "^2.4.2", + "jquery": "^3.7.1", "mini-css-extract-plugin": "^1.6.2", "node-sass-glob-importer": "^5.3.2", "normalize.css": "^8.0.1", @@ -28372,6 +28395,11 @@ "logalot": "^2.0.0" } }, + "jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + }, "js-base64": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",