forked from alphagov/govuk-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout-sitemap.njk
25 lines (24 loc) · 999 Bytes
/
layout-sitemap.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{% extends "layout-single-page.njk" %}
{% set contents %}
<h1 class="govuk-heading-xl">Sitemap</h1>
{% for item in navigation %}
<h2 class="govuk-heading-l"><a class="govuk-link" href="/{{ item.url }}">{{ item.label }}</a></h2>
{% if item.items %}
{% for theme, items in item.items | groupby("theme") %}
{% if theme != 'undefined' %}
<h2 class="govuk-heading-m">{{ theme }}</h2>
{% endif %}
<ul class="govuk-list">
{% for subitem in items %}
<li class="govuk-!-margin-bottom-2">
<a class="govuk-link" href="/{{ subitem.url }}">{{ subitem.label }}</a>
{% if subitem.aliases %}
— also known as {% for alias in subitem.aliases %}{{ ", " if not (loop.first or loop.last) }}{{ " or " if loop.last and loop.length > 1 }}{{ alias | lower }}{% endfor %}
{% endif %}
</li>
{% endfor %}
</ul>
{% endfor %}
{% endif %}
{% endfor %}
{% endset %}