2015-04-28 15:10:40 +00:00
|
|
|
<!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">
|
2015-11-23 00:26:51 +00:00
|
|
|
<link href="/css/sticky-footer-navbar.css" rel="stylesheet">
|
2015-04-28 15:10:40 +00:00
|
|
|
<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">
|
2015-04-28 15:10:40 +00:00
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
2015-11-23 00:26:51 +00:00
|
|
|
|
|
|
|
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
2015-04-28 15:10:40 +00:00
|
|
|
<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>
|
2015-04-28 15:10:40 +00:00
|
|
|
</div>
|
|
|
|
<div class="collapse navbar-collapse">
|
|
|
|
<ul class="nav navbar-nav">
|
2015-11-23 00:26:51 +00:00
|
|
|
{{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}}
|
2015-04-28 15:10:40 +00:00
|
|
|
</ul>
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
|
|
{{if .user}}
|
2015-12-25 18:26:53 +00:00
|
|
|
<li><a href="">{{.user.Username}}</a></li>
|
2016-01-09 16:32:39 +00:00
|
|
|
<li><form method="POST" action="/logout">{{ .csrfField }}<input type="submit" value="Logout" class="btn-sm btn-primary btn-block" /></form></li>
|
2015-04-28 15:10:40 +00:00
|
|
|
{{else}}
|
|
|
|
<li><a href="/login">Log in</a></li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-11-23 00:26:51 +00:00
|
|
|
</nav>
|
2015-04-28 15:10:40 +00:00
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
{{template "body" .}}
|
|
|
|
</div>
|
|
|
|
|
2015-11-23 00:26:51 +00:00
|
|
|
<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>
|
|
|
|
|
2015-04-28 15:10:40 +00:00
|
|
|
<!-- 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}}
|