87 lines
3.5 KiB
HTML
87 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>World English Bible Updated</title>
|
|
|
|
<!-- Vendored, not from a CDN: the worker only caches same-origin responses.
|
|
app.css comes second so its variable overrides win. -->
|
|
<link rel="stylesheet" href="bootstrap.min.css">
|
|
<link rel="stylesheet" href="app.css">
|
|
<link rel="manifest" href="manifest.webmanifest">
|
|
<link rel="apple-touch-icon" href="icons/apple-touch-icon.png">
|
|
<meta name="theme-color" content="#1a202c">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<meta name="apple-mobile-web-app-title" content="Bible">
|
|
|
|
<!-- A history entry is a whole book and htmx keeps its cache in localStorage,
|
|
so the cache is off and back/forward is an ordinary page load instead. -->
|
|
<meta name="htmx-config" content='{"historyCacheSize":0,"refreshOnHistoryMiss":true}'>
|
|
|
|
<!-- htmx is not deferred: hx-boost must be in place before the first click.
|
|
Deferred scripts run in order, so bootstrap is defined before app.js. -->
|
|
<script src="htmx.min.js"></script>
|
|
<script src="bootstrap.bundle.min.js" defer></script>
|
|
<script src="app.js" defer></script>
|
|
</head>
|
|
|
|
<!-- This one file is every page. The server answers any navigation with it,
|
|
and app.js puts the fragment the URL names into #content. -->
|
|
<body hx-boost="true" hx-target="#content" hx-swap="innerHTML">
|
|
|
|
<nav class="navbar navbar-expand-lg bg-dark" data-bs-theme="dark">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="index.html">Bible</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
|
|
data-bs-target="#site-nav" aria-controls="site-nav"
|
|
aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse justify-content-end" id="site-nav">
|
|
<!-- Empty until the worker answers api/bookmark. -->
|
|
<span id="bookmark" class="d-none"
|
|
hx-get="api/bookmark" hx-trigger="worker-ready from:body"
|
|
hx-target="this" hx-swap="outerHTML"></span>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main id="content" class="container my-4"></main>
|
|
|
|
<!-- Opened by app.js when a verse number is clicked. -->
|
|
<div class="modal fade" id="verse-dialog" tabindex="-1"
|
|
aria-labelledby="verse-dialog-ref" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h2 class="modal-title fs-5" id="verse-dialog-ref"></h2>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal"
|
|
aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p id="verse-dialog-status" class="form-text m-0"
|
|
role="status" aria-live="polite"></p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<form class="d-flex gap-2 m-0"
|
|
hx-post="api/bookmark" hx-target="#bookmark" hx-swap="outerHTML">
|
|
<input type="hidden" name="ref" value="">
|
|
<input type="hidden" name="href" value="">
|
|
<button class="btn btn-outline-secondary" type="button"
|
|
data-action="copy">Copy link</button>
|
|
<button class="btn btn-primary" type="submit">Set bookmark</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<noscript><p class="container my-4">This app builds its pages in the browser
|
|
and needs JavaScript.</p></noscript>
|
|
|
|
</body>
|
|
</html>
|