From c0f27e908e2cccd31e0ed820e352395fbdf5317d Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 18 Nov 2024 11:20:08 -0500 Subject: [PATCH 1/3] larva-patterns - Adds new kicker image support to the article kicker module. --- CHANGELOG.md | 3 +++ README.md | 1 + .../modules/article-kicker/article-kicker.prototype.js | 1 + .../modules/article-kicker/article-kicker.twig | 6 ++++-- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c81fd36..abbcc7f4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unpublished Changes +## 1.67.0 11-16-2024 +* larva-patterns - Adds new kicker image support to the article kicker module. + ## 1.66.4 11-05-2024 * Remove Helvetica Fallback Fonts from body font in Rollingstone 2022 diff --git a/README.md b/README.md index 1366c5db4..824eb1529 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ important information. Clone this repository then, from the root, run the following commands: ``` +nvm use sh scripts/install-dependencies.sh ``` diff --git a/packages/larva-patterns/modules/article-kicker/article-kicker.prototype.js b/packages/larva-patterns/modules/article-kicker/article-kicker.prototype.js index 283b9fc15..748406d33 100644 --- a/packages/larva-patterns/modules/article-kicker/article-kicker.prototype.js +++ b/packages/larva-patterns/modules/article-kicker/article-kicker.prototype.js @@ -3,4 +3,5 @@ module.exports = { article_kicker_text: 'Article Kicker', article_kicker_url: '#', article_kicker_link_classes: '', + article_kicker_image_markup: '', }; diff --git a/packages/larva-patterns/modules/article-kicker/article-kicker.twig b/packages/larva-patterns/modules/article-kicker/article-kicker.twig index 6c9f63762..da5db2548 100644 --- a/packages/larva-patterns/modules/article-kicker/article-kicker.twig +++ b/packages/larva-patterns/modules/article-kicker/article-kicker.twig @@ -2,11 +2,13 @@ {% if article_kicker_url %} {% endif %} - {% if c_svg %} + {% if article_kicker_image_markup %} + {{ article_kicker_image_markup }} + {% elseif c_svg %} {% include "@larva/components/c-svg/c-svg.twig" with c_svg %} {% else %} {{ article_kicker_text }} - {% endif %} + {% endif %} {% if article_kicker_url %} {% endif %} From 46e0e932af98d34f8282fbe72d74a7255520ed6b Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 18 Nov 2024 14:03:41 -0500 Subject: [PATCH 2/3] unpublished changelog update --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abbcc7f4d..fc940e6db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unpublished Changes - -## 1.67.0 11-16-2024 * larva-patterns - Adds new kicker image support to the article kicker module. ## 1.66.4 11-05-2024 From b6260365117ffe8055f19bac54546f2ebaca4b6e Mon Sep 17 00:00:00 2001 From: Marc Garcia Date: Mon, 18 Nov 2024 14:44:05 -0500 Subject: [PATCH 3/3] Fix twig conditional to work with our parser. --- .../modules/article-kicker/article-kicker.twig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/larva-patterns/modules/article-kicker/article-kicker.twig b/packages/larva-patterns/modules/article-kicker/article-kicker.twig index da5db2548..282989faa 100644 --- a/packages/larva-patterns/modules/article-kicker/article-kicker.twig +++ b/packages/larva-patterns/modules/article-kicker/article-kicker.twig @@ -4,10 +4,12 @@ {% endif %} {% if article_kicker_image_markup %} {{ article_kicker_image_markup }} - {% elseif c_svg %} - {% include "@larva/components/c-svg/c-svg.twig" with c_svg %} {% else %} - {{ article_kicker_text }} + {% if c_svg %} + {% include "@larva/components/c-svg/c-svg.twig" with c_svg %} + {% else %} + {{ article_kicker_text }} + {% endif %} {% endif %} {% if article_kicker_url %}