@internetstiftelsen/styleguide 2.24.1 → 2.24.2
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.
|
@@ -47,11 +47,8 @@ function setupYoutubePlayer(el) {
|
|
|
47
47
|
el.youtube.destroy();
|
|
48
48
|
el.youtube = null;
|
|
49
49
|
el.removeAttribute('data-youtube-ready');
|
|
50
|
-
<<<<<<< HEAD
|
|
51
|
-
=======
|
|
52
50
|
el.getElementsByTagName('img')[0].style.zIndex = null;
|
|
53
51
|
el.getElementsByTagName('button')[0].style.display = null;
|
|
54
|
-
>>>>>>> feature/open-timelineitem
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
playerEl = document.createElement('div');
|
package/dist/components.js
CHANGED
|
@@ -50,4 +50,10 @@ require('./molecules/glider/glider-hero');
|
|
|
50
50
|
|
|
51
51
|
require('./molecules/context-menu/context-menu');
|
|
52
52
|
|
|
53
|
-
require('./molecules/alert/alert');
|
|
53
|
+
require('./molecules/alert/alert');
|
|
54
|
+
|
|
55
|
+
require('./molecules/continue-video-guide/continue-video-guide');
|
|
56
|
+
|
|
57
|
+
require('./organisms/video-guide/video-guide');
|
|
58
|
+
|
|
59
|
+
require('./organisms/timeline/timeline');
|
|
@@ -136,60 +136,6 @@ if (progressBar) {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
// DUMMY TIMELINE ITEM OPEN/CLOSE
|
|
139
|
-
<<<<<<< HEAD
|
|
140
|
-
/*
|
|
141
|
-
function wrap(el, wrapper) {
|
|
142
|
-
el.parentNode.insertBefore(wrapper, el);
|
|
143
|
-
wrapper.classList.add('wrapper');
|
|
144
|
-
wrapper.appendChild(el);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
const timeLineItems = document.querySelectorAll('.js-timeline-item');
|
|
148
|
-
let timeLineItemScrollPosition = 0;
|
|
149
|
-
|
|
150
|
-
[].forEach.call(timeLineItems, (timeLineItem) => {
|
|
151
|
-
const timeLineItemLink = timeLineItem.querySelector('a');
|
|
152
|
-
const timeLineItemClose = timeLineItem.querySelector('.js-timeline-item-close');
|
|
153
|
-
const timeLineItemBottomClose = timeLineItem.querySelector('.js-timeline-item-bottom-close');
|
|
154
|
-
|
|
155
|
-
timeLineItemLink.addEventListener('click', () => {
|
|
156
|
-
timeLineItemScrollPosition = window.pageYOffset;
|
|
157
|
-
sessionStorage.setItem('scroll-position', timeLineItemScrollPosition);
|
|
158
|
-
|
|
159
|
-
if (!timeLineItem.classList.contains('is-open')) {
|
|
160
|
-
timeLineItem.classList.add('is-open');
|
|
161
|
-
timeLineItem.closest('.row').classList.add('row-has-open-child');
|
|
162
|
-
|
|
163
|
-
// Wrap open timeline item
|
|
164
|
-
wrap(timeLineItem.querySelector('.wp-block-iis-timeline-post'),
|
|
165
|
-
document.createElement('div'));
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
timeLineItemClose.addEventListener('click', () => {
|
|
170
|
-
timeLineItem.classList.remove('is-open');
|
|
171
|
-
timeLineItem.closest('.row').classList.remove('row-has-open-child');
|
|
172
|
-
|
|
173
|
-
// Destroy generated wrapper
|
|
174
|
-
const wrapper = timeLineItemClose.nextElementSibling;
|
|
175
|
-
wrapper.replaceWith(...wrapper.childNodes);
|
|
176
|
-
|
|
177
|
-
const top = sessionStorage.getItem('scroll-position');
|
|
178
|
-
if (top !== null) {
|
|
179
|
-
window.scrollTo(0, parseInt(top, 10));
|
|
180
|
-
}
|
|
181
|
-
sessionStorage.removeItem('scroll-position');
|
|
182
|
-
|
|
183
|
-
// Trigger scroll event to reveal timeline items not yet parallaxed into view
|
|
184
|
-
window.dispatchEvent(new CustomEvent('scroll'));
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
timeLineItemBottomClose.addEventListener('click', () => {
|
|
188
|
-
timeLineItemClose.click();
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
*/
|
|
192
|
-
=======
|
|
193
139
|
// function wrap(el, wrapper) {
|
|
194
140
|
// el.parentNode.insertBefore(wrapper, el);
|
|
195
141
|
// wrapper.classList.add('wrapper');
|
|
@@ -239,5 +185,4 @@ let timeLineItemScrollPosition = 0;
|
|
|
239
185
|
// timeLineItemBottomClose.addEventListener('click', () => {
|
|
240
186
|
// timeLineItemClose.click();
|
|
241
187
|
// });
|
|
242
|
-
// });
|
|
243
|
-
>>>>>>> feature/open-timelineitem
|
|
188
|
+
// });
|