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 48ce4b2ebf Added inline math
Former-commit-id: 16d1a0de448a447cdae94602c889bd3752af2a58 [formerly 578c58bd645802094d1bb45674a7c39ca09c0279] [formerly 7087210383074b49a2298b36f3ffa284cb942d28 [formerly b83c57b788ca5d1bea6055f86511b8e40a01f204 [formerly 3433556629]]]
Former-commit-id: ecb793c94c486f5b2d81f7886bd3b35b5ceda35a [formerly 386cc3db1b04854cecadbe16c6440619982752e0]
Former-commit-id: 5c75a42864a146e0d4b8bd20d71c05f7043cd79e
Former-commit-id: 3cd10cb68c
2016-02-07 13:38:39 -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: true });
});
var texp = document.getElementsByClassName("texp");
Array.prototype.forEach.call(texp, function(el) {
katex.render(el.getAttribute("data-expr"), el, { displayMode: false });
});
});
</script>
</body>
</html>