2023-03-21 16:56:27 -05:00
|
|
|
<!-- {#
|
2025-08-12 01:55:49 -05:00
|
|
|
SPDX-FileCopyrightText: 2016 Martin Donath <martin.donath@squidfunk.com>
|
|
|
|
SPDX-FileCopyrightText: 2023 Jonah Aragon <jonah@privacyguides.org>
|
2023-03-21 16:56:27 -05:00
|
|
|
|
2025-08-12 01:55:49 -05:00
|
|
|
SPDX-License-Identifier: MIT OR LicenseRef-MIT-mkdocs-material
|
2023-03-21 16:56:27 -05:00
|
|
|
#} -->
|
2023-10-04 15:02:24 -05:00
|
|
|
|
|
|
|
<!-- Render navigation item -->
|
2023-03-05 13:37:36 -06:00
|
|
|
{% macro render(nav_item, ref = nav_item) %}
|
2023-10-04 15:02:24 -05:00
|
|
|
|
|
|
|
<!-- Navigation item with nested items -->
|
2023-03-05 13:37:36 -06:00
|
|
|
{% if nav_item.children %}
|
|
|
|
{% set first = nav_item.children | first %}
|
2023-10-04 15:02:24 -05:00
|
|
|
|
|
|
|
<!-- Recurse, if the first item has further nested items -->
|
2023-03-05 13:37:36 -06:00
|
|
|
{% if first.children %}
|
|
|
|
{{ render(first, ref) }}
|
2023-10-04 15:02:24 -05:00
|
|
|
|
|
|
|
<!-- Nested navigation link -->
|
2023-03-05 13:37:36 -06:00
|
|
|
{% else %}
|
|
|
|
<a href="{{ first.canonical_url | url }}" class="md-path__link" property="item" typeof="WebPage">
|
|
|
|
<span class="md-ellipsis" property="name">
|
|
|
|
{{ ref.title }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
2023-10-04 15:02:24 -05:00
|
|
|
|
|
|
|
<!-- Navigation link -->
|
2023-03-05 13:37:36 -06:00
|
|
|
{% else %}
|
|
|
|
<a href="{{ nav_item.canonical_url | url }}" class="md-path__link" property="item" typeof="WebPage">
|
|
|
|
<span class="md-ellipsis" property="name">
|
|
|
|
{{ ref.title }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endmacro %}
|