1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Updated examples

This commit is contained in:
Fred Chasen 2016-09-24 00:21:20 +02:00
parent 89387f1ef2
commit e408a822e0
20 changed files with 468 additions and 699 deletions

View file

@ -6,62 +6,12 @@
<script src="../dist/epub.js"></script>
<link rel="stylesheet" type="text/css" href="examples.css">
<style type="text/css">
body {
margin: 0;
height: 100%;
}
#viewer {
display: block;
margin: 5% auto;
width: 80%;
height: 80%;
border: none;
}
#prev {
left: 40px;
}
#next {
right: 40px;
}
.arrow {
position: absolute;
top: 50%;
margin-top: -32px;
font-size: 64px;
color: #E2E2E2;
font-family: arial, sans-serif;
font-weight: bold;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.arrow:hover {
color: #777;
}
.arrow:active {
color: #000;
}
#toc {
display: block;
margin: 10px auto;
}
</style>
</head>
<body>
<select id="toc"></select>
<!-- <iframe id="viewer"></iframe> -->
<div id="viewer"></div>
<div id="viewer" class="scrolled"></div>
<div id="prev" class="arrow"></div>
<div id="next" class="arrow"></div>
@ -72,7 +22,7 @@
var currentSection;
var currentSectionIndex = 6;
var book = ePub("../books/moby-dick/OPS/package.opf");
var book = ePub("https://s3.amazonaws.com/epubjs/books/moby-dick/OPS/package.opf");
book.loaded.navigation.then(function(toc){
var $select = document.getElementById("toc"),
docfrag = document.createDocumentFragment();