2023-10-10 23:06:12 +00:00
|
|
|
{{template "base.html" .}} {{define "title"}}Reader{{end}} {{define "header"}}
|
|
|
|
<a href="../">Documents</a>
|
|
|
|
{{end}} {{define "content"}}
|
2023-10-14 01:06:49 +00:00
|
|
|
|
|
|
|
<div id="viewer" class="w-full h-screen"></div>
|
|
|
|
|
2023-10-12 23:14:29 +00:00
|
|
|
<script src="../../assets/reader/platform.js"></script>
|
2023-10-10 23:06:12 +00:00
|
|
|
<script src="../../assets/reader/jszip.min.js"></script>
|
|
|
|
<script src="../../assets/reader/epub.min.js"></script>
|
2023-10-14 01:06:49 +00:00
|
|
|
<script src="../../assets/reader/no-sleep.js"></script>
|
2023-10-10 23:06:12 +00:00
|
|
|
<script src="../../assets/reader/index.js"></script>
|
|
|
|
<script>
|
|
|
|
let currentReader = new EBookReader("./file", {
|
2023-10-12 23:14:29 +00:00
|
|
|
id: "{{ .Data.ID }}",
|
2023-10-10 23:06:12 +00:00
|
|
|
words: {{ .Data.Words }},
|
|
|
|
pages: {{ .Data.Pages }},
|
|
|
|
progress: "{{ .Progress }}",
|
|
|
|
percentage: {{ .Data.Percentage }},
|
|
|
|
currentWord: {{ .Data.Percentage }} * ({{ .Data.Words }} / 100),
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{{ end}}
|