Skip to content
Snippets Groups Projects
Commit c31ce9fd authored by Stephen Mustgrave's avatar Stephen Mustgrave
Browse files

Resolve #3493064 "Convert to include"

parent 8325dfd8
No related branches found
No related tags found
1 merge request!10Resolve #3493064 "Convert to include"
Pipeline #364960 passed
Showing
with 87 additions and 87 deletions
......@@ -47,10 +47,10 @@
]
%}
{{ pattern('accordion_item', {
'attributes': attributes.addClass(classes),
'heading_level': heading_level|default(2),
'opened': default_open == paragraph.id() ? true : false,
'title': content.field_accordion_item_title,
'content': content.field_accordion_item_body
}) }}
{{ include('ui_suite_uswds:accordion_item', {
attributes: attributes.addClass(classes),
heading_level: heading_level|default(2),
opened: default_open == paragraph.id() ? true : false,
title: content.field_accordion_item_title,
content: content.field_accordion_item_body
}, with_context = false) }}
......@@ -47,9 +47,9 @@
]
%}
{{ pattern('accordion', {
'attributes': attributes.addClass(classes),
'bordered': content.field_accordion_bordered.0['#markup'] == 'On' ? true : false,
'multiselect': content.field_accordion_multiselect.0['#markup'] == 'On' ? true : false,
'content': content.field_accordion_sections
}) }}
{{ include('ui_suite_uswds:accordion', {
attributes: attributes.addClass(classes),
bordered: content.field_accordion_bordered.0['#markup'] == 'On' ? true : false,
multiselect: content.field_accordion_multiselect.0['#markup'] == 'On' ? true : false,
content: content.field_accordion_sections
}, with_context = false) }}
......@@ -47,11 +47,11 @@
]
%}
{{ pattern('alert', {
'attributes': attributes.addClass(classes),
'variant': content.field_alert_type.0['#markup'],
'slim': content.field_alert_slim.0['#markup'] == 'On' ? true : false,
'no_icon': content.field_alert_no_icon.0['#markup'] == 'On' ? true : false,
'heading': content.field_alert_heading,
'message': content.field_alert_body
}) }}
{{ include('ui_suite_uswds:alert', {
attributes: attributes.addClass(classes),
variant: content.field_alert_type.0['#markup'],
slim: content.field_alert_slim.0['#markup'] == 'On' ? true : false,
no_icon: content.field_alert_no_icon.0['#markup'] == 'On' ? true : false,
heading: content.field_alert_heading,
message: content.field_alert_body
}, with_context = false) }}
......@@ -52,19 +52,19 @@
content.field_card_breakpoint_tablet.0 ? 'tablet:grid-col-' ~ content.field_card_breakpoint_tablet.0['#markup'],
] %}
{{ pattern('card', {
'attributes': attributes.addClass(classes|merge(breakpoint_attributes)),
'list': is_group,
'variant': content.field_card_make_flag.0['#markup'] == 'On' ? 'flag' : 'default',
'header': content.field_card_header,
'image': content.field_card_media,
'content': content.field_card_content,
'footer': content.field_card_footer,
'footer_url': content.field_card_footer_url.0 ? content.field_card_footer_url.0['#url']|render : '',
'header_first': content.field_card_header_first.0['#markup'] == 'On' ? true : false,
'header_exdent': content.field_card_header_extent.0['#markup'] == 'On' ? true : false,
'media_inset': content.field_card_media_inset.0['#markup'] == 'On' ? true : false,
'media_exdent': content.field_card_media_exdent.0['#markup'] == 'On' ? true : false,
'body_exdent': content.body_exdent.0['#markup'] == 'On' ? true : false,
'footer_exdent': content.field_card_footer_exdent.0['#markup'] == 'On' ? true : false,
}) }}
{{ include('ui_suite_uswds:card', {
attributes: attributes.addClass(classes),
variant: content.field_card_make_flag.0['#markup'] == 'On' ? 'flag' : 'default',
list: is_group,
header: content.field_card_header,
image: content.field_card_media,
content: content.field_card_content,
footer: content.field_card_footer,
footer_url: content.field_card_footer_url.0 ? content.field_card_footer_url.0['#url']|render : '',
header_first: content.field_card_header_first.0['#markup'] == 'On' ? true : false,
header_exdent: content.field_card_header_extent.0['#markup'] == 'On' ? true : false,
media_inset: content.field_card_media_inset.0['#markup'] == 'On' ? true : false,
media_exdent: content.field_card_media_exdent.0['#markup'] == 'On' ? true : false,
body_exdent: content.body_exdent.0['#markup'] == 'On' ? true : false,
footer_exdent: content.field_card_footer_exdent.0['#markup'] == 'On' ? true : false,
}, with_context = false) }}
......@@ -47,10 +47,10 @@
]
%}
{{ pattern('collection_item', {
'attributes': attributes.addClass(classes),
'header_text': content.field_collection_item_header,
'content': content.field_collection_item_content,
'meta_items_list': content.field_collection_item_meta_items,
'meta_items_tags': content.field_collection_items_meta_tags,
}) }}
{{ include('ui_suite_uswds:collection_item', {
attributes: attributes.addClass(classes),
header_text: content.field_collection_item_header,
content: content.field_collection_item_content,
meta_items_list: content.field_collection_item_meta_items,
meta_items_tags: content.field_collection_items_meta_tags,
}, with_context = false) }}
......@@ -50,10 +50,10 @@
{{ attach_library('ui_suite_uswds_paragraphs_hero/hero_banner') }}
{{ pattern('hero', {
'attributes': attributes.addClass(classes).setAttribute('style', 'background-image: url(' ~ content.field_hero_background_image.0['#markup'] ~ ')'),
'title_alt': content.field_hero_title_callout,
'title': content.field_hero_title,
'aria-label': content.field_hero_title|render|striptags|trim|lower,
'body': content.field_hero_body,
}) }}
{{ include('ui_suite_uswds:hero', {
attributes: attributes.addClass(classes).setAttribute('style', 'background-image: url(' ~ content.field_hero_background_image.0['#markup'] ~ ')'),
title_alt: content.field_hero_title_callout,
title: content.field_hero_title,
aria_label: content.field_hero_title|render|striptags|trim|lower,
body: content.field_hero_body,
}, with_context = false) }}
......@@ -47,9 +47,9 @@
]
%}
{{ pattern('icon_list_item', {
'attributes': attributes.addClass(classes),
'icon_name': content.field_icon_list_item_icon.0 ? content.field_icon_list_item_icon.0['#markup'] : '',
'header': content.field_icon_list_item_header|render,
'body': content.field_icon_list_item_content
}) }}
{{ include('ui_suite_uswds:icon_list_item', {
attributes: attributes.addClass(classes),
icon_name: content.field_icon_list_item_icon.0 ? content.field_icon_list_item_icon.0['#markup'] : '',
header: content.field_icon_list_item_header|render,
body: content.field_icon_list_item_content
}, with_context = false) }}
......@@ -47,15 +47,15 @@
]
%}
{{ pattern('modal', {
'attributes': attributes.addClass(classes),
'variant': content.field_modal_large.0['#markup'] == 'On' ? 'lg' : 'default',
'button_text': content.field_modal_button_text|render,
'forced_action': content.field_modal_forced_action.0['#markup'] == 'On' ? true : false,
'yes_text': content.field_modal_yes_text|render,
'yes_url': content.field_modal_yes_link.0 ? content.field_modal_yes_link.0['#url']|render : '',
'no_text': content.field_modal_no_text|render,
'no_url': content.field_modal_no_link.0 ? content.field_modal_no_link.0['#url']|render : '',
'title': content.field_modal_title|render,
'body': content.field_modal_content
}) }}
{{ include('ui_suite_uswds:modal', {
attributes: attributes.addClass(classes),
attributes: content.field_modal_large.0['#markup'] == 'On' ? 'lg' : 'default',
button_text: content.field_modal_button_text|render,
forced_action: content.field_modal_forced_action.0['#markup'] == 'On' ? true : false,
yes_text: content.field_modal_yes_text|render,
yes_url: content.field_modal_yes_link.0 ? content.field_modal_yes_link.0['#url']|render : '',
no_text: content.field_modal_no_text|render,
no_url: content.field_modal_no_link.0 ? content.field_modal_no_link.0['#url']|render : '',
title: content.field_modal_title|render,
body: content.field_modal_content
}, with_context = false) }}
......@@ -47,8 +47,8 @@
]
%}
{{ pattern('process_list_item', {
'attributes': attributes.addClass(classes),
'header': content.field_process_list_item_header,
'body': content.field_process_list_item_content
}) }}
{{ include('ui_suite_uswds:process_list_item', {
attributes: attributes.addClass(classes),
header: content.field_process_list_item_header,
body: content.field_process_list_item_content
}, with_context = false) }}
......@@ -57,11 +57,11 @@
{% set in_progress = in_progress|merge([item]) %}
{% endfor %}
{{ pattern('step_indicator', {
'attributes': attributes.addClass(classes),
'variant': content.field_step_indicator_variant.0['#markup'],
'heading_level': content.field_step_indicator_heading_lvl.0 ?? 2,
'label': content.field_step_indicator_label,
'completed_items': completed,
'in_progress_items': in_progress
}) }}
{{ include('ui_suite_uswds:step_indicator', {
attributes: attributes.addClass(classes),
variant: content.field_step_indicator_variant.0['#markup'],
heading_level: content.field_step_indicator_heading_lvl.0 ?? 2,
label: content.field_step_indicator_label,
completed_items: completed,
in_progress_items: in_progress
}, with_context = false) }}
......@@ -47,8 +47,8 @@
]
%}
{{ pattern('summary_box', {
'attributes': attributes.addClass(classes),
'summary_heading': content.field_summary_box_heading ? content.field_summary_box_heading.0 : '',
'content': content.field_summary_box_content,
}) }}
{{ include('ui_suite_uswds:summary_box', {
attributes: attributes.addClass(classes),
summary_heading: content.field_summary_box_heading ? content.field_summary_box_heading.0 : '',
content: content.field_summary_box_content,
}, with_context = false) }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment