beautifulSA-jekyll/_includes/nav.html

63 lines
2.4 KiB
HTML
Raw Permalink Normal View History

<nav class="navbar navbar-expand-xl navbar-light fixed-top navbar-custom {% if page.nav-short %}top-nav-short-permanent{% else %}top-nav-regular{% endif %}">
{%- if site.title-img -%}
<a class="navbar-brand navbar-brand-logo" href="{{ '' | absolute_url }}"><img alt="{{ site.title }} Logo" src="{{ site.title-img | relative_url}}"/></a>
{%- elsif site.title -%}
<a class="navbar-brand" href="{{ '' | absolute_url }}">{{ site.title }}</a>
{%- endif -%}
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
2015-03-02 21:06:05 +01:00
<div class="collapse navbar-collapse" id="main-navbar">
<ul class="navbar-nav ml-auto">
{%- for link in site.navbar-links -%}
{%- if link[1].first %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ link[0] }}</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
{%- for childlink in link[1] -%}
{%- for linkparts in childlink %}
<a class="dropdown-item" href="{{ linkparts[1] | relative_url }}">{{ linkparts[0] }}</a>
{%- endfor -%}
{%- endfor %}
2016-03-18 05:20:11 +01:00
</div>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="{{ link[1] | relative_url }}">{{ link[0] }}</a>
</li>
{%- endif -%}
{%- endfor -%}
{% if site.post_search %}
<li class="nav-item">
<a class="nav-link" id="nav-search-link" href="#" title="Search">
<span id="nav-search-icon" class="fa fa-search"></span>
<span id="nav-search-text">Search</span>
</a>
</li>
{%- endif -%}
</ul>
</div>
2016-02-07 17:22:13 +01:00
2020-09-17 03:06:21 +02:00
{% if site.navbar-extra %}
{% for file in site.navbar-extra %}
{% include {{ file }} %}
{% endfor %}
{% endif %}
{% if site.avatar and page.show-avatar != false %}
<div class="avatar-container">
<div class="avatar-img-border">
<a href="{{ '' | absolute_url }}">
2020-08-24 00:21:47 +02:00
<img alt="Navigation bar avatar" class="avatar-img" src="{{ site.avatar | relative_url }}" />
</a>
</div>
</div>
{% endif %}
2016-02-07 17:22:13 +01:00
</nav>
{% include search.html %}