Personal-Site/layouts/partials/navbar.html

48 lines
1.5 KiB
HTML
Raw Normal View History

2018-05-12 23:50:36 +00:00
<nav id="topnav" class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container">
<a class="navbar-brand" href="/">{{ .Site.Title }}</a>
<button class="navbar-toggler mr-0 ml-auto" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<li class="nav-item {{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}">
2018-06-13 01:17:06 +00:00
<a class="nav-link" href="{{ .URL }}">{{.Title}}</a>
</li>
2018-05-12 23:50:36 +00:00
{{ end }}
</ul>
<ul class="navbar-nav">
{{ with .Site.Data.social }}
{{ with .github }}
<li class="nav-item">
<a class="nav-link" href="{{ . }}" target="_blank" title="GitHub">
<span class="fab fa-github-alt"></span>
</a>
</li>
{{ end }}
{{ with .linkedin }}
<li class="nav-item">
<a class="nav-link" href="{{ . }}" target="_blank" title="LinkedIn">
<span class="fab fa-linkedin"></span>
</a>
</li>
{{ end }}
{{ end }}
<li class="nav-item ml-md-2">
<button id="btnTheme" type="button" class="btn btn-dark" aria-pressed="false" autocomplete="off">
<span id="themeText" class="fas fa-moon"></span>
</button>
</li>
</ul>
</div>
</div>
</nav>