diff options
| author | 2023-10-07 06:48:07 +0800 | |
|---|---|---|
| committer | 2023-10-07 06:48:07 +0800 | |
| commit | 991fd7a6d67ee017c57beaaa21fc31c4bee7944d (patch) | |
| tree | e895202203fcaa50b0052f60ef6fc7d6d2928cf9 /material/templates/partials/tabs-item.html | |
| parent | d62900046bb6f754a8e6e7e670a66a90134055d9 (diff) | |
| download | infini-991fd7a6d67ee017c57beaaa21fc31c4bee7944d.tar.gz infini-991fd7a6d67ee017c57beaaa21fc31c4bee7944d.zip | |
feat(version): versions
Diffstat (limited to 'material/templates/partials/tabs-item.html')
| -rw-r--r-- | material/templates/partials/tabs-item.html | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/material/templates/partials/tabs-item.html b/material/templates/partials/tabs-item.html new file mode 100644 index 00000000..0e80035c --- /dev/null +++ b/material/templates/partials/tabs-item.html @@ -0,0 +1,35 @@ +{#- + This file was automatically generated - do not edit +-#} +{% macro render_content(nav_item, ref = nav_item) %} + {% if nav_item == ref or "navigation.indexes" in features %} + {% if nav_item.is_index and nav_item.meta.icon %} + {% include ".icons/" ~ nav_item.meta.icon ~ ".svg" %} + {% endif %} + {% endif %} + {{ ref.title }} +{% endmacro %} +{% macro render(nav_item, ref = nav_item) %} + {% set class = "md-tabs__item" %} + {% if ref.active %} + {% set class = class ~ " md-tabs__item--active" %} + {% endif %} + {% if nav_item.children %} + {% set first = nav_item.children | first %} + {% if first.children %} + {{ render(first, ref) }} + {% else %} + <li class="{{ class }}"> + <a href="{{ first.url | url }}" class="md-tabs__link"> + {{ render_content(first, ref) }} + </a> + </li> + {% endif %} + {% else %} + <li class="{{ class }}"> + <a href="{{ nav_item.url | url }}" class="md-tabs__link"> + {{ render_content(nav_item) }} + </a> + </li> + {% endif %} +{% endmacro %} |
