diff --git a/templates/index.html b/templates/index.html index 041abbe..2cd8631 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,137 +1,140 @@ - - - - {% if config.extra.favicon %} + + + + {% if config.extra.favicon %} - {% endif %} - - {% block title %}{{ config.title }}{% endblock title %} - - + {% endif %} + + {% block title %}{{ config.title }}{% endblock title %} + + - {% if config.extra.release %} +{% if config.extra.release %} - {% endif %} -
+{% endif %} +
- {% block nav %} + {% block nav %} + {% if page.toc %} + + {% if current_path == page.path %} + + {% set_global header_count = 0 %} + {% for h2 in page.toc %} + {% set_global header_count = header_count + 1 %} + {% for h3 in h2.children %} + {% set_global header_count = header_count + 1 %} + {% for h4 in h3.children %} + {% set_global header_count = header_count + 1 %} + {% endfor %} + {% endfor %} + {% endfor %} + + {% if header_count > 4 %} + + {% endif %} + + {% endif %} + {% endif %} + {% endfor %} + + {% endfor %} + + {% endblock nav %} -
- - {% if config.build_search_index %} -
- -
-
- -
-
-
    -
    -
    - {% endif %} +
    -
    - {% block content %} - {{ section.content | safe }} - {% endblock content %} -
    + {% if config.build_search_index %} +
    + +
    +
    + +
    +
    +
      +
      +
      + {% endif %} -
      +
      + {% block content %} + {{ section.content | safe }} + {% endblock content %} +
      + +
      - {% if config.build_search_index %} - - - - {% endif %} +{% if config.build_search_index %} + + + +{% endif %}