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

Skip to content
Snippets Groups Projects
Commit d0caeff2 authored by escuriola's avatar escuriola
Browse files

OEL-589: Footer link classes.

parent 0249aa15
No related branches found
No related tags found
1 merge request!36OEL-579 - Whitelabel - Medley branch with BCL 0.9.0 upgradel
......@@ -56,6 +56,13 @@ class TwigExtension extends AbstractExtension {
'label' => $link['label'],
'path' => $link['href'],
'icon_position' => 'after',
'attributes' => [
'class' => [
'text-decoration-none',
'd-block',
'mb-1',
],
],
];
if (!empty($link['external']) && $link['external'] === TRUE) {
......
{% if sections is defined and sections is not empty and sections is iterable %}
{% set i = 0 %}
{% for section in sections %}
{% if i == 0 %}
{% if loop.first %}
<p class="fw-bold border-bottom pb-2 mb-2">{{ section.title }}</p>
{% else %}
<p class="fw-bold border-bottom pb-2 mb-2 mt-3">{{ section.title }}</p>
{% endif %}
{% set i = i + 1 %}
{% if section.links is defined and section.links is not empty and section.links is iterable %}
{% set attributes = {
'class': [
'text-decoration-none',
'd-block',
'mb-1'
]
} %}
<ul class="nav flex-column">
{% for link in section.links %}
<li class="nav-item">{{ pattern('link', {
label: link.label,
path: link.path|render,
icon: link.icon,
icon_position: link.icon_position
icon_position: link.icon_position,
attributes: attributes
}) }}</li>
{% endfor %}
</ul>
......
{% if sections is defined and sections is not empty and sections is iterable %}
{% set i = 0 %}
{% for section in sections %}
{% if i == 0 %}
{% if loop.first %}
<p class="fw-bold border-bottom pb-2 mb-2">{{ section.title }}</p>
{% else %}
<p class="fw-bold border-bottom pb-2 mb-2 mt-3">{{ section.title }}</p>
{% endif %}
{% set i = i + 1 %}
{% if section.links is defined and section.links is not empty and section.links is iterable %}
{% set attributes = {
'class': [
'text-decoration-none',
'd-block',
'mb-1'
]
} %}
<ul class="nav flex-column">
{% for link in section.links %}
<li class="nav-item">{{ pattern('link', {
label: link.label,
path: link.path|render,
icon: link.icon,
icon_position: link.icon_position
icon_position: link.icon_position,
attributes: attributes,
}) }}</li>
{% endfor %}
</ul>
......
......@@ -10,23 +10,31 @@
</div>
{% endfor %}
</div>
{%
set row_class = [
'pb-4',
'pb-lg-5',
'mt-4',
'mt-lg-5',
'bcl-footer__bordered-row',
'row',
]
%}
{% if middle_sections is defined and middle_sections is not empty and middle_sections is iterable %}
<div class="pb-4 pb-lg-5 mt-4 mt-lg-5 bcl-footer__bordered-row row">
<div {{ attributes.addClass(row_class) }}>
{% for section in middle_sections %}
{% set section_id = section.section_id %}
<div class="col">
{% include '@oe_whitelabel/layouts/' ~ section_id ~ '.html.twig' with {
title: section.title,
links: section.links,
more_info_title: section.contact_eu_title,
contact_eu_links: section.contact_eu_links,
} %}
</div>
{% endfor %}
</div>
{% endif %}
{% if bottom_sections is defined and bottom_sections is not empty and bottom_sections is iterable %}
<div class="pb-4 pb-lg-5 mt-4 mt-lg-5 bcl-footer__bordered-row row">
<div {{ attributes.addClass(row_class) }} >
{% for section in bottom_sections %}
{% set section_id = section.section_id %}
<div class="col">
......
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