transmet/templates/layout.html

70 lines
2.2 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>transmet</title>
<!-- Bootstrap -->
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/jquery-ui.min.css" rel="stylesheet">
<link href="/css/template.css" rel="stylesheet">
<link href="/css/signin.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
2015-05-01 15:20:02 +00:00
<a class="navbar-brand" href="/">transmet</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
</ul>
<ul class="nav navbar-nav navbar-right">
{{if .user}}
2015-05-01 15:20:02 +00:00
<li>{{.user.Username}}</li>
<li><a href="/logout">Logout</a></li>
{{else}}
<li><a href="/login">Log in</a></li>
{{end}}
</ul>
</div>
</div>
</div>
<div class="container">
{{template "body" .}}
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/js/bootstrap.min.js"></script>
<script src="/js/jquery.confirm.min.js"></script>
<script src="/js/jquery-ui.min.js"></script>
<script src="/js/funcs.js"></script>
</body>
</html>
{{define "flashes"}}
<div class="messages">
{{range .flashes.info}}
<div class="alert alert-success" role="alert">Info: {{.}}</div>
{{end}}
{{range .flashes.error}}
<div class="alert alert-danger" role="alert">Error: {{.}}</div>
{{end}}
</div>
{{end}}