-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
50 lines (43 loc) · 2.44 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!doctype html>
<html>
<head>
<!-- <base href="/"> -->
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var url = document.URL;
var user = url.slice(url.indexOf("//") + 2, url.indexOf("."));
var repo = url.split("/").slice(-2, -1);
$("#pdf-link").attr("href","http://pdf.oerpub.org/" + user + "/" + repo + "/");
$("#epub-link").attr("href","https://github.com/" + user + "/" + repo + "/archive/gh-pages.zip");
$("#epub-folder").text(repo + "-gh-pages");
if (user.indexOf("/") != -1) { // back-up in case it's a local URL
$("#pdf-link, #epub-link").click(function(e){
alert("Unfortunately this link doesn't work from a local checkout. Please accept our apologies for this inconvenience.");
e.preventDefault();
});
}
});
</script>
</head>
<body>
<h1>Preview your book:</h1>
<h2>Online</h2>
<p>Alpha. Edits in the book may take up to 10 minutes to be available for preview.</p>
<ul>
<li>Click <a href="./reader.html">here to open the first book using epubjs reader</a>. You can include comments using Hypothes.is annotations.</li>
<li>Click <a href="./basic-view.html">here to see a basic view of all books</a>. This viewer supports mathematics.</li>
</ul>
<h2>PDF</h2>
<p>Check out <a id="pdf-link" href="http://pdf.oerpub.org/oerpub/sf-demo-book/">prototype PDF generation system for this book</a>. It automatically updates the PDF when any of the content of the book changes.</p>
<h2>EPUB</h2>
<p>Get an <a id="epub-link" href="https://github.com/oerpub/sf-demo-book/archive/gh-pages.zip"/>EPUB file</a> here. (Pre-alpha. Requires some technical skills.) The books are stored in EPUB format on GitHub and you can almost just download the zip and view it with Readium (an in-browser EPUB reference implementation reader done by IDPF). If you want to give it a try, download the ZIP and make the following adjustments:
<ul>
<li>Unpack the book and remove the second book from <code>container.xml</code>.</li>
<li>Rezip just the contents of the folder <code id="epub-folder">sf-demo-book-gh-pages</code>, rather than zipping the folder itself.</li>
<li>You should now be able to view the book using the Readium Chrome extension.</li>
</ul>
</p>
</body>
</html>