diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c81fd36..fc940e6db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ 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 +* 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..282989faa 100644 --- a/packages/larva-patterns/modules/article-kicker/article-kicker.twig +++ b/packages/larva-patterns/modules/article-kicker/article-kicker.twig @@ -2,11 +2,15 @@ {% if article_kicker_url %} {% endif %} - {% if c_svg %} - {% include "@larva/components/c-svg/c-svg.twig" with c_svg %} + {% if article_kicker_image_markup %} + {{ article_kicker_image_markup }} {% else %} - {{ article_kicker_text }} - {% endif %} + {% if c_svg %} + {% include "@larva/components/c-svg/c-svg.twig" with c_svg %} + {% else %} + {{ article_kicker_text }} + {% endif %} + {% endif %} {% if article_kicker_url %} {% endif %}