AnthoLume/templates/reader.html

21 lines
789 B
HTML

{{template "base.html" .}} {{define "title"}}Reader{{end}} {{define "header"}}
<a href="../">Documents</a>
{{end}} {{define "content"}}
<script src="../../assets/reader/platform.js"></script>
<script src="../../assets/reader/jszip.min.js"></script>
<script src="../../assets/reader/epub.min.js"></script>
<script src="../../assets/reader/index.js"></script>
<div id="viewer" class="w-full h-[100dvh] absolute top-0 left-0"></div>
<div id="hiddden-viewer" class="hidden"></div>
<script>
let currentReader = new EBookReader("./file", {
id: "{{ .Data.ID }}",
words: {{ .Data.Words }},
pages: {{ .Data.Pages }},
progress: "{{ .Progress }}",
percentage: {{ .Data.Percentage }},
currentWord: {{ .Data.Percentage }} * ({{ .Data.Words }} / 100),
});
</script>
{{ end}}