asciidoctor-html 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/assets/css/jupyterlite-repl.css +1 -1
- data/assets/css/styles.css +2 -2
- data/lib/asciidoctor/html/book_template.rb +9 -0
- data/lib/asciidoctor/html/flip.rb +3 -6
- data/lib/asciidoctor/html/version.rb +1 -1
- metadata +1 -1
|
@@ -210,6 +210,15 @@ module Asciidoctor
|
|
|
210
210
|
<link rel="apple-touch-icon" sizes="180x180" href="#{FAVICON_PATH}/apple-touch-icon.png">
|
|
211
211
|
<meta name="apple-mobile-web-app-title" content="#{opts[:short_title]}">
|
|
212
212
|
<link rel="manifest" href="site.webmanifest">
|
|
213
|
+
<script>
|
|
214
|
+
(function() {
|
|
215
|
+
const params = new URLSearchParams(window.location.search);
|
|
216
|
+
const role = params.get('role');
|
|
217
|
+
if (role && /^[a-zA-Z0-9_-]+$/.test(role)) {
|
|
218
|
+
document.documentElement.classList.add(role);
|
|
219
|
+
}
|
|
220
|
+
})();
|
|
221
|
+
</script>
|
|
213
222
|
<link rel="stylesheet" href="#{CSS_PATH}/styles.css">
|
|
214
223
|
#{highlightjs(opts)}
|
|
215
224
|
<script>
|
|
@@ -202,9 +202,6 @@ module Asciidoctor
|
|
|
202
202
|
else if (direction == 'left' && (link = document.getElementById('flip-back')))
|
|
203
203
|
navigation.navigate(link.href);
|
|
204
204
|
}
|
|
205
|
-
function addRole(className) {
|
|
206
|
-
document.body.classList.add(className);
|
|
207
|
-
}
|
|
208
205
|
addEventListener('hashchange', flip);
|
|
209
206
|
addEventListener('keyup', function(e) {
|
|
210
207
|
switch(e.key) {
|
|
@@ -244,9 +241,9 @@ module Asciidoctor
|
|
|
244
241
|
}));
|
|
245
242
|
|
|
246
243
|
const viewmode = urlParams.get('viewmode');
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
244
|
+
if(['single', 'multi', 'presentation'].includes(viewmode)) {
|
|
245
|
+
changeViewmode(viewmode);
|
|
246
|
+
}
|
|
250
247
|
|
|
251
248
|
flip();
|
|
252
249
|
|