Update header.html

This commit is contained in:
Santiago Lo Coco 2022-02-10 09:49:15 -03:00
parent 7295d1783b
commit 64490093d6
1 changed files with 1 additions and 24 deletions

View File

@ -22,7 +22,6 @@
<div class="collapse navbar-collapse text-right" id="navbarNav">
<ul class="navbar-nav ml-auto flex-nowrap">
<!-- About -->
<li class="nav-item {% if page.title == 'about' %}active{% endif %}">
<a class="nav-link" href="{{ '/' | relative_url }}">about
{%- if page.title == "about" -%}
@ -31,7 +30,6 @@
</a>
</li>
{% if site.blog_name %}
<!-- Blog -->
<li class="nav-item {% if page.url contains 'blog' %}active{% endif %}">
<a class="nav-link" href="{{ '/blog/' | relative_url }}">blog
{%- if page.title == "blog" -%}
@ -41,28 +39,9 @@
</li>
{%- endif %}
<!-- Other pages -->
{%- assign sorted_pages = site.pages | sort: "title" -%}
{%- for p in sorted_pages -%}
{%- if p.nav and p.autogen == nil -%}
{%- if p.dropdown %}
<li class="nav-item dropdown {% if page.title == p.title %}active{% endif %}">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ p.title }}
{%- if page.title == p.title -%}
<span class="sr-only">(current)</span>
{%- endif -%}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
{%- for child in p.children -%}
{%- if child.title == 'divider' %}
<div class="dropdown-divider"></div>
{%- else %}
<a class="dropdown-item" href="{{ child.permalink | relative_url }}">{{ child.title }}</a>
{%- endif -%}
{% endfor %}
</div>
</li>
{%- else %}
<li class="nav-item {% if page.title == p.title %}active{% endif %}">
<a class="nav-link" href="{{ p.url | relative_url }}">{{ p.title }}
{%- if page.title == p.title -%}
@ -71,11 +50,9 @@
</a>
</li>
{%- endif -%}
{%- endif -%}
{% endfor -%}
{%- if site.enable_darkmode %}
<!-- Toogle theme mode -->
{%- if site.enable_darkmode %}
<div class = "toggle-container">
<a id = "light-toggle">
<i class="fas fa-moon"></i>