1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

Added error handles, sections, updated url resolving, use book.request for requests

This commit is contained in:
Fred Chasen 2014-08-21 17:39:35 -04:00
parent c6465177c5
commit c29e5f84ee
19 changed files with 3049 additions and 683 deletions

View file

@ -9,19 +9,26 @@
<style type="text/css">
body {
margin: 0;
background: #fafafa;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #333;
}
#viewer {
position: absolute;
left: 10%;
width: 80%;
#viewer {
display: block;
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
/* display: block;
margin: 50px auto;
width: 600px;*/
}
#viewer iframe {
background: white;
box-shadow: 0 0 4px #ccc;
width: 590px;
margin: 10px auto;
}
#prev {
left: 40px;
}
@ -65,7 +72,7 @@
<script>
var currentSectionIndex = 10;
// Load the opf
var book = ePub("../books/moby-dick/OPS/package.opf");
var book = ePub("../books/accessible_epub_3-20121024.epub/package.opf");
var rendition = book.renderTo("viewer");
var displayed = rendition.display(currentSectionIndex);