1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/templates/view.tmpl
Zack Scholl 0aadcf234f Renaming
Former-commit-id: 52e9247ae1f18de7d6107fa3b8f09405f20ff67e [formerly 061925e345a1ae9c1a9a79ccafcdffc48a16a915] [formerly 6a95b5bc1fbc107f24cc4d22984b11b3a0431932 [formerly 61e188f5d9920a2c8629cbd8ec8e650d0987ebb2 [formerly 090f3d84d7]]]
Former-commit-id: 9dd617a9fda1a8a2e5aae3a7ae778e636b99fffb [formerly 23d3c62c29d6fc94b723210e33b867f02c342d73]
Former-commit-id: 26249524711272ca85cbef90494f9a3f55d58d5e
Former-commit-id: c4bc87720c
2016-02-10 15:46:44 -05:00

75 lines
2.3 KiB
Cheetah

<!DOCTYPE html>
<html>
<head>
<title>{{ .Title }}</title>
{{ template "header" }}
<link rel="stylesheet" type="text/css" href="/static/css/view.css">
<link rel="stylesheet" type="text/css" href="/static/css/katex.min.css">
<script src="/static/js/katex.min.js"></script>
</head>
<body>
<!-- Fixed navbar -->
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="/">AwwKoala</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/{{ .Title }}">Edit</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="active">View <span class="caret"></span></a>
<ul class="dropdown-menu">
<li class="dropdown-header">Previous versions</li>
<li><a href="/{{ .Title }}/view?version=0">First</a></li>
{{ range .Versions }}
<li><a href="/{{ $.Title }}/view?version={{ .VersionNum }}">{{ .VersionDate }}</a></li>
{{ end }}
<li><a href="/{{ .Title }}/view">Current</a></li>
</ul>
</li>
<li><a href="/{{ .Title }}/list">List</a></li>
<li><a href="/about/view">About</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
<div class="yue">
{{ .Body }}
</div>
<script>
$( document ).ready(function() {
var texi = document.getElementsByClassName("texi");
Array.prototype.forEach.call(texi, function(el) {
katex.render(el.getAttribute("data-expr"), el, { displayMode: false });
});
var texp = document.getElementsByClassName("texp");
Array.prototype.forEach.call(texp, function(el) {
katex.render(el.getAttribute("data-expr"), el, { displayMode: true });
});
});
</script>
</body>
</html>