Skip to content

Commit

Permalink
Update sidebar.html
Browse files Browse the repository at this point in the history
  • Loading branch information
brunochanrio authored May 7, 2024
1 parent 3dfa16c commit 8d983d9
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@

<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item md-nav__item--active">
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" id="__toc" type="checkbox">
<label class="md-nav__link md-nav__link--active" for="__toc">Home</label>
<a class="md-nav__link md-nav__link--active" href="{{ site.baseurl }}/" title="Home">Home</a>

<nav class="md-nav md-nav--secondary">
<label class="md-nav__title" for="__toc">Table of contents</label>
<a class="md-nav__link pancakes-parent" {% if section.children %}href="#pancakes-{{ section.title | slugify }}"{% else %}href="{% if section.external_url %}{{ section.external_url }}{% else %}{{ site.baseurl }}/{{ section.url }}{% endif %}"{% endif %}
{% for section in site.data.toc %}
<li class="md-nav__item md-nav__item--nested md-nav__item--active">
<a class="md-nav__link pancakes-parent" {% if section.children %}href="#pancakes-{{ section.title | slugify }}"{% else %}href="{% if section.external_url %}{{ section.external_url }}{% else %}{{ site.baseurl }}/{{ section.url }}{% endif %}"{% endif %}
id="pancakes-{{ section.title | slugify }}"
title="{{ section.title }}">{{ section.title }}</a>
{% if section.children %}<nav class="md-nav">
Expand All @@ -34,14 +30,23 @@
</li>{% endfor %}
</ul>
</nav>{% endif %}
</nav>
</li>

<!-- This navigation is completely for mobile -->
{% for section in site.data.toc %}<li class="md-nav__item mobile-nav" style="display:none">
<a class="md-nav__link" href="{% if section.external_url %}{{ section.external_url }}{% else %}{{ site.baseurl }}/{{ section.url }}{% endif %}" title="{{ section.title }}">{{ section.title }}</a>
</li>{% endfor %}
</li>{% endfor %}

{% for section in site.data.toc %}
<li class="md-nav__item md-nav__item--nested mobile-nav">
<a class="md-nav__link pancakes-parent" {% if section.children %}href="#pancakes-{{ section.title | slugify }}"{% else %}href="{% if section.external_url %}{{ section.external_url }}{% else %}{{ site.baseurl }}/{{ section.url }}{% endif %}"{% endif %}
id="pancakes-{{ section.title | slugify }}"
title="{{ section.title }}">{{ section.title }}</a>
{% if section.children %}<nav class="md-nav">
<ul class="md-nav__list">
{% for child in section.children %}<li class="md-nav__item">
<a href="{% if child.external_url %}{{ child.external_url }}{% else %}{{ site.baseurl }}/{{ child.url }}{% endif %}"
title="{{ child.title }}" style="display:none"
class="md-nav__link pancakes-child">{{ child.title }}</a>
</li>{% endfor %}
</ul>
</nav>{% endif %}
</li>{% endfor %}
<!-- This navigation is completely for non mobile -->
{% for section in site.data.toc %}
<li class="md-nav__item md-nav__item--nested not-mobile-nav">
Expand Down

0 comments on commit 8d983d9

Please sign in to comment.