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 7e119c965b Math works now
Former-commit-id: eceee055a867137f932b404d34eaa12670f26972 [formerly eaa2c146681562f6b5a8a4da0a7696ee5bb02294] [formerly e6c95dc13d732fc40969aca8a107cbed95e5420b [formerly ccccad5945a1cae98b8774b3a12c05b521a4fb33 [formerly 26ad3b91f0]]]
Former-commit-id: 44b243264528f5c76abd6b841daa3e55449814a0 [formerly bd2a75d4d50f86baee9f891bbf918de090c5831c]
Former-commit-id: f7b97e61be109c7cbf55bcf93eef6a4e683e5c5d
Former-commit-id: 9102ca2d95
2016-02-07 13:49:46 -05:00

65 lines
1.7 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="/">Cowyo</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/{{ .Title }}">Edit</a></li>
<li class="active"><a href="/{{ .Title }}/view">View</a></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>