update epub.js
This commit is contained in:
parent
7cc5ac19c7
commit
2493a6699c
26 changed files with 13574 additions and 1162 deletions
|
|
@ -3,101 +3,119 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>epub.js</title>
|
||||
<title></title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
<link rel="stylesheet" href="/static/epub.js/css/normalize.css">
|
||||
<link rel="stylesheet" href="/static/epub.js/css/main.css">
|
||||
<link rel="stylesheet" href="/static/epub.js/css/popup.css">
|
||||
|
||||
<script src="/static/epub.js/libs/jquery-2.1.0.min.js"></script>
|
||||
|
||||
<script src="/static/epub.js/libs/zip.min.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
document.onreadystatechange = function () {
|
||||
if (document.readyState == "complete") {
|
||||
EPUBJS.filePath = "/static/epub.js/libs/";
|
||||
EPUBJS.cssPath = "/static/epub.js/css/";
|
||||
// fileStorage.filePath = EPUBJS.filePath;
|
||||
|
||||
var reader = ePubReader(document.location.pathname.replace(/\/reader\//, '/epub/'));
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<!-- EPUBJS Renderer -->
|
||||
<!-- Render -->
|
||||
<script src="/static/epub.js/epub.min.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#main {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#area {
|
||||
position: absolute;
|
||||
right: 44px;
|
||||
left: 44px;
|
||||
top: 32px;
|
||||
bottom: 32px;
|
||||
}
|
||||
|
||||
#area iframe {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#prev {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 36px;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#next {
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 36px;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.arrow {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.arrow:hover {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.arrow:active {
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<!-- Hooks -->
|
||||
<script src="/static/epub.js/hooks.min.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
<!-- Reader -->
|
||||
<script src="/static/epub.js/reader.min.js"></script>
|
||||
|
||||
<!-- Plugins -->
|
||||
<script src="/static/epub.js/plugins/search.js"></script>
|
||||
|
||||
<!-- Highlights -->
|
||||
<script src="/static/epub.js/libs/jquery.highlight.js"></script>
|
||||
<script src="/static/epub.js/hooks/extensions/highlight.js"></script>
|
||||
|
||||
<!-- File Storage -->
|
||||
<!-- <script src="/static/epub.js/libs/fileStorage.min.js"></script> -->
|
||||
|
||||
function bookUrl() {
|
||||
return document.location.pathname.replace(/\/reader\//, '/epub/');
|
||||
}
|
||||
|
||||
var Book = ePub({store: false});
|
||||
Book.open(bookUrl());
|
||||
Book.getMetadata().then(function(meta) {
|
||||
document.title = meta.bookTitle + " – " + meta.creator;
|
||||
document.addEventListener("keydown", function(event) {
|
||||
if (event.keyCode == 39 || event.keyCode == 40) {
|
||||
Book.nextPage();
|
||||
} else if (event.keyCode == 37 || event.keyCode == 38) {
|
||||
Book.prevPage();
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
</script>
|
||||
<!-- Full Screen -->
|
||||
<script src="/static/epub.js/libs/screenfull.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<div id="prev" onclick="Book.prevPage();" class="arrow"></div>
|
||||
<div id="area"></div>
|
||||
<div id="next" onclick="Book.nextPage();"class="arrow"></div>
|
||||
<div id="sidebar">
|
||||
<div id="panels">
|
||||
<input id="searchBox" placeholder="search" type="search">
|
||||
|
||||
<a id="show-Search" class="show_view icon-search" data-view="Search">Search</a>
|
||||
<a id="show-Toc" class="show_view icon-list-1 active" data-view="Toc">TOC</a>
|
||||
<a id="show-Bookmarks" class="show_view icon-bookmark" data-view="Bookmarks">Bookmarks</a>
|
||||
<a id="show-Notes" class="show_view icon-edit" data-view="Notes">Notes</a>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
Book.renderTo("area");
|
||||
|
||||
</script>
|
||||
<div id="tocView" class="view">
|
||||
</div>
|
||||
<div id="searchView" class="view">
|
||||
<ul id="searchResults"></ul>
|
||||
</div>
|
||||
<div id="bookmarksView" class="view">
|
||||
<ul id="bookmarks"></ul>
|
||||
</div>
|
||||
<div id="notesView" class="view">
|
||||
<div id="new-note">
|
||||
<textarea id="note-text"></textarea>
|
||||
<button id="note-anchor">Anchor</button>
|
||||
</div>
|
||||
<ol id="notes"></ol>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main">
|
||||
|
||||
<div id="titlebar">
|
||||
<div id="opener">
|
||||
<a id="slider" class="icon-menu">Menu</a>
|
||||
</div>
|
||||
<div id="metainfo">
|
||||
<span id="book-title"></span>
|
||||
<span id="title-seperator"> – </span>
|
||||
<span id="chapter-title"></span>
|
||||
</div>
|
||||
<div id="title-controls">
|
||||
<a id="bookmark" class="icon-bookmark-empty">Bookmark</a>
|
||||
<a id="setting" class="icon-cog">Settings</a>
|
||||
<a id="fullscreen" class="icon-resize-full">Fullscreen</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="divider"></div>
|
||||
<div id="prev" class="arrow">‹</div>
|
||||
<div id="viewer"></div>
|
||||
<div id="next" class="arrow">›</div>
|
||||
|
||||
<div id="loader"><img src="img/loader.gif"></div>
|
||||
</div>
|
||||
<div class="modal md-effect-1" id="settings-modal">
|
||||
<div class="md-content">
|
||||
<h3>Settings</h3>
|
||||
<div>
|
||||
<p>
|
||||
<input type="checkbox" id="sidebarReflow" name="sidebarReflow">Reflow text when sidebars are open.</input>
|
||||
</p>
|
||||
</div>
|
||||
<div class="closer icon-cancel-circled"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue