asciidoctor-html 2.2.8 → 2.2.9
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 +4 -0
- data/assets/css/jupyterlite-repl.css +1 -1
- data/assets/css/styles.css +2 -2
- data/lib/asciidoctor/html/book_template.rb +1 -1
- data/lib/asciidoctor/html/flip.rb +1 -1
- data/lib/asciidoctor/html/pagination.rb +2 -2
- data/lib/asciidoctor/html/sidebar.rb +6 -11
- data/lib/asciidoctor/html/version.rb +1 -1
- metadata +1 -1
|
@@ -11,7 +11,7 @@ module Asciidoctor
|
|
|
11
11
|
# The template for the book layout
|
|
12
12
|
module BookTemplate
|
|
13
13
|
MENU_BTN = <<~HTML
|
|
14
|
-
<button type="button" id="menu-btn" class="btn menu"
|
|
14
|
+
<button type="button" id="menu-btn" class="btn menu fadein"
|
|
15
15
|
aria-expanded="false" aria-controls="sidebar">
|
|
16
16
|
<i class="bi bi-list"></i>
|
|
17
17
|
</button>
|
|
@@ -148,6 +148,7 @@ module Asciidoctor
|
|
|
148
148
|
// MathJax needs displayed content to calculate auto line breaks.
|
|
149
149
|
await MathJax.startup.promise;
|
|
150
150
|
await MathJax.typesetPromise(typesetEls);
|
|
151
|
+
ADHT.nudgeMenuBtn();
|
|
151
152
|
page.classList.add('loaded');
|
|
152
153
|
|
|
153
154
|
nav.forEach(el => {
|
|
@@ -173,7 +174,6 @@ module Asciidoctor
|
|
|
173
174
|
focusOnLoad();
|
|
174
175
|
if(isPresentation) focusEl.dataset.flip = id;
|
|
175
176
|
currentId = id;
|
|
176
|
-
ADHT.nudgeMenuBtn();
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
const dropdownItems = document.querySelectorAll('#viewmode-actions .dropdown-item');
|
|
@@ -41,8 +41,8 @@ module Asciidoctor
|
|
|
41
41
|
def display_paginator(prv, nxt)
|
|
42
42
|
blank = %(<span class="blank"> </span>)
|
|
43
43
|
html = [<<~HTML
|
|
44
|
-
<div class="paginator-wrapper
|
|
45
|
-
<div id="paginator" class="paginator dynamic-width">
|
|
44
|
+
<div class="paginator-wrapper">
|
|
45
|
+
<div id="paginator" class="paginator dynamic-width fadein">
|
|
46
46
|
HTML
|
|
47
47
|
]
|
|
48
48
|
html << if prv
|
|
@@ -9,19 +9,14 @@ module Asciidoctor
|
|
|
9
9
|
const menuBtn = document.getElementById('menu-btn');
|
|
10
10
|
if(!menuBtn) return;
|
|
11
11
|
|
|
12
|
-
const isPresentation = page.classList.contains('presentation')
|
|
13
|
-
if(isPresentation) {
|
|
14
|
-
menuBtn.getAnimations().forEach(anim => anim.cancel());
|
|
15
|
-
return menuBtn;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
12
|
const scrollbarWidth = page.offsetWidth - page.clientWidth;
|
|
19
13
|
|
|
20
14
|
// Nudge menuBtn in case there is a scrollbar
|
|
21
|
-
menuBtn.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
menuBtn.style.right = (scrollbarWidth + 12) + 'px';
|
|
16
|
+
|
|
17
|
+
if(menuBtn.classList.contains('fadein')) {
|
|
18
|
+
setTimeout(() => menuBtn.classList.remove('fadein'), 600);
|
|
19
|
+
}
|
|
25
20
|
|
|
26
21
|
// Cache scrollbar width
|
|
27
22
|
ADHT.scrollbarWidth = scrollbarWidth;
|
|
@@ -43,7 +38,7 @@ module Asciidoctor
|
|
|
43
38
|
addEventListener('resize', hideSidebar);
|
|
44
39
|
dismissBtn && dismissBtn.addEventListener('click', hideSidebar);
|
|
45
40
|
|
|
46
|
-
const menuBtn =
|
|
41
|
+
const menuBtn = document.getElementById('menu-btn');
|
|
47
42
|
if(!menuBtn) return;
|
|
48
43
|
// Add click listener to toggle sidebar
|
|
49
44
|
menuBtn.addEventListener('click', function() {
|