From dce6a149d97918538dc9a233bc9acf657bb86302 Mon Sep 17 00:00:00 2001 From: Stuart Robson Date: Fri, 27 Nov 2020 11:22:11 +0000 Subject: [PATCH] adds option to make the heading a link using nunjucks and yaml (#1264) --- components/vf-hero/CHANGELOG.md | 5 +++++ components/vf-hero/README.md | 2 ++ components/vf-hero/vf-hero.config.yml | 3 ++- components/vf-hero/vf-hero.njk | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/components/vf-hero/CHANGELOG.md b/components/vf-hero/CHANGELOG.md index 4b30da47b2..7c08cec7c5 100755 --- a/components/vf-hero/CHANGELOG.md +++ b/components/vf-hero/CHANGELOG.md @@ -1,3 +1,8 @@ +### 2.0.1 + +* adds the option to add an url to `vf-hero__heading` with nunjucks/yaml. + * gives the element a classname. + ### 2.0.0 * introduces new naming convention for design variants. diff --git a/components/vf-hero/README.md b/components/vf-hero/README.md index 663486886a..dd488d9fd5 100755 --- a/components/vf-hero/README.md +++ b/components/vf-hero/README.md @@ -8,6 +8,8 @@ The `vf-hero` component is to be used as a visual queue and page header. The `vf ## Usage +This component should not be used inside of `vf-content`. + Currently there are now two use cases for the `vf-hero` component: diff --git a/components/vf-hero/vf-hero.config.yml b/components/vf-hero/vf-hero.config.yml index 61bf229544..d7194bc0c9 100755 --- a/components/vf-hero/vf-hero.config.yml +++ b/components/vf-hero/vf-hero.config.yml @@ -50,7 +50,8 @@ variants: - name: default block hidden: false context: - vf_hero_heading: Strategy & Communications + vf_hero_heading: Strategy & Communications + vf_hero_heading_href: JavaScript:Void(0); vf_hero_subheading: Chromosome structure and dynamics vf_hero_heading_additional: VF Hamburg | Structural Biology vf_hero_image_size: auto 28.5rem diff --git a/components/vf-hero/vf-hero.njk b/components/vf-hero/vf-hero.njk index 3b184a47ed..a704fc315e 100755 --- a/components/vf-hero/vf-hero.njk +++ b/components/vf-hero/vf-hero.njk @@ -42,7 +42,9 @@
{% if vf_hero_heading %}

+ {% if vf_hero_heading_href %}{% endif %} {{ vf_hero_heading }} + {% if vf_hero_heading_href %}{% endif %} {%- if vf_hero_heading_additional -%} {{ vf_hero_heading_additional }} {%- endif -%}