cec-nuxt-lib 0.6.8 → 0.6.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.
package/dist/module.json
CHANGED
|
@@ -118,29 +118,49 @@ onMounted(() => {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
// Make accordions spring open if there is a hash (looks for an H3)
|
|
121
|
-
let
|
|
122
|
-
if (
|
|
123
|
-
hash =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
.
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
el
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
if (!i) {
|
|
139
|
-
el.scrollIntoView();
|
|
121
|
+
let accordions = document.getElementsByClassName('access-acc-container');
|
|
122
|
+
if (accordions.length) {
|
|
123
|
+
let hash = window.location.hash;
|
|
124
|
+
let found = false;
|
|
125
|
+
if (hash) {
|
|
126
|
+
hash = hash.toLowerCase().replace(/^#/, '').replace(/_/g, ' ');
|
|
127
|
+
Array.from(document.getElementsByTagName('LABEL'))
|
|
128
|
+
.filter((e) => e.innerHTML.toLowerCase().includes(hash))
|
|
129
|
+
.forEach((l, i) => {
|
|
130
|
+
if (l.parentNode.tagName === 'SECTION') {
|
|
131
|
+
let el = l.previousElementSibling;
|
|
132
|
+
if (el.tagName === 'INPUT') {
|
|
133
|
+
el.checked = true;
|
|
134
|
+
if (!i) {
|
|
135
|
+
el.scrollIntoView();
|
|
136
|
+
found = true;
|
|
137
|
+
}
|
|
140
138
|
}
|
|
141
139
|
}
|
|
142
|
-
}
|
|
143
|
-
|
|
140
|
+
});
|
|
141
|
+
if (!found) {
|
|
142
|
+
Array.from(document.getElementsByTagName('H3'))
|
|
143
|
+
.filter((e) => e.innerHTML.toLowerCase().includes(hash))
|
|
144
|
+
.forEach((h3, i) => {
|
|
145
|
+
let parent = h3.parentNode;
|
|
146
|
+
if (parent.tagName === 'ARTICLE') {
|
|
147
|
+
let el = parent.previousElementSibling;
|
|
148
|
+
let input =
|
|
149
|
+
el.tagName === 'LABEL'
|
|
150
|
+
? el.control
|
|
151
|
+
: el.tagName === 'INPUT'
|
|
152
|
+
? el
|
|
153
|
+
: undefined;
|
|
154
|
+
if (input) {
|
|
155
|
+
input.checked = true;
|
|
156
|
+
if (!i) {
|
|
157
|
+
el.scrollIntoView();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
144
164
|
}
|
|
145
165
|
|
|
146
166
|
// Canvas stuff
|
package/package.json
CHANGED