1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

Merge branch 'master' of https://github.com/fchasen/fpjs into experimentalFeatures

Updates to Readme and documentation.
This commit is contained in:
RawKStar77 2013-06-04 14:53:28 -07:00
commit d29468feeb
5 changed files with 36 additions and 22 deletions

View file

@ -1,15 +1,15 @@
FuturePress
Epub.js
================================
![FuturePress Views](http://fchasen.com/futurepress/fp.png)
FuturePress is a javascript library for rendering ePUB's in the browser, across many devices.
Epub.js is a javascript library for rendering ePUB's in the browser, across many devices.
FPJS provides common ebook functions (such as persistence and pagination) without the need to develop a dedicated application or plugin.
Epub.js provides common ebook functions (such as persistence and pagination) without the need to develop a dedicated application or plugin.
Unlike an application, our HTML / Javascript reader can be hosted anywhere and can be easily customized using javascript, such as changing the interface or adding annotation functionality.
[Try it while reading Moby Dick](http://fchasen.github.com/fpjs/)
[Try it while reading Moby Dick](http://fchasen.github.com/epub.js/)
Why EPUB
-------------------------
@ -41,16 +41,6 @@ http-server
* [index.html](http://localhost:8080/index.html) will use the minified production libraries in the dist/ folder.
* [annotator.html](http://localhost:8080/annotator.html) is a dev branch for annotation development.
Running With Apache
-------------------------
To serve up books on the web, you may need to edit your .htaccess file with the following:
```
AddType application/oebps-package+xml .opf
AddType application/x-dtbncx+xml .ncx
```
Building for Distribution
-------------------------
@ -90,9 +80,9 @@ The browser tells the reader when there is Internet connectivity, and by listeni
Hooks
-------------------------
Similar to a plugins, FPJS implements events that can be "hooked" into.
Similar to a plugins, FPJS implements events that can be "hooked" into. Thus you can interact with and manipulate the contents of the book.
Examples of this functionality is loading videos from youtube links before displaying a chapters contents.
Examples of this functionality is loading videos from youtube links before displaying a chapters contents or implementing annotation.
Hooks require a event to latch onto and a callback for when they are finished.
@ -113,3 +103,19 @@ FP.Hooks.register("beforeChapterDisplay").example = function(callback, chapter){
}
```
Additional Resources
-------------------------
Follow us on twitter: @Epubjs
+ http://twitter.com/#!/Epubjs
Similar projects:
http://readium.org/
https://github.com/readium/readium-viewer-demo1
https://github.com/readium/Readium-Web-Components
#Other
EPUB is a registered trademark of the IDPF.

BIN
apple-touch-icon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -55,10 +55,11 @@ body {
#area {
width: 80%;
height: 80%;
margin-left: 10%;
/* margin-left: 10%; */
margin: 0 auto;
max-width: 1250px;
z-index: 2;
position: absolute;
/* z-index: 2;
position: absolute; */
}
#area iframe {

View file

@ -1,4 +1,9 @@
FP.Hooks.register("beforeChapterDisplay").transculsions = function(callback, chapter){
/*
<aside ref="http://www.youtube.com/embed/DUL6MBVKVLI?html5=1" transclusion="video" width="560" height="315">
<a href="http://www.youtube.com/embed/DUL6MBVKVLI"> Watch the National Geographic: The Last Roll of Kodachrome</a>
</aside>
*/
var trans = chapter.doc.querySelectorAll('[transclusion]'),
items = Array.prototype.slice.call(trans);

View file

@ -18,10 +18,12 @@
document.onreadystatechange = function () {
if (document.readyState == "complete") {
FP.filePath = "/dist/";
FP.VERSION = "0.1.6";
FP.filePath = "/fpjs/dist/";
fileStorage.filePath = FP.filePath + "libs/";
FPR.app.init();
FPR.app.init("moby-dick");
}
};
@ -67,10 +69,10 @@
<span id="title-seperator">&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span id="chapter-title"> </span>
</div>
<div id="divider"></div>
<div id="prev" class="arrow"></div>
<div id="area"></div>
<div id="next" class="arrow"></div>
<div id="divider"></div>
<div id="loader"><img src="img/loader.gif"></div>
</div>
</body>