transmet/templates/layout.html

83 lines
2.8 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/sticky-footer-navbar.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">
2015-05-22 05:59:28 +00:00
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
</head>
<body>
<nav 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">
{{if .user}}
<li><a href="/news/add">add</a></li>
<li><a href="/news/export">export</a></li>
<li><a href="/categories">categories</a></li>
{{end}}
</ul>
<ul class="nav navbar-nav navbar-right">
{{if .user}}
2015-05-01 15:20:02 +00:00
<li>{{.user.Username}}</li>
<li><form method="POST" action="/logout">{{ .csrfField }}<input type="submit" value="Logout" class="btn btn-sm btn-primary btn-block" /></form></li>
{{else}}
<li><a href="/login">Log in</a></li>
{{end}}
</ul>
</div>
</div>
</nav>
<div class="container">
{{template "body" .}}
</div>
<footer class="footer">
<div class="container">
<p class="text-muted">Powered by <a href="https://github.com/dballard/transmet">transmet</a> <img src="/favicon.ico" />
</div>
</footer>
<!-- 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}}