Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<title>
LIBER - "{{.Book.Metadata.Title}}"
</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="shortcut icon" href="/static/favicon.ico">
<link rel="stylesheet" href="/static/css/reader.css">
</head>
<body>
<div id="main">
<div id="prev" class="arrow">‹</div>
<div id="area"></div>
<div id="next" class="arrow">›</div>
</div>
<script src="/static/js/jquery-2.1.1.min.js"></script>
<script src="/static/js/epub.min.js"></script>
<script src="/static/js/zip.min.js"></script>
<script>
EPUBJS.filePath = "/static/js/";
$(function() {
var Book = ePub("/dl/{{.Book.Id}}/{{.FileIndex}}",
{restore: true, contained: true});
$("#prev").click(function() { Book.prevPage(); });
$("#next").click(function() { Book.nextPage(); });
$(window).keydown(function(event) {
//console.log('keydown(): ' + event.which);
if (event.which == 33 || event.which == 37 || event.which == 38) {
Book.prevPage();
} else if (event.which == 32 || event.which == 34 || event.which == 39 || event.which == 40) {
Book.nextPage();
}
});
Book.renderTo("area");
});
</script>
</body>
</html>