Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 1891f4fa authored by Abel Santos's avatar Abel Santos
Browse files

OEL-1280: Add templates of paragraphs.

parent 280d105f
No related branches found
No related tags found
5 merge requests!121OEL-1421: Fix cosmetic changes.,!116OEL-1394: Merge 1.x into EPIC-1293-Project, align with new version of card:search pattern,!115Upate the EPIC-1293-project,!105EPIC: OEL-1255: Migrate paragraphs,!93[OEL-1255] OEL-1280: Copy and rename paragraph submodule from oe_bootstrap_theme
Showing
with 216 additions and 0 deletions
{#
/**
* @file
* Theme override to display the 'accordion' #type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{{ pattern('accordion', {
'items': items,
}) }}
{#
/**
* @file
* Theme override to display the 'banner' type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{% set attributes = create_attribute() %}
{% if url %}
{% set _call_to_action = {
'label': label,
'path': url,
'attributes': create_attribute({
'class': [
'btn',
variant == 'primary' ? 'btn-light' : 'btn-primary',
],
}),
'icon': {
'name': 'chevron-right',
'size': 'fluid',
'path': bcl_icon_path,
},
} %}
{% endif %}
{% set _hero = 'hero' in pattern %}
{% set _shade = 'shade' in variant %}
{{ pattern('banner', {
'variant': variant,
'title': content.field_oe_title,
'description': content.field_oe_text,
'call_to_action': _call_to_action,
'image': image.src,
'hero': _hero,
'shade': _shade,
'full_width': full_width,
'centered': 'center' in alignment,
'attributes': attributes,
}) }}
{#
/**
* @file
* Theme override to display the 'Content row' #type and 'Inpage navigation' #variant paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{{ pattern('inpage_navigation', {
'title': title,
'links': links,
'content': content.field_oe_paragraphs,
'full_layout': true,
'attributes': attributes,
}) }}
{#
/**
* @file
* Theme override to display the 'content row' type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
<div class="row">
<div class="col-md-12">
{{ content.field_oe_paragraphs }}
</div>
</div>
{#
/**
* @file
* Theme override to display the 'Description list' #type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{% if title is not empty %}
<h4 class="fw-bold mb-4">{{ title }}</h4>
{% endif %}
{{ pattern('description_list', {
'items': items,
'orientation': orientation,
}) }}
{#
/**
* @file
* Theme override to display the 'Facts and Figures' #type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{{ pattern('fact_figures', {
'title': title|default(''),
'items': items,
'columns': columns,
'link': link_more,
}) }}
{#
/**
* @file
* Theme override to display the 'links block' #type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{{ pattern('links_block', {
'orientation': orientation,
'background': background,
'title': title,
'links': links,
}) }}
{#
/**
* @file
* Theme override to display the 'List item block' type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{{ pattern('listing', {
'variant': variant,
'columns': columns,
'items': items,
'link': link,
'title': title,
}) }}
{#
/**
* @file
* Theme override to display the 'quote' type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{{ pattern('blockquote', {
'quote': content.field_oe_plain_text_long,
'attribution': content.field_oe_text,
}) }}
{#
/**
* @file
* Theme override to display the 'rich text' type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
<h4 class="fw-bold mb-4">{{ content.field_oe_title }}</h4>
{{ content|without('field_oe_title') }}
{#
/**
* @file
* Theme override to display the 'links block' #type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{{ pattern('links_block', {
'orientation': orientation,
'background': background,
'title': title,
'links': links,
}) }}
{#
/**
* @file
* Theme override to display the 'featured_media' type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{% if not paragraph.field_oe_link.isEmpty %}
{# Add cache info from the Link field to the page. #}
{% set bubble_cache = content.field_oe_link|render %}
{% endif %}
{{ pattern('featured_media', {
'embedded_media': embedded_media,
'image': image,
'ratio': ratio,
'text_position': text_position,
'title': not paragraph.field_oe_title.isEmpty ? content.field_oe_title,
'subtitle': not paragraph.field_oe_feature_media_title.isEmpty ? content.field_oe_feature_media_title,
'caption': not paragraph.field_oe_plain_text_long.isEmpty ? content.field_oe_plain_text_long,
'text': not paragraph.field_oe_text_long.isEmpty ? content.field_oe_text_long,
'link': link|default([]),
}) }}
{#
/**
* @file
* Theme override to display the 'timeline' #type paragraph.
*
* @see ./modules/contrib/paragraphs/templates/paragraph.html.twig
*/
#}
{{
pattern('timeline', {
hide_from: hide_from,
items: content.items,
})
}}
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