Updated dashboard and nav template to handle user context

pull/24/head
Jordan 2014-01-14 21:20:28 -06:00
parent 6944854005
commit e993e8c898
2 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{{define "content"}} {{template "nav"}}
{{define "content"}} {{template "nav" .User}}
<div class="jumbotron">
<div class="container" style="text-align:center;">
<h1 class="sans header">

View File

@ -13,9 +13,15 @@
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a id="navbar-login" href="/login">
{{if .}}
<a href="/settings">
<button type="button" class="btn btn-primary"><i class="fa fa-user"></i> {{.Username}}</button>
</a>
{{else}}
<a href="/login">
<button type="button" class="btn btn-primary">Login</button>
</a>
{{end}}
</li>
</ul>
</div>