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

Skip to content
Snippets Groups Projects
Commit e088891b authored by gilmarfdelima's avatar gilmarfdelima
Browse files

OEL-1026: Clean template markup.

parent 3f0a5ad8
No related branches found
No related tags found
1 merge request!76OEL-1026: [oe_whitelabel] Style the event content type
......@@ -9,14 +9,12 @@
{% set _event_dates %}
{{ content.oe_event_dates|field_value|safe_join(', ') }}
{% endset %}
{% endif %}
{% if _event_dates %}
{% set description_items = description_items|merge([
{
term:[{
'label': content.oe_event_dates|field_label,
'icon': 'calendar-event',
}],
'label': content.oe_event_dates|field_label,
'icon': 'calendar-event',
}],
definition: _event_dates,
}
]) %}
......@@ -25,14 +23,12 @@
{% set _event_location %}
{{ content.oe_location|field_value|safe_join(', ') }}
{% endset %}
{% endif %}
{% if _event_location %}
{% set description_items = description_items|merge([
{
term:[{
'label': content.oe_location|field_label,
'icon': 'geo-alt-fill',
}],
'label': content.oe_location|field_label,
'icon': 'geo-alt-fill',
}],
definition: _event_location,
}
]) %}
......@@ -41,33 +37,27 @@
{% set inpage_navigation_fields %}
{{ pattern('description_list', {
items: description_items,
orientation: 'default',
attributes: attributes.addClass(["mt-3", "mb-4"]),
orientation: 'horizontal',
attributes: create_attribute().addClass(['mt-3', 'mb-4']),
}) }}
{{ content.body }}
{{ content.oe_documents }}
{% endset %}
{# Set inpage navigation main content attributes #}
{% if attributes is empty %}
{% set attributes = create_attribute() %}
{% endif %}
{% set attributes = attributes.addClass(["mt-md-4-75", "mt-4"]) %}
{# Print event #}
<article{{attributes}}>
{{ pattern('content_banner', {
background: 'gray',
title: label,
content: content.oe_summary,
image: image,
attributes: create_attribute().addClass(['ps-0']),
}) }}
<main{{attributes}}>
<div class="mt-md-4-75 mt-4">
{{ pattern('inpage_navigation', {
title: 'Page content',
links: inpage_navigation_links,
content: inpage_navigation_fields,
full_layout: true,
}) }}
</main>
</div>
</article>
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