From daa378d6964841d9a5c4bc39815d75c672117dea Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 15 Dec 2023 09:22:24 +0800 Subject: refactor(docs/src): delete `material` dir --- docs/src/templates/partials/nav-item.html | 137 +++--------------------------- 1 file changed, 11 insertions(+), 126 deletions(-) (limited to 'docs/src/templates/partials/nav-item.html') diff --git a/docs/src/templates/partials/nav-item.html b/docs/src/templates/partials/nav-item.html index 24d74a1a..5e880792 100644 --- a/docs/src/templates/partials/nav-item.html +++ b/docs/src/templates/partials/nav-item.html @@ -1,96 +1,45 @@ - - - +{#- + This file was automatically generated - do not edit +-#} {% macro render_status(nav_item, type) %} {% set class = "md-status md-status--" ~ type %} - - {% if config.extra.status and config.extra.status[type] %} - + - - {% else %} {% endif %} {% endmacro %} - - {% macro render_content(nav_item, ref = nav_item) %} - - {% if nav_item.is_page and nav_item.meta.icon %} {% include ".icons/" ~ nav_item.meta.icon ~ ".svg" %} {% endif %} - - {{ ref.title }} - - {% if nav_item.is_page and nav_item.meta.status %} {{ render_status(nav_item, nav_item.meta.status) }} {% endif %} {% endmacro %} - - {% macro render_pruned(nav_item, ref = nav_item) %} {% set first = nav_item.children | first %} - - {% if first and first.children %} {{ render_pruned(first, ref) }} - - {% else %} {{ render_content(ref) }} - - {% if nav_item.children | length > 0 %} {% endif %} {% endif %} {% endmacro %} - - {% macro render(nav_item, path, level) %} - - {% set class = "md-nav__item" %} {% if nav_item.active %} {% set class = class ~ " md-nav__item--active" %} {% endif %} - - {% if nav_item.children %} - - {% set indexes = [] %} {% if "navigation.indexes" in features %} {% for nav_item in nav_item.children %} @@ -99,93 +48,50 @@ {% endif %} {% endfor %} {% endif %} - - {% set tabs = "navigation.tabs" in features %} {% set sections = "navigation.sections" in features %} {% if tabs and level == 1 or sections and tabs >= level - 1 %} {% set class = class ~ " md-nav__item--section" %} {% set is_section = true %} - - {% elif not nav_item.active and "navigation.prune" in features %} {% set class = class ~ " md-nav__item--pruned" %} {% set is_pruned = true %} {% endif %} - -
  • {% if not is_pruned %} {% set checked = "checked" if nav_item.active %} - - {% set is_expanded = "navigation.expand" in features %} {% if is_expanded and not checked %} {% set indeterminate = "md-toggle--indeterminate" %} {% endif %} - - - - - + {% if not indexes %} {% set tabindex = "0" if not is_section %} -
  • - - {% elif nav_item == page %}
  • {% set toc = page.toc %} - - - - - + {% set first = toc | first %} {% if first and first.level == 1 %} {% set toc = first.children %} {% endif %} - - {% if toc %} {% endif %} - + {{ render_content(nav_item) }} - - {% if toc %} {% include "partials/toc.html" %} {% endif %}
  • - - {% else %}
  • -- cgit v1.2.3-70-g09d2