mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
372409fd3f
Former-commit-id: d7dd48b445460200e7908075cf733174a8246254 [formerly 5869e2467eed2bc5c318512b63860df9d5966d28] [formerly 226550cd05852e82435f683b147856e7d3998e79 [formerly c3551f6570
]]
Former-commit-id: 32f901e8d449d87ee6387db1d5e1e1412e39b7ac [formerly 66a4762ef05070986effeb22a6d398a2f4393866]
Former-commit-id: ee34c3ac6d445c2b53b9b5936593f9ea6d5b331a
82 lines
2.8 KiB
Cheetah
82 lines
2.8 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="/">{{ .WikiName }}</a>
|
|
</div>
|
|
<div id="navbar" class="collapse navbar-collapse">
|
|
<ul class="nav navbar-nav">
|
|
<li><a href="/{{ .Title }}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit</a></li>
|
|
<li class="dropdown active">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="active"><span class="glyphicon glyphicon-sunglasses" aria-hidden="true"></span> 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"><span class="glyphicon glyphicon-align-left" aria-hidden="true"></span> List</a></li>
|
|
<li><a href="/about/view"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> 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 });
|
|
});
|
|
|
|
});
|
|
|
|
$(document).keydown(function(e){
|
|
if( e.which === 69 && e.ctrlKey && e.shiftKey ){
|
|
console.log('control + shift + e');
|
|
window.location = "/{{ .Title }}";
|
|
}
|
|
});
|
|
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|