From 03a211ce84951a63eb6a2f3b684bcff36ac4c472 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sat, 19 Nov 2022 20:24:31 +0100 Subject: [PATCH] Disable read-symbol for sidebar --- .../templates/partials/sidebar.html.twig | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 themes/learn2-dark/templates/partials/sidebar.html.twig diff --git a/themes/learn2-dark/templates/partials/sidebar.html.twig b/themes/learn2-dark/templates/partials/sidebar.html.twig new file mode 100644 index 0000000..b176189 --- /dev/null +++ b/themes/learn2-dark/templates/partials/sidebar.html.twig @@ -0,0 +1,68 @@ +{% macro loop(page, parent_loop) %} + {% import _self as self %} + + {% if parent_loop|length > 0 %} + {% set data_level = parent_loop %} + {% else %} + {% set data_level = 0 %} + {% endif %} + {% for p in page.children.visible %} + {% set parent_page = p.activeChild ? ' parent' : '' %} + {% set current_page = p.active ? ' active' : '' %} +
  • + {##} + {##} + {#{% if data_level == 0 %}{{ loop.index }}. {% endif %}{{ p.menu }}#} + {##} + {% if p.children.count > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + +{% macro version(p) %} + {% set parent_page = p.activeChild ? ' parent' : '' %} + {% set current_page = p.active ? ' active' : '' %} +
    + {% if p.activeChild or p.active %} + + {% else %} + + {% endif %} + {{ p.menu }} +
    +{% endmacro %} + +{% import _self as macro %} + +
    +
    + {% if theme_config.top_level_version %} + {% for slug, ver in pages.children %} + {{ macro.version(ver) }} +
      + {{ macro.loop(ver, '') }} +
    + {% endfor %} + {% else %} +
      + {% if theme_config.root_page %} + {{ macro.loop(page.find(theme_config.root_page), '') }} + {% else %} + {{ macro.loop(pages, '') }} + {% endif %} +
    + {% endif %} +
    + + {{ 'THEME_LEARN2_CLEAR_HISTORY'|t }}
    + + +
    +