1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-08-19 09:24:46 +00:00
Files
privacyguides.org/theme/partials/path.html

47 lines
1.7 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
#} -->
{% import "partials/path-item.html" as item with context %}
<!-- Determine whether to show navigation path -->
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "path" in page.meta.hide %}
{% endif %}
<!-- Determine whether we have enough pages for rendering -->
{% set depth = page.ancestors | length %}
{% if nav.homepage %}
{% set depth = depth + 1 %}
{% endif %}
<!-- Navigation path (breadcrumbs) -->
{% if depth > 1 %}
{% set count = namespace(value=1) %}
<nav class="md-path" aria-label="{{ lang.t('nav') }}" {{ hidden }}>
<ol class="md-path__list" vocab="https://schema.org/" typeof="BreadcrumbList">
{% if nav.homepage %}
<li class="md-path__item" property="itemListElement" typeof="ListItem">
{{ item.render(nav.homepage) }}
<meta property="position" content="{{ count.value }}">
{% set count.value = count.value + 1 %}
</li>
{% endif %}
{% for nav_item in page.ancestors | reverse %}
<li class="md-path__item" property="itemListElement" typeof="ListItem">
{{ item.render(nav_item) }}
<meta property="position" content="{{ count.value }}">
{% set count.value = count.value + 1 %}
</li>
{% endfor %}
<li property="itemListElement" typeof="ListItem" hidden>
<meta property="name" content="{{ page.title }}">
<meta property="position" content="{{ count.value }}">
</li>
</ol>
</nav>
{% endif %}