Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE - demo better links #1325

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 53 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,58 @@
<meta name="apple-mobile-web-app-capable" content="yes">
</head>
<body>
<ul>
<li><a href="BookReaderDemo/demo-simple.html">Simple</a></li>
<li><a href="BookReaderDemo/view_mode.html">Set initial view mode</a></li>
<li><a href="BookReaderDemo/toggle_controls.html">Toggle and override individual controls</a></li>
<li><a href="BookReaderDemo/demo-fullscreen.html">Fullscreen with mobile nav</a></li>
<li><a href="BookReaderDemo/demo-fullscreen-mobile.html">Inline on page, with mobile nav on fullscreen</a></li>
<li><a href="BookReaderDemo/demo-vendor-fullscreen.html">Vendor native fullscreen</a></li>
<li><a href="BookReaderDemo/demo-advanced.html">Advanced</a></li>
<li><a href="BookReaderDemo/demo-preview-pages.html">Preview Pages</a></li>
<li><a href="BookReaderDemo/demo-embed.html">Embed</a></li>
<li><a href="BookReaderDemo/demo-multiple.html">Multiple on same page</a></li>
<!-- plugin.search.js -->
<li><a href="BookReaderDemo/demo-internetarchive.html?ocaid=theworksofplato01platiala">From Internet Archive</a></li>
<!-- plugin.search.js -->
<li><a href="BookReaderDemo/demo-internetarchive.html?ocaid=adventureofsherl0000unse">From Internet Archive - a book with CHAPTERS</a></li>
<li><a href="BookReaderDemo/demo-iiif.html">IIIF</a></li>
<li><a href="BookReaderDemo/demo-autoplay.html">Autoplay (kiosk mode)</a></li>
<li><a href="BookReaderDemo/demo-plugin-menu-toggle.html">Plugin: Full screen menu toggle</a></li>
<li><a href="BookReaderDemo/immersion-mode.html">Start in immersion (fullscreen) mode</a></li>
<!-- plugin.search.js -->
<li><a href="BookReaderDemo/immersion-1up.html">Start in immersion mode on 1up default item</a></li>
<li><a href="BookReaderDemo/viewmode-cycle.html">Replace view mode buttons with view mode cycler</a></li>
</ul>
iisa marked this conversation as resolved.
Show resolved Hide resolved
<section id="temp-demo">
<style>
form {
/* display: flex; */
}
label, input {
display: block;
margin: 5px 0;
}
input {
min-width: 250px;
min-height: 20px;
border: 1px solid;
padding: 0 10px;
}
</style>
<h2>Book</h2>
<form id="item-link" style="">
<label for="item-id-field">a certain item identifier:</label>
<input type="text" id="item-id-field" value="whatdoesyourhand0000nady">
<label for="item-leaf-page-field">a certain leaf or page number:</label>
<input type="text" id="item-leaf-page-field" value="n49">
<button type="submit">Submit</button>
</form>
<script>
const form = document.getElementById('item-link');
form.addEventListener('submit', (e) => {
e.preventDefault();
const form = document.getElementById('item-link');
const newid = form.querySelector('input#item-id-field')?.value;
const newLeafOrPageNum = form.querySelector('input#item-leaf-page-field')?.value;

console.log({
form,
newid,
});
if (!newid) return;

const pageInfo = newLeafOrPageNum ? `/page/${newLeafOrPageNum}` : '';
const url = new URL(`/details/${newid}${pageInfo}`, `http://www-isa.archive.org`);
window.location.href = url.href;
});
</script>

<ul>
<li><a href="https://www-isa.archive.org/details/twelveblackflori0000neyl/page/n22/mode/2upp">twelveblackflori0000neyl - leaf n22</a></li>
<li><a href="https://www-isa.archive.org/details/ilovemyselfwheni0000hurs/page/n142/mode/2upp">ilovemyselfwheni0000hurs - leaf n142</a></li>
<li><a href="https://www-isa.archive.org/details/newplaysforblack00king/page/n222/mode/2upp">newplaysforblack00king - leaf n222</a></li>
<li><a href="https://www-isa.archive.org/details/zoranealehurston0000mcki_p4z4/page/16/mode/2upp">zoranealehurston0000mcki_p4z4 - page 16</a></li>
</ul>
</section>
<br>
<br>
</body>
</html>
Loading