hyperbook 0.38.4 → 0.39.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.
- package/dist/assets/client.js +1 -24
- package/dist/assets/shell.css +41 -43
- package/dist/index.js +2 -2
- package/package.json +4 -4
package/dist/assets/client.js
CHANGED
|
@@ -1,33 +1,10 @@
|
|
|
1
1
|
var hyperbook = (function () {
|
|
2
2
|
const collapsibles = document.getElementsByClassName("collapsible");
|
|
3
|
-
|
|
4
|
-
const calcMaxHeight = (elem) => {
|
|
5
|
-
if (!elem) return;
|
|
6
|
-
const content = elem.nextElementSibling;
|
|
7
|
-
if (content) {
|
|
8
|
-
if (elem.classList.contains("expanded")) {
|
|
9
|
-
content.style.maxHeight = content.scrollHeight + "px";
|
|
10
|
-
} else {
|
|
11
|
-
content.style.maxHeight = "0";
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
const nextParentContent = elem.closest(".collapsible-content");
|
|
15
|
-
if (nextParentContent !== null) {
|
|
16
|
-
const nextParentCollapsible = nextParentContent.previousElementSibling;
|
|
17
|
-
setTimeout(function () {
|
|
18
|
-
calcMaxHeight(nextParentCollapsible);
|
|
19
|
-
}, animationDelay);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
3
|
+
|
|
22
4
|
for (let collapsible of collapsibles) {
|
|
23
5
|
collapsible.addEventListener("click", () => {
|
|
24
6
|
collapsible.classList.toggle("expanded");
|
|
25
|
-
calcMaxHeight(collapsible);
|
|
26
7
|
});
|
|
27
|
-
|
|
28
|
-
if (collapsible.classList.contains("expanded")) {
|
|
29
|
-
calcMaxHeight(collapsible);
|
|
30
|
-
}
|
|
31
8
|
}
|
|
32
9
|
|
|
33
10
|
function tocToggle() {
|
package/dist/assets/shell.css
CHANGED
|
@@ -33,27 +33,27 @@ side-drawer {
|
|
|
33
33
|
border-right-color: var(--color-nav-border);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.sidebar
|
|
37
|
-
.nav-drawer-content
|
|
36
|
+
.sidebar > .author,
|
|
37
|
+
.nav-drawer-content > .author {
|
|
38
38
|
color: var(--color-author-color);
|
|
39
39
|
background: var(--color-author-background);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.sidebar
|
|
43
|
-
.nav-drawer-content
|
|
42
|
+
.sidebar > .author:hover,
|
|
43
|
+
.nav-drawer-content > .author:hover {
|
|
44
44
|
color: var(--color-brand);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/* Three bars for burger menu */
|
|
48
|
-
.toggle
|
|
49
|
-
.toggle
|
|
50
|
-
.toggle
|
|
48
|
+
.toggle > .bar1,
|
|
49
|
+
.toggle > .bar2,
|
|
50
|
+
.toggle > .bar3 {
|
|
51
51
|
background-color: var(--color-brand-text);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.inverted .toggle
|
|
55
|
-
.inverted .toggle
|
|
56
|
-
.inverted .toggle
|
|
54
|
+
.inverted .toggle > .bar1,
|
|
55
|
+
.inverted .toggle > .bar2,
|
|
56
|
+
.inverted .toggle > .bar3 {
|
|
57
57
|
background-color: var(--color-brand);
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -74,11 +74,11 @@ header.inverted {
|
|
|
74
74
|
color: var(--color-brand-text);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
header.inverted
|
|
77
|
+
header.inverted > .branding {
|
|
78
78
|
color: var(--color-brand);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
header.inverted
|
|
81
|
+
header.inverted > .branding:hover {
|
|
82
82
|
color: var(--color-brand);
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -86,7 +86,7 @@ header.inverted>.branding:hover {
|
|
|
86
86
|
border-top-color: var(--color-spacer);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.section
|
|
89
|
+
.section > .name {
|
|
90
90
|
color: var(--color-text);
|
|
91
91
|
border-color: var(--color-spacer);
|
|
92
92
|
}
|
|
@@ -96,15 +96,15 @@ header.inverted>.branding:hover {
|
|
|
96
96
|
cursor: pointer;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.section
|
|
99
|
+
.section > .name:hover {
|
|
100
100
|
background: var(--color-spacer);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
.section
|
|
103
|
+
.section > .name.empty:hover {
|
|
104
104
|
background: none;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.section
|
|
107
|
+
.section > .name.active {
|
|
108
108
|
background: var(--color-background);
|
|
109
109
|
color: var(--color-brand);
|
|
110
110
|
}
|
|
@@ -123,7 +123,7 @@ header.inverted>.branding:hover {
|
|
|
123
123
|
color: var(--color-brand);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.section
|
|
126
|
+
.section > .links {
|
|
127
127
|
border-left-color: var(--color-spacer);
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -219,21 +219,21 @@ a.jump.previous::before {
|
|
|
219
219
|
border-right-color: var(--color-nav-border);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.sidebar>nav,
|
|
223
|
-
.nav-drawer-content>nav {
|
|
222
|
+
.sidebar > nav,
|
|
223
|
+
.nav-drawer-content > nav {
|
|
224
224
|
padding: 20px;
|
|
225
225
|
flex: 1;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
.sidebar
|
|
229
|
-
.nav-drawer-content
|
|
228
|
+
.sidebar > .author,
|
|
229
|
+
.nav-drawer-content > .author {
|
|
230
230
|
text-align: center;
|
|
231
231
|
text-decoration: none;
|
|
232
232
|
padding: 20px;
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
.sidebar
|
|
236
|
-
.nav-drawer-content
|
|
235
|
+
.sidebar > .author,
|
|
236
|
+
.nav-drawer-content > .author > b {
|
|
237
237
|
font-weight: bold;
|
|
238
238
|
}
|
|
239
239
|
|
|
@@ -253,9 +253,9 @@ a.jump.previous::before {
|
|
|
253
253
|
cursor: pointer;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.toggle
|
|
257
|
-
.toggle
|
|
258
|
-
.toggle
|
|
256
|
+
.toggle > .bar1,
|
|
257
|
+
.toggle > .bar2,
|
|
258
|
+
.toggle > .bar3 {
|
|
259
259
|
width: 35px;
|
|
260
260
|
height: 5px;
|
|
261
261
|
margin: 6px 0;
|
|
@@ -371,7 +371,7 @@ header {
|
|
|
371
371
|
margin-right: 8px;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
-
#custom-links-footer
|
|
374
|
+
#custom-links-footer > .links-item {
|
|
375
375
|
border-radius: 8px;
|
|
376
376
|
padding: 8px;
|
|
377
377
|
border: 1px solid var(--color-nav-border);
|
|
@@ -383,7 +383,6 @@ header {
|
|
|
383
383
|
margin-left: 24px;
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
|
|
387
386
|
@media (max-width: 960px) {
|
|
388
387
|
#custom-links-header {
|
|
389
388
|
display: none;
|
|
@@ -551,13 +550,13 @@ header {
|
|
|
551
550
|
|
|
552
551
|
.section ul,
|
|
553
552
|
.virtual-section ul,
|
|
554
|
-
nav>ul {
|
|
553
|
+
nav > ul {
|
|
555
554
|
list-style-type: none;
|
|
556
555
|
margin: 0;
|
|
557
556
|
padding: 0;
|
|
558
557
|
}
|
|
559
558
|
|
|
560
|
-
nav li+li {
|
|
559
|
+
nav li + li {
|
|
561
560
|
margin-top: 0px;
|
|
562
561
|
}
|
|
563
562
|
|
|
@@ -571,7 +570,7 @@ nav li+li {
|
|
|
571
570
|
margin-top: 8px;
|
|
572
571
|
}
|
|
573
572
|
|
|
574
|
-
.section
|
|
573
|
+
.section > .name {
|
|
575
574
|
display: flex;
|
|
576
575
|
text-decoration: none;
|
|
577
576
|
padding: 10px;
|
|
@@ -581,12 +580,12 @@ nav li+li {
|
|
|
581
580
|
user-select: none;
|
|
582
581
|
}
|
|
583
582
|
|
|
584
|
-
.section
|
|
583
|
+
.section > .name > .label {
|
|
585
584
|
flex: 1;
|
|
586
585
|
text-decoration: none;
|
|
587
586
|
}
|
|
588
587
|
|
|
589
|
-
.section
|
|
588
|
+
.section > .name > .toggle {
|
|
590
589
|
text-align: right;
|
|
591
590
|
background: none;
|
|
592
591
|
border: none;
|
|
@@ -609,14 +608,14 @@ nav li+li {
|
|
|
609
608
|
content: "\2212";
|
|
610
609
|
}
|
|
611
610
|
|
|
612
|
-
.collapsible
|
|
613
|
-
|
|
611
|
+
.collapsible-content {
|
|
612
|
+
display: none;
|
|
613
|
+
opacity: 0;
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
.collapsible-content {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
transition: max-height 0.1s ease-out;
|
|
616
|
+
.collapsible.expanded + .collapsible-content {
|
|
617
|
+
display: block;
|
|
618
|
+
opacity: 1;
|
|
620
619
|
}
|
|
621
620
|
|
|
622
621
|
.section .section {
|
|
@@ -630,12 +629,11 @@ nav li+li {
|
|
|
630
629
|
text-decoration: none;
|
|
631
630
|
}
|
|
632
631
|
|
|
633
|
-
.section
|
|
632
|
+
.section > .links {
|
|
634
633
|
border-left-width: 1px;
|
|
635
634
|
border-left-style: solid;
|
|
636
635
|
}
|
|
637
636
|
|
|
638
|
-
|
|
639
637
|
.pages {
|
|
640
638
|
margin-top: 30px;
|
|
641
639
|
}
|
|
@@ -663,12 +661,12 @@ nav.toc li {
|
|
|
663
661
|
margin-bottom: 8px;
|
|
664
662
|
}
|
|
665
663
|
|
|
666
|
-
nav.toc li>a {
|
|
664
|
+
nav.toc li > a {
|
|
667
665
|
color: var(--color-text);
|
|
668
666
|
text-decoration: none;
|
|
669
667
|
}
|
|
670
668
|
|
|
671
|
-
nav.toc li>a:hover {
|
|
669
|
+
nav.toc li > a:hover {
|
|
672
670
|
color: var(--color-brand);
|
|
673
671
|
}
|
|
674
672
|
|