diff --git a/package.json b/package.json index 9e1b99414..43cea8fe6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vanilla-framework", - "version": "4.17.1", + "version": "4.18.0", "author": { "email": "webteam@canonical.com", "name": "Canonical Webteam" diff --git a/releases.yml b/releases.yml index 2cda0edd9..132cb53dd 100644 --- a/releases.yml +++ b/releases.yml @@ -1,3 +1,9 @@ +- version: 4.18.0 + features: + - component: Rich vertical list + url: /docs/patterns/rich-list-vertical + status: New + notes: We've introduced a new rich list pattern. - version: 4.17.0 features: - component: Tiered list @@ -50,10 +56,6 @@ url: /docs/patterns/list-tree status: Updated notes: We've updated the list tree to be more accessible and modern. We recommend you update your list tree markup and scripts to match the new structure. However, the legacy structure is still supported. - - component: Rich list / Vertical - url: /docs/patterns/rich-list#vertical - status: New - notes: We've introduced a new rich list pattern. - version: 4.15.0 features: - component: CTA Block diff --git a/side-navigation.yaml b/side-navigation.yaml index f549536b7..e08fb5044 100644 --- a/side-navigation.yaml +++ b/side-navigation.yaml @@ -113,8 +113,8 @@ subheadings: - title: Hero url: /docs/patterns/hero - - title: Rich list - url: /docs/patterns/rich-list + - title: Rich list (vertical) + url: /docs/patterns/rich-list-vertical - title: Tiered list url: /docs/patterns/tiered-list - heading: Utilities diff --git a/templates/_macros/vf_rich-vertical-list.jinja b/templates/_macros/vf_rich-vertical-list.jinja index 231d82094..6c1aa3d01 100644 --- a/templates/_macros/vf_rich-vertical-list.jinja +++ b/templates/_macros/vf_rich-vertical-list.jinja @@ -5,7 +5,7 @@ # Slots # description: Paragraph-style description content # logo_section Logo section block -# list_item_[1-15]: List item content, assumed to be li.p-list__item +# list_item_[1-7]: List item content, assumed to be li.p-list__item # image (required) {% macro vf_rich_vertical_list( title_text, @@ -20,7 +20,7 @@ {% set has_cta = cta_content|trim|length > 0 %} {% set has_list = caller('list_item_1')|trim|length > 0 %} {% set image_content = caller('image') %} - {% set max_list_items = 15 %} + {% set max_list_items = 7 %} {% set list_item_tick_style=list_item_tick_style|trim|lower %} {% if list_item_tick_style|length > 0 and list_item_tick_style not in ['bullet', 'tick', 'number'] %} @@ -54,13 +54,13 @@ {% endif %} {%- macro _text_column_contents(list_items) %} - + {#- Mandatory title -#}
@@ -14,7 +15,7 @@
{%- endif -%} {%- if slot == 'logo_section' -%} - {% include 'docs/examples/patterns/rich-list/vertical/_logo-section.html' %} + {% include 'docs/examples/patterns/rich-list-vertical/_logo-section.html' %} {%- endif -%} {%- if slot == 'list_item_1' -%} No mandatory subscriptions for Ubuntu @@ -42,17 +43,18 @@ {%- if slot == 'list_item_7' -%} TCO analysis of Open Infra {%- endif -%} - {%- if slot == 'list_item_8' -%} - 451 study on private/public cloud cost - {%- endif -%} {%- if slot == 'cta' -%} Learn more Contact us › {%- endif -%} {%- if slot == 'image' -%} -@@ -15,7 +14,7 @@
{%- endif -%} {%- if slot == 'logo_section' -%} - {% include 'docs/examples/patterns/rich-list/vertical/_logo-section.html' %} + {% include 'docs/examples/patterns/rich-list-vertical/_logo-section.html' %} {%- endif -%} {%- if slot == 'list_item_1' -%} No mandatory subscriptions for Ubuntu @@ -43,17 +42,18 @@ {%- if slot == 'list_item_7' -%} TCO analysis of Open Infra {%- endif -%} - {%- if slot == 'list_item_8' -%} - 451 study on private/public cloud cost - {%- endif -%} {%- if slot == 'cta' -%} Learn more Contact us › {%- endif -%} {%- if slot == 'image' -%} -H2
title text. |
+| Logo section | A [logo section](/docs/patterns/logo-section) component. |
+| Description | p
description text. |
+| List | A [divided list](/docs/patterns/lists#ticked-with-horizontal-divider) with up to 7 list items. |
+| Call to action block | [Call to action block](/docs/patterns/cta-block) beneath the description. |
+| Image (**required**) | Main list visual. |
+
+
+
+## Flipped
+
+The horizontal ordering of the rich list columns can also be reversed, creating a flipped layout.
+
+
+
+## Minimal
+
+The only mandatory elements in the rich vertical list are the title and the image, and one of the other (optional) elements.
+
+
+
+## Jinja Macro
+
+The `vf_rich_vertical_list` Jinja macro can be used to generate a rich vertical list pattern. The API for the macro is shown below.
+
+### Parameters
+
+Name | +Required? | +Type | +Default | +Description | +
---|---|---|---|---|
+ title_text
+ |
+ + Yes + | +
+ string
+ |
+
+ N/A
+ |
+ + Title of the rich vertical list. + | +
+ list_item_tick_style
+ |
+ + No + | +
+ One of: + 'bullet' ,+ 'tick' ,+ 'number'
+ |
+
+ N/A
+ |
+ + Type of list item tick styling. + | +
+ is_flipped
+ |
+ + No + | +
+ boolean
+ |
+
+ false
+ |
+ + Whether the list items are flipped so the image is on the left and the text is on the right. + | +
Name | +Required? | +Description | +
---|---|---|
+ description
+ |
+ + No + | ++ Paragraph-style description of the list. + | +
+ logo_section
+ |
+ + No + | ++ A logo section component. + | +
+ list_item_[1-7]
+ |
+ + No + | ++ A divided list item. + | +
+ cta
+ |
+ + No + | ++ Contents of a CTA block to display beneath the list. + | +
+ image
+ |
+ + Yes + | ++ Main list visual. + | +
h2
title text |
-| Logo section | Up to 8 [logo section](/docs/patterns/logo-section) logos |
-| Description | p
description text |
-| List | A [divided list](/docs/patterns/lists#ticked-with-horizontal-divider) with up to 15 list items |
-| Call to action block | [Call to action block](/docs/patterns/cta-block) beneath the description |
-| Image (**required**) | Main list visual |
-
-
-
-### Flipped
-
-To flip the image and text, simply reverse the ordering of the columns in the markup.
-
-
-
-### Minimal
-
-The only mandatory elements in the rich vertical list are the title and the image, and one of the other (optional) elements.
-
-
-
-## Import
-
-Since Patterns leverage many other parts of Vanilla in their composition and content, we
-recommend [importing the entirety of Vanilla](/docs#install) for full support.