|
3 | 3 | # desktop vs. 50/50 split between title/description |
4 | 4 | # is_list_full_width_on_tablet: whether list title/description each have their |
5 | 5 | # own row on tablet vs. 50/50 split between title/description |
| 6 | +# padding: Type of padding to apply. Options are "deep", "shallow", "default". Default is "default". |
6 | 7 | # Slots |
7 | 8 | # title: top-level title element |
8 | 9 | # description: top-level description element |
9 | 10 | # list_item_title_[1-25]: title element of each child list item |
10 | 11 | # list_item_description_[1-25]: description element of each child list item |
11 | 12 | # cta: CTA block element |
12 | 13 | {% macro vf_tiered_list( |
| 14 | + padding="default", |
13 | 15 | is_description_full_width_on_desktop=true, |
14 | 16 | is_list_full_width_on_tablet=true) -%} |
15 | 17 | {%- set title_content = caller('title') -%} |
16 | 18 | {%- set description_content = caller('description') -%} |
17 | 19 | {%- set has_description = description_content|trim|length > 0 -%} |
18 | 20 | {%- set cta_content = caller('cta') -%} |
19 | 21 | {%- set has_cta = cta_content|trim|length > 0 -%} |
| 22 | + {%- set padding = padding | trim -%} |
| 23 | + {%- if padding not in ["deep", "shallow", "default"] -%} |
| 24 | + {%- set padding = "default" -%} |
| 25 | + {%- endif -%} |
| 26 | + {%- if padding == "default" -%} |
| 27 | + {%- set padding_classes = "p-section" -%} |
| 28 | + {%- else -%} |
| 29 | + {%- set padding_classes = "p-section--" + padding -%} |
| 30 | + {%- endif -%} |
20 | 31 |
|
21 | | - <div class="p-section u-fixed-width"> |
| 32 | + <div class="{{ padding_classes }} u-fixed-width"> |
22 | 33 | <hr class="p-rule"> |
23 | 34 | <div class="p-section--shallow"> |
24 | 35 | {% if has_description == true -%} |
|
0 commit comments