-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathbreadcrumb.njk
More file actions
19 lines (19 loc) · 901 Bytes
/
breadcrumb.njk
File metadata and controls
19 lines (19 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{% if eleventyNavigation %}
{% set segments = collections.all | filterCollectionLang | eleventyNavigationBreadcrumb(eleventyNavigation.key) %}
{% elif not segments %}
{% set segments = params.segments %}
{% endif %}
<nav role="navigation" class="fr-breadcrumb" aria-label="{{ "you_are_here" | i18n }}:">
<button class="fr-breadcrumb__button" aria-expanded="false" aria-controls="breadcrumb-1">
{{ "see_breadcrumb" | i18n }}
</button>
<div class="fr-collapse" id="breadcrumb-1">
<ol class="fr-breadcrumb__list">
<li><a class="fr-breadcrumb__link" href="{{ "/" | locale_url }}">{{ "home" | i18n }}</a></li>
{% for segment in segments %}
<li><a class="fr-breadcrumb__link" href="{{ segment.url | locale_url }}">{{ segment.title }}</a></li>
{% endfor %}
<li><a class="fr-breadcrumb__link" aria-current="page">{{ title }}</a></li>
</ol>
</div>
</nav>