mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-08-19 09:24:46 +00:00
37 lines
1.1 KiB
HTML
37 lines
1.1 KiB
HTML
<!-- {#
|
|
SPDX-FileCopyrightText: 2016 Martin Donath <martin.donath@squidfunk.com>
|
|
SPDX-FileCopyrightText: 2023 Jonah Aragon <jonah@privacyguides.org>
|
|
|
|
SPDX-License-Identifier: MIT OR LicenseRef-MIT-mkdocs-material
|
|
#} -->
|
|
|
|
<!-- Render navigation item -->
|
|
{% macro render(nav_item, ref = nav_item) %}
|
|
|
|
<!-- Navigation item with nested items -->
|
|
{% if nav_item.children %}
|
|
{% set first = nav_item.children | first %}
|
|
|
|
<!-- Recurse, if the first item has further nested items -->
|
|
{% if first.children %}
|
|
{{ render(first, ref) }}
|
|
|
|
<!-- Nested navigation link -->
|
|
{% 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 %}
|
|
|
|
<!-- Navigation link -->
|
|
{% 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 %}
|