1
Fork 0

Move navbar to partial

This commit is contained in:
Jake Howard 2017-11-11 21:56:23 +00:00
parent eb611c88f2
commit 54429504aa
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 25 additions and 24 deletions

View file

@ -16,30 +16,7 @@
</head> </head>
<body> <body>
<nav class="navbar navbar-expand-sm navbar-dark bg-black fixed-top"> {{ partial "navbar.html" . }}
<a class="navbar-brand" href="{{ .Site.BaseURL }}"><code>/home/{{ lower .Site.Title }}</code></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-auto">
{{ partial "nav_pages.html" . }}
</ul>
<div class="d-none d-lg-block">
<ul class="navbar-nav">
{{ range .Site.Data.social.navbar_accounts }}
{{ $account := index $.Site.Data.social.accounts . }}
<li class="nav-item">
<a class="nav-link" href="{{ $account.link }}">
<i class="fa {{ $account.icon }}" title="{{ $account.name }}"></i>
</a>
</li>
{{ end }}
</ul>
</div>
</div>
</nav>
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}

View file

@ -0,0 +1,24 @@
<nav class="navbar navbar-expand-sm navbar-dark bg-black fixed-top">
<a class="navbar-brand" href="{{ .Site.BaseURL }}"><code>/home/{{ lower .Site.Title }}</code></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-auto">
{{ partial "nav_pages.html" . }}
</ul>
<div class="d-none d-lg-block">
<ul class="navbar-nav">
{{ range .Site.Data.social.navbar_accounts }}
{{ $account := index $.Site.Data.social.accounts . }}
<li class="nav-item">
<a class="nav-link" href="{{ $account.link }}">
<i class="fa {{ $account.icon }}" title="{{ $account.name }}"></i>
</a>
</li>
{{ end }}
</ul>
</div>
</div>
</nav>