1
Fork 0

Setup basic navbar

This commit is contained in:
Jake Howard 2017-04-22 23:24:13 +01:00
parent 20686afcba
commit ea3867ac90
3 changed files with 36 additions and 16 deletions

4
content/post/test.md Normal file
View file

@ -0,0 +1,4 @@
---
title: Test
---
test content

View file

@ -0,0 +1,16 @@
{{ partial "page_start.html" . }}
<div id="page-wrapper">
<section id="main" class="container">
<header>
<h2>{{ title .Title }}</h2>
{{ if .Params.subtitle }}
<p>{{ .Params.subtitle }}</p>
{{ end }}
</header>
<div class="box">
<span class="image featured"><img src="images/pic01.jpg" alt="" /></span>
{{ .Content }}
</div>
</section>
</div>
{{ partial "page_end.html" . }}

View file

@ -2,24 +2,24 @@
<h1><a href="index.html">{{ title .Site.Title }}</a></h1> <h1><a href="index.html">{{ title .Site.Title }}</a></h1>
<nav id="nav"> <nav id="nav">
<ul> <ul>
<li><a href="index.html">Home</a></li> {{ range where .Site.Pages.ByTitle "Kind" "section" }}
{{ $page := . }}
<li> <li>
<a href="#" class="icon fa-angle-down">Layouts</a> <a href="{{ $page.Permalink }}">
<ul> {{ $page.Title }}
<li><a href="generic.html">Generic</a></li> </a>
<li><a href="contact.html">Contact</a></li> </li>
<li><a href="elements.html">Elements</a></li> {{ end }}
{{ range where .Site.Pages.ByTitle "Kind" "page" }}
{{ $page := . }}
{{ if eq $page.Section "" }}
<li> <li>
<a href="#">Submenu</a> <a href="{{ $page.Permalink }}">
<ul> {{ $page.Title }}
<li><a href="#">Option One</a></li> </a>
<li><a href="#">Option Two</a></li>
<li><a href="#">Option Three</a></li>
<li><a href="#">Option Four</a></li>
</ul>
</li>
</ul>
</li> </li>
{{ end }}
{{ end }}
</ul> </ul>
</nav> </nav>
</header> </header>