transmet/templates/layout.html

76 lines
2.4 KiB
HTML

<!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">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
</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>
<a class="navbar-brand" href="/">transmet</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/add">add</a></li>
<li><a href="/export">export</a></li>
<li><a href="/categories">categories</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
{{if .user}}
<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}}