{%
set linkAttributes = [
{icon: 'midwife', color: 'bg-teal'},
{icon: 'midwifeteam', color: 'bg-dark-teal'},
{icon: 'wehe', color: 'bg-petroleum'},
]
%}
{% if (webspaceSettings.content.links) %}
<div class="container d-none d-lg-block">
<div class="row">
<div class="col-12">
<div class="sub-navigation d-flex text-center flex-column flex-md-row align-items-center text-white">
{% for item in webspaceSettings.content.links %}
<a href="{{ sulu_content_path(item.url, item.webspaceKey) }}" class="{{ active_route(app.request.attributes.get( '_route' ), item.template) ? 'active' }}
w-100 py-2 d-inline {{ linkAttributes[loop.index0].color }} {{ loop.index0 == 1 ? 'sub-nav-border' }}">
<span class="d-flex justify-content-center align-items-center">
<span class="icon">
{% include '@components/icons/sub-navigation-icons.html.twig' with { icon: linkAttributes[loop.index0].icon } %}
</span>
<span class="ms-2 fs-5 text-white fw-bold me-2">{{ item.title }}</span>
</span>
</a>
{% endfor %}
</div>
</div>
</div>
</div>
<div class="d-lg-none sub-navigation d-flex text-center flex-column flex-md-row align-items-center text-white">
{% for item in webspaceSettings.content.links %}
<a href="{{ sulu_content_path(item.url, item.webspaceKey) }}" class="{{ active_route(app.request.attributes.get( '_route' ), item.template) ? 'active' }}
w-100 py-2 d-inline {{ linkAttributes[loop.index0].color }} {{ loop.index0 == 1 ? 'sub-nav-border' }}">
<span class="d-flex justify-content-center align-items-center">
<span class="icon">
{% include '@components/icons/sub-navigation-icons.html.twig' with { icon: linkAttributes[loop.index0].icon } %}
</span>
<span class="ms-2 fs-5 text-white fw-bold me-2">{{ item.title }}</span>
</span>
</a>
{% endfor %}
</div>
{% endif %}