2020-05-02 02:10:20 -04:00
|
|
|
<nav class="navbar navbar-expand-md navbar-light fixed-top navbar-custom {% if page.nav-short %}top-nav-short-permanent{% endif %}">
|
|
|
|
|
|
|
|
{%- if site.title-img -%}
|
2020-05-02 07:39:20 +00:00
|
|
|
<a class="navbar-brand navbar-brand-logo" href="{{ '' | absolute_url }}"><img alt="{{ site.title }} Logo" src="{{ site.title-img }}"/></a>
|
2020-05-02 02:10:20 -04:00
|
|
|
{%- 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 12:06:05 -08:00
|
|
|
|
2020-05-02 02:10:20 -04:00
|
|
|
<div class="collapse navbar-collapse" id="main-navbar">
|
|
|
|
<ul class="navbar-nav ml-auto">
|
2019-06-24 05:11:26 +08:00
|
|
|
{%- for link in site.navbar-links -%}
|
|
|
|
{%- if link[1].first %}
|
2020-05-02 02:10:20 -04:00
|
|
|
<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">
|
2019-06-24 05:11:26 +08:00
|
|
|
{%- for childlink in link[1] -%}
|
2020-05-02 02:10:20 -04:00
|
|
|
{%- for linkparts in childlink %}
|
|
|
|
<a class="dropdown-item" href="{{ linkparts[1] | relative_url }}">{{ linkparts[0] }}</a>
|
|
|
|
{%- endfor -%}
|
2019-06-24 05:11:26 +08:00
|
|
|
{%- endfor %}
|
2016-03-17 21:20:11 -07:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{% else %}
|
2020-05-02 02:10:20 -04:00
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="{{ link[1] | relative_url }}">{{ link[0] }}</a>
|
|
|
|
</li>
|
2019-06-24 05:11:26 +08:00
|
|
|
{%- endif -%}
|
|
|
|
{%- endfor -%}
|
2020-05-02 02:10:20 -04:00
|
|
|
</ul>
|
|
|
|
</div>
|
2016-02-07 18:22:13 +02:00
|
|
|
|
2020-07-05 05:18:31 +00:00
|
|
|
{% if site.avatar and (layout.show-avatar or page.show-avatar) %}
|
2020-05-02 02:10:20 -04:00
|
|
|
<div class="avatar-container">
|
|
|
|
<div class="avatar-img-border">
|
|
|
|
<a href="{{ '' | absolute_url }}">
|
2020-08-23 22:21:47 +00:00
|
|
|
<img alt="Navigation bar avatar" class="avatar-img" src="{{ site.avatar | relative_url }}" />
|
2020-05-02 02:10:20 -04:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2016-02-07 18:22:13 +02:00
|
|
|
|
|
|
|
</nav>
|