mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
7c04f13c6f
Now the bar doesn't collapse.
Removed the index button so everything fits on all mobile devices.
y
Former-commit-id: aa72cb55cfdbd6343078e9d145358f91b0eb8078 [formerly 06c6c66e5001c65cd491e665eb7886ab39fbde25] [formerly 76b4cdc06144903e3f14e5c1c8d0d6a4bc082f44 [formerly ea241506f5
]]
Former-commit-id: ebafef049e36a287c150cb84a6cc6f301b761850 [formerly a7809fdd47f9b28e63ec6a5a52b6338d5fdf91d3]
Former-commit-id: 9f4d68bcf856495c64e22353b2e219970b097a55
94 lines
3.0 KiB
Cheetah
94 lines
3.0 KiB
Cheetah
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>{{ .Title }}</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"> {{ template "header" }}
|
|
|
|
<link rel="stylesheet" type="text/css" href="/static/css/view.css">
|
|
<style>
|
|
.yue ul {
|
|
padding: 0;
|
|
list-style-type: none;
|
|
}
|
|
span { cursor: pointer; }
|
|
</style>
|
|
|
|
|
|
|
|
</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="/">{{ .Title }}</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><a href="/{{ .Title }}/view"><span class="glyphicon glyphicon-sunglasses" aria-hidden="true"></span> View</a></li>
|
|
<li class="active"><a href="/{{ .Title }}/list"><span class="glyphicon glyphicon-align-left" aria-hidden="true"></span> List</a></li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="active"><span class="glyphicon glyphicon-question-sign" aria-hidden="true"></span> Help <span class="caret"></span></a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="/Help/view"> Help</a></li>
|
|
<li><a href="/PrivacyPolicy/view"> Privacy Policy</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<!--/.nav-collapse -->
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="yue">
|
|
<ul>
|
|
{{ range $index, $element := .ListItems }}
|
|
{{ $element }}
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
|
|
<script>
|
|
$('.deletable').click(function(event) {
|
|
event.preventDefault();
|
|
var lineNum = $(this).attr('id')
|
|
$.ajax({
|
|
url: "/listitem" + '?' + $.param({
|
|
"lineNum": lineNum,
|
|
"title": "{{ .Title }}"
|
|
}),
|
|
type: 'DELETE',
|
|
success: function() {
|
|
window.location.reload(true);
|
|
}
|
|
});
|
|
});
|
|
|
|
$(document).keydown(function(e){
|
|
if( e.which === 69 && e.ctrlKey && e.shiftKey ){
|
|
console.log('control + shift + e');
|
|
window.location = "/{{ .Title }}";
|
|
}
|
|
});
|
|
$(document).keydown(function(e){
|
|
if( e.which === 90 && e.ctrlKey && e.shiftKey ){
|
|
console.log('control + shift + z');
|
|
window.location = "/{{ .Title }}/view";
|
|
}
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|