Skip to content

Commit

Permalink
Added wrapper to sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
ToyTox authored and alexey-igrychev committed Feb 8, 2023
1 parent f284bf7 commit 3ec9295
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/_includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{%- assign sidebar = site.data.sidebars[page.sidebar].entries[page.lang] %}
<ul class="sidebar" id="mysidebar">
{%- for entry in sidebar.f %}
{% include sidebar_entry.html entry=entry folder_entry_class="sidebar__item sidebar__item_parent" item_entry_class="sidebar__item" %}
{%- endfor %}
</ul>
<div class="sidebar__wrapper-inner">
<nav class="sidebar__container">
<ul class="sidebar" id="mysidebar">
{%- for entry in sidebar.f %}
{% include sidebar_entry.html entry=entry folder_entry_class="sidebar__item sidebar__item_parent" item_entry_class="sidebar__item" %}
{%- endfor %}
</ul>
</nav>
</div>

<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
<script>$("li.active").parents('li').toggleClass("active");</script>

0 comments on commit 3ec9295

Please sign in to comment.