hyperbook 0.34.2 → 0.35.0
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
CHANGED
|
@@ -4,7 +4,7 @@ var hyperbook = (function () {
|
|
|
4
4
|
const calcMaxHeight = (elem) => {
|
|
5
5
|
const content = elem.nextElementSibling;
|
|
6
6
|
if (content) {
|
|
7
|
-
if (elem.classList.contains("
|
|
7
|
+
if (elem.classList.contains("expanded")) {
|
|
8
8
|
content.style.maxHeight = content.scrollHeight + "px";
|
|
9
9
|
} else {
|
|
10
10
|
content.style.maxHeight = "0";
|
|
@@ -20,9 +20,13 @@ var hyperbook = (function () {
|
|
|
20
20
|
};
|
|
21
21
|
for (let collapsible of collapsibles) {
|
|
22
22
|
collapsible.addEventListener("click", () => {
|
|
23
|
-
collapsible.classList.toggle("
|
|
23
|
+
collapsible.classList.toggle("expanded");
|
|
24
24
|
calcMaxHeight(collapsible);
|
|
25
25
|
});
|
|
26
|
+
|
|
27
|
+
if (collapsible.classList.contains("expanded")) {
|
|
28
|
+
calcMaxHeight(collapsible);
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
function tocToggle() {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
margin-bottom: 10px;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.directive-collapsible button.
|
|
14
|
+
.directive-collapsible button.expanded {
|
|
15
15
|
border-bottom-left-radius: 0px;
|
|
16
16
|
border-bottom-right-radius: 0px;
|
|
17
17
|
margin-bottom: 0px;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
margin-left: 5px;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.directive-collapsible button.
|
|
28
|
+
.directive-collapsible button.expanded:after {
|
|
29
29
|
content: "\2796";
|
|
30
30
|
/* Unicode character for "minus" sign (-) */
|
|
31
31
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
display: none;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.directive-collapsible button.
|
|
42
|
+
.directive-collapsible button.expanded+.collapsible-content {
|
|
43
43
|
display: block;
|
|
44
44
|
border-style: solid;
|
|
45
45
|
border-width: 1px;
|
|
File without changes
|
package/dist/assets/shell.css
CHANGED
|
@@ -615,11 +615,11 @@ nav li+li {
|
|
|
615
615
|
margin-left: 5px;
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
-
.collapsible.
|
|
618
|
+
.collapsible.expanded:after {
|
|
619
619
|
content: "\2212";
|
|
620
620
|
}
|
|
621
621
|
|
|
622
|
-
.collapsible.
|
|
622
|
+
.collapsible.expanded+.collapsible-content {
|
|
623
623
|
max-height: 9999px;
|
|
624
624
|
}
|
|
625
625
|
|