Update header.html
This commit is contained in:
parent
7295d1783b
commit
64490093d6
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue