diff --git a/package.json b/package.json index 244e85900..ff22fa31f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vanilla-framework", - "version": "4.16.0", + "version": "4.17.0", "author": { "email": "webteam@canonical.com", "name": "Canonical Webteam" @@ -53,7 +53,8 @@ "_index.scss", "/scss", "!/scss/docs", - "!/scss/standalone" + "!/scss/standalone", + "/templates/_macros" ], "devDependencies": { "@canonical/cookie-policy": "3.6.4", diff --git a/releases.yml b/releases.yml index 263bb89c6..ecf20eace 100644 --- a/releases.yml +++ b/releases.yml @@ -1,3 +1,13 @@ +- version: 4.17.0 + features: + - component: Tiered list + url: /docs/patterns/tiered-list + status: Updated + notes: The tiered list pattern macro has been published. + - component: Hero + url: /docs/patterns/hero + status: Updated + notes: The hero pattern macro has been published. - version: 4.16.0 features: - component: CTA Block / Borderless diff --git a/templates/_macros/hero.jinja b/templates/_macros/vf_hero.jinja similarity index 95% rename from templates/_macros/hero.jinja rename to templates/_macros/vf_hero.jinja index e8637c414..6f2f8169d 100644 --- a/templates/_macros/hero.jinja +++ b/templates/_macros/vf_hero.jinja @@ -1,6 +1,6 @@ # Params -# title: Hero title text (required) -# subtitle: Hero subtitle text +# title_text: Hero title text (required) +# subtitle_text: Hero subtitle text # layout: layout of hero section. Options are '50/50', '50/50-full-width-image', '75/25', '25/75', 'fallback' # is_split_on_medium: whether the layout is split on tablet in 50/50, 25/75, and 75/25 layouts. # If false, the layout is stacked on tablet. @@ -10,13 +10,13 @@ # cta: call-to-action block below the description # image: slot for image content # signpost_image: slot for signpost (left column) image content in 25/75 layout. Required for 25/75 layout. -{% macro hero( - title, - subtitle='', +{% macro vf_hero( + title_text, + subtitle_text='', layout="fallback", is_split_on_medium=false ) -%} - {% set has_subtitle = subtitle|trim|length > 0 %} + {% set has_subtitle = subtitle_text|trim|length > 0 %} {% set description_content = caller('description') %} {% set has_description = description_content|trim|length > 0 %} {% set cta_content = caller('cta') %} @@ -79,14 +79,14 @@ {#- Only add a class attribute if needed -#}
h1
title text |
-| Subtitle | h2
subtitle text |
-| Description | p
description text |
-| Call to action block | [Call to action block](/docs/patterns/cta-block) beneath the description |
-| Image | Main hero visual |
+| Element | Description |
+| -------------------- | ------------------------------------------------------------- |
+| Title (**required**) | Title text (to be placed in `h1` heading) |
+| Subtitle | Subtitle text (using `h2` style) |
+| Description | Description text (one or more paragraphs) |
+| Call to action block | [CTA block](/docs/patterns/cta-block) beneath the description |
+| Image | Main hero visual |
## 50/50
@@ -33,7 +33,7 @@ This is useful when your hero contents, especially your image, are not suitably
This makes your hero somewhat safer to use, as it helps to avoid awkward content sizing on medium screens, making all
content stack vertically.
-