mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
48 lines
No EOL
1.8 KiB
HTML
48 lines
No EOL
1.8 KiB
HTML
{#-
|
|
This file was automatically generated - do not edit
|
|
-#}
|
|
{% import "partials/nav-item.html" as item with context %}
|
|
{% set class = "md-nav md-nav--primary" %}
|
|
{% if "navigation.tabs" in features %}
|
|
{% set class = class ~ " md-nav--lifted" %}
|
|
{% endif %}
|
|
{% if "toc.integrate" in features %}
|
|
{% set class = class ~ " md-nav--integrated" %}
|
|
{% endif %}
|
|
{% macro get_deepest_url(nav_item) %}
|
|
{% if nav_item.children and nav_item.children|length > 0 %}
|
|
{{ get_deepest_url(nav_item.children[0]) | trim }}
|
|
{% else %}
|
|
{{ nav_item.url | default('#') | trim }}
|
|
{% endif %}
|
|
{% endmacro %}
|
|
<nav class="{{ class }}" aria-label="{{ lang.t('nav') }}" data-md-level="0">
|
|
<label class="md-nav__title" for="__drawer">
|
|
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-nav__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
|
|
{% include "partials/logo.html" %}
|
|
</a>
|
|
{{ config.site_name }}
|
|
</label>
|
|
{% if config.repo_url %}
|
|
<div class="md-nav__source">
|
|
{% include "partials/source.html" %}
|
|
</div>
|
|
{% endif %}
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
{% for nav_item in nav %}
|
|
<li>
|
|
{# 使用宏递归查找最深层第一个子导航的 URL #}
|
|
<a href="{{ get_deepest_url(nav_item) | trim | url }}" class="md-nav__link">{{ nav_item.title }}</a>
|
|
</li>
|
|
{# 如果 nav_item 有子导航,按 title 排序后渲染 #}
|
|
{% if nav_item.children %}
|
|
<ul class="md-nav__sublist">
|
|
{% for child in nav_item.children|sort(attribute='title') %}
|
|
{% set path = "__nav_" ~ loop.index %}
|
|
{{ item.render(child, path, 2) }}
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</nav> |