@internetstiftelsen/styleguide 2.24.0-beta.0.2 → 2.24.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/README.md +8 -20
- package/dist/assets/js/youtube.js +8 -0
- package/dist/components.js +6 -4
- package/dist/molecules/form/Form.js +1 -1
- package/dist/molecules/glider/glider-hero.js +39 -0
- package/dist/organisms/timeline/timeline.js +89 -1
- package/dist/organisms/video-guide/video-guide.js +3 -49
- package/package.json +2 -4
- package/src/app.js +2 -3
- package/src/app.scss +3 -0
- package/src/assets/js/youtube.js +5 -0
- package/src/assets/video/metadata.vtt +9 -9
- package/src/atoms/tag/_tag.scss +1 -0
- package/src/atoms/tag/tag.config.js +10 -0
- package/src/components.js +6 -2
- package/src/configurations/forms/_fields.scss +8 -0
- package/src/globals.scss +1 -27
- package/src/molecules/continue-video-guide/continue-video-guide.config.js +7 -0
- package/src/molecules/continue-video-guide/continue-video-guide.js +84 -0
- package/src/molecules/continue-video-guide/continue-video-guide.scss +110 -0
- package/src/molecules/continue-video-guide/readme.md +3 -0
- package/src/molecules/form/Form.js +1 -1
- package/src/molecules/glider/_glider-hero.scss +1 -6
- package/src/molecules/glider/glider-hero.js +39 -0
- package/src/molecules/natural-language-form/_natural-language-form.scss +8 -0
- package/src/organisms/event-listing-item/_event-listing-item.scss +3 -1
- package/src/organisms/hero/_hero.scss +20 -0
- package/src/organisms/hero/hero.config.js +15 -1
- package/src/organisms/timeline/_timeline.scss +328 -0
- package/src/organisms/timeline/timeline.config.js +7 -0
- package/src/organisms/timeline/timeline.js +185 -0
- package/src/organisms/video-guide/_video-guide.scss +508 -0
- package/src/organisms/video-guide/video-guide.config.js +17 -0
- package/src/organisms/video-guide/video-guide.js +261 -0
- package/src/structures/_article.scss +1 -1
- package/src/utilities/_gutter.scss +1 -1
- package/src/utilities/_manifest.scss +29 -0
package/README.md
CHANGED
|
@@ -33,6 +33,14 @@ $namespace: 'mysite-';
|
|
|
33
33
|
@import '~@internetstiftelsen/styleguide/src/organisms/header/header';
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### SCSS Mixins explained:
|
|
37
|
+
```scss
|
|
38
|
+
@include e(nested-element) {} // Element (.parent-element__nested-element)
|
|
39
|
+
@include m(modifier-name) {} // Modifier (.parent-element--modifier-name)
|
|
40
|
+
@include b(block-name) {} // Block (.block-name)
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
|
|
36
44
|
Peek into the [app.scss](https://github.com/sewebb/iis-styleguide/blob/master/src/app.scss) to see the full set of components.
|
|
37
45
|
|
|
38
46
|
For javascript it's basically the same thing. In a javascript file:
|
|
@@ -43,26 +51,6 @@ import Button from '@internetstiftelsen/styleguide/dist/atoms/button/button';
|
|
|
43
51
|
|
|
44
52
|
// Standard ES6 version
|
|
45
53
|
import Button from '@internetstiftelsen/styleguide/src/atoms/button/button';
|
|
46
|
-
|
|
47
|
-
// Globals and Configuration/Base components are imported by default from the Styleguide Core
|
|
48
|
-
|
|
49
|
-
// Atoms
|
|
50
|
-
import '@internetstiftelsen/styleguide/src/atoms/button/button';
|
|
51
|
-
import '@internetstiftelsen/styleguide/src/atoms/input/input';
|
|
52
|
-
|
|
53
|
-
// Molecules
|
|
54
|
-
import '@internetstiftelsen/styleguide/src/molecules/card/card';
|
|
55
|
-
|
|
56
|
-
// Organisms
|
|
57
|
-
import '~@internetstiftelsen/styleguide/src/organisms/header/header';
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### SCSS Mixins explained:
|
|
61
|
-
```scss
|
|
62
|
-
@include e(nested-element) {} // Element (.parent-element__nested-element)
|
|
63
|
-
@include m(modifier-name) {} // Modifier (.parent-element--modifier-name)
|
|
64
|
-
@include b(block-name) {} // Block (.block-name)
|
|
65
|
-
|
|
66
54
|
```
|
|
67
55
|
|
|
68
56
|
Depending on your browser requirements you may use the src version which is not transpiled to ES5.
|
|
@@ -21,6 +21,9 @@ function onPlayerStateChange(el, e) {
|
|
|
21
21
|
if (e.data === YT.PlayerState.PLAYING) {
|
|
22
22
|
el.getElementsByTagName('img')[0].style.zIndex = '-1';
|
|
23
23
|
el.getElementsByTagName('button')[0].style.display = 'none';
|
|
24
|
+
} else if (e.data === YT.PlayerState.UNSTARTED) {
|
|
25
|
+
el.getElementsByTagName('img')[0].style.zIndex = null;
|
|
26
|
+
el.getElementsByTagName('button')[0].style.display = null;
|
|
24
27
|
}
|
|
25
28
|
}
|
|
26
29
|
|
|
@@ -44,6 +47,11 @@ function setupYoutubePlayer(el) {
|
|
|
44
47
|
el.youtube.destroy();
|
|
45
48
|
el.youtube = null;
|
|
46
49
|
el.removeAttribute('data-youtube-ready');
|
|
50
|
+
<<<<<<< HEAD
|
|
51
|
+
=======
|
|
52
|
+
el.getElementsByTagName('img')[0].style.zIndex = null;
|
|
53
|
+
el.getElementsByTagName('button')[0].style.display = null;
|
|
54
|
+
>>>>>>> feature/open-timelineitem
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
playerEl = document.createElement('div');
|
package/dist/components.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('./molecules/form');
|
|
4
|
-
|
|
5
|
-
require('./atoms/textarea/rich-text');
|
|
6
|
-
|
|
7
3
|
require('./atoms/password-toggle/password-toggle');
|
|
8
4
|
|
|
9
5
|
require('./utilities/tab-highlighting/tab-highlighting');
|
|
10
6
|
|
|
11
7
|
require('./molecules/system-error/system-error');
|
|
12
8
|
|
|
9
|
+
require('a11y-toggle');
|
|
10
|
+
|
|
13
11
|
require('./molecules/cookie-disclaimer/cookie-disclaimer');
|
|
14
12
|
|
|
15
13
|
require('./organisms/accordion/accordion');
|
|
@@ -28,8 +26,12 @@ require('./atoms/tooltip/tooltip');
|
|
|
28
26
|
|
|
29
27
|
require('./atoms/toggle-high-contrast/toggle-high-contrast');
|
|
30
28
|
|
|
29
|
+
require('./focusTrap');
|
|
30
|
+
|
|
31
31
|
require('./atoms/height-limiter/height-limiter');
|
|
32
32
|
|
|
33
|
+
require('./assets/js/conditional');
|
|
34
|
+
|
|
33
35
|
require('./atoms/file/file');
|
|
34
36
|
|
|
35
37
|
require('./atoms/file/filePreview');
|
|
@@ -7,6 +7,8 @@ var _gliderJs2 = _interopRequireDefault(_gliderJs);
|
|
|
7
7
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
8
|
|
|
9
9
|
var gliderElementHero = document.querySelector('.js-glider-hero');
|
|
10
|
+
var dataLayer = window.dataLayer || [];
|
|
11
|
+
var gliderLinks = document.querySelectorAll('.glider-slide a');
|
|
10
12
|
|
|
11
13
|
if (gliderElementHero) {
|
|
12
14
|
var GliderHero = new _gliderJs2.default(gliderElementHero, {
|
|
@@ -41,6 +43,43 @@ if (gliderElementHero) {
|
|
|
41
43
|
}, autoplayDelay);
|
|
42
44
|
}
|
|
43
45
|
}, 0);
|
|
46
|
+
} else {
|
|
47
|
+
document.querySelector('.js-glider-prev').addEventListener('click', function () {
|
|
48
|
+
dataLayer.push({
|
|
49
|
+
event: 'carousel',
|
|
50
|
+
eventInfo: {
|
|
51
|
+
category: 'carousel',
|
|
52
|
+
action: 'click',
|
|
53
|
+
label: 'arrow_left'
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
document.querySelector('.js-glider-next').addEventListener('click', function () {
|
|
59
|
+
dataLayer.push({
|
|
60
|
+
event: 'carousel',
|
|
61
|
+
eventInfo: {
|
|
62
|
+
category: 'carousel',
|
|
63
|
+
action: 'click',
|
|
64
|
+
label: 'arrow_right'
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
[].forEach.call(gliderLinks, function (gliderLink) {
|
|
70
|
+
gliderLink.addEventListener('click', function () {
|
|
71
|
+
var linkTarget = gliderLink.href;
|
|
72
|
+
console.log(linkTarget);
|
|
73
|
+
dataLayer.push({
|
|
74
|
+
event: 'carousel',
|
|
75
|
+
eventInfo: {
|
|
76
|
+
category: 'carousel',
|
|
77
|
+
action: 'click',
|
|
78
|
+
label: linkTarget
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
});
|
|
44
83
|
}
|
|
45
84
|
|
|
46
85
|
module.exports = GliderHero;
|
|
@@ -7,6 +7,7 @@ var _require = require('../../assets/js/offset'),
|
|
|
7
7
|
offsetBottom = _require.offsetBottom,
|
|
8
8
|
offsetLeft = _require.offsetLeft;
|
|
9
9
|
|
|
10
|
+
var dataLayer = window.dataLayer || [];
|
|
10
11
|
var progressBar = document.querySelector('.js-progress-bar');
|
|
11
12
|
var decadeContainer = document.querySelector('.js-decade-container');
|
|
12
13
|
var decadeSections = document.querySelectorAll('.js-timeline-decade');
|
|
@@ -84,6 +85,39 @@ function animateProgressBar() {
|
|
|
84
85
|
progressBar.style.width = progressBarWidth + 'px';
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
function isInViewport(element) {
|
|
89
|
+
var top = element.offsetTop;
|
|
90
|
+
var height = element.offsetHeight;
|
|
91
|
+
|
|
92
|
+
while (element.offsetParent) {
|
|
93
|
+
element = element.offsetParent; // eslint-disable-line
|
|
94
|
+
top += element.offsetTop;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return top < window.pageYOffset + window.innerHeight && top + height > window.pageYOffset;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function decadeIsVisible() {
|
|
101
|
+
[].forEach.call(decadeSections, function (decadeSection) {
|
|
102
|
+
if (isInViewport(decadeSection) && !decadeSection.classList.contains('is-in-view')) {
|
|
103
|
+
decadeSection.classList.add('is-in-view');
|
|
104
|
+
|
|
105
|
+
var decade = decadeSection.id;
|
|
106
|
+
|
|
107
|
+
dataLayer.push({
|
|
108
|
+
event: 'timeline',
|
|
109
|
+
eventInfo: {
|
|
110
|
+
category: 'timeline',
|
|
111
|
+
action: 'active_year',
|
|
112
|
+
label: decade
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
} else if (!isInViewport(decadeSection)) {
|
|
116
|
+
decadeSection.classList.remove('is-in-view');
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
87
121
|
// Run functions on page load
|
|
88
122
|
if (progressBar) {
|
|
89
123
|
buildTimelineNavigation();
|
|
@@ -97,10 +131,12 @@ if (progressBar) {
|
|
|
97
131
|
});
|
|
98
132
|
window.addEventListener('scroll', function () {
|
|
99
133
|
animateProgressBar();
|
|
134
|
+
decadeIsVisible();
|
|
100
135
|
});
|
|
101
136
|
}
|
|
102
137
|
|
|
103
138
|
// DUMMY TIMELINE ITEM OPEN/CLOSE
|
|
139
|
+
<<<<<<< HEAD
|
|
104
140
|
/*
|
|
105
141
|
function wrap(el, wrapper) {
|
|
106
142
|
el.parentNode.insertBefore(wrapper, el);
|
|
@@ -152,4 +188,56 @@ let timeLineItemScrollPosition = 0;
|
|
|
152
188
|
timeLineItemClose.click();
|
|
153
189
|
});
|
|
154
190
|
});
|
|
155
|
-
*/
|
|
191
|
+
*/
|
|
192
|
+
=======
|
|
193
|
+
// function wrap(el, wrapper) {
|
|
194
|
+
// el.parentNode.insertBefore(wrapper, el);
|
|
195
|
+
// wrapper.classList.add('wrapper');
|
|
196
|
+
// wrapper.appendChild(el);
|
|
197
|
+
// }
|
|
198
|
+
//
|
|
199
|
+
// const timeLineItems = document.querySelectorAll('.js-timeline-item');
|
|
200
|
+
// let timeLineItemScrollPosition = 0;
|
|
201
|
+
//
|
|
202
|
+
// [].forEach.call(timeLineItems, (timeLineItem) => {
|
|
203
|
+
// const timeLineItemLink = timeLineItem.querySelector('a');
|
|
204
|
+
// const timeLineItemClose = timeLineItem.querySelector('.js-timeline-item-close');
|
|
205
|
+
// const timeLineItemBottomClose = timeLineItem.querySelector('.js-timeline-item-bottom-close');
|
|
206
|
+
//
|
|
207
|
+
// timeLineItemLink.addEventListener('click', () => {
|
|
208
|
+
// timeLineItemScrollPosition = window.pageYOffset;
|
|
209
|
+
// sessionStorage.setItem('scroll-position', timeLineItemScrollPosition);
|
|
210
|
+
//
|
|
211
|
+
// if (!timeLineItem.classList.contains('is-open')) {
|
|
212
|
+
// timeLineItem.classList.add('is-open');
|
|
213
|
+
// timeLineItem.closest('.row').classList.add('row-has-open-child');
|
|
214
|
+
//
|
|
215
|
+
// // Wrap open timeline item
|
|
216
|
+
// wrap(timeLineItem.querySelector('.wp-block-iis-timeline-post'),
|
|
217
|
+
// document.createElement('div'));
|
|
218
|
+
// }
|
|
219
|
+
// });
|
|
220
|
+
//
|
|
221
|
+
// timeLineItemClose.addEventListener('click', () => {
|
|
222
|
+
// timeLineItem.classList.remove('is-open');
|
|
223
|
+
// timeLineItem.closest('.row').classList.remove('row-has-open-child');
|
|
224
|
+
//
|
|
225
|
+
// // Destroy generated wrapper
|
|
226
|
+
// const wrapper = timeLineItemClose.nextElementSibling;
|
|
227
|
+
// wrapper.replaceWith(...wrapper.childNodes);
|
|
228
|
+
//
|
|
229
|
+
// const top = sessionStorage.getItem('scroll-position');
|
|
230
|
+
// if (top !== null) {
|
|
231
|
+
// window.scrollTo(0, parseInt(top, 10));
|
|
232
|
+
// }
|
|
233
|
+
// sessionStorage.removeItem('scroll-position');
|
|
234
|
+
//
|
|
235
|
+
// // Trigger scroll event to reveal timeline items not yet parallaxed into view
|
|
236
|
+
// window.dispatchEvent(new CustomEvent('scroll'));
|
|
237
|
+
// });
|
|
238
|
+
//
|
|
239
|
+
// timeLineItemBottomClose.addEventListener('click', () => {
|
|
240
|
+
// timeLineItemClose.click();
|
|
241
|
+
// });
|
|
242
|
+
// });
|
|
243
|
+
>>>>>>> feature/open-timelineitem
|
|
@@ -8,7 +8,6 @@ var subtitlesBtn = document.querySelector('.js-subtitles-btn');
|
|
|
8
8
|
var abortButton = document.querySelector('.js-abort-guide');
|
|
9
9
|
var subtitlesElement = document.getElementById('video-subtitles');
|
|
10
10
|
var subtitlesContainer = document.querySelector('.js-subtitles-container');
|
|
11
|
-
var locationList = document.querySelector('.js-chapters');
|
|
12
11
|
var chapterTrackElement = document.getElementById('video-chapters');
|
|
13
12
|
var trackMetadataElement = document.getElementById('video-metadata');
|
|
14
13
|
var subtitlesTrack = subtitlesElement === null ? '' : subtitlesElement.track;
|
|
@@ -19,28 +18,17 @@ var backwardsButton = document.querySelector('.js-previous-chapter');
|
|
|
19
18
|
var timelinePosts = document.querySelectorAll('.js-timeline-post');
|
|
20
19
|
var navigationButton = document.querySelector('.js-show-timelineposts');
|
|
21
20
|
var timeLinePosts = document.querySelector('.js-timeline-posts');
|
|
22
|
-
var currentChapter =
|
|
21
|
+
var currentChapter = 0;
|
|
23
22
|
var manualStep = false;
|
|
24
|
-
var sourceElement = null;
|
|
25
23
|
|
|
26
24
|
// Has src attributes been set already?
|
|
27
|
-
if (
|
|
28
|
-
document.location.reload();
|
|
29
|
-
} else if (video) {
|
|
30
|
-
var dataSrc = video.dataset.src;
|
|
31
|
-
|
|
32
|
-
sourceElement = document.createElement('source');
|
|
33
|
-
sourceElement.setAttribute('src', dataSrc);
|
|
34
|
-
sourceElement.setAttribute('type', 'video/mp4');
|
|
35
|
-
|
|
36
|
-
video.appendChild(sourceElement);
|
|
37
|
-
|
|
25
|
+
if (video) {
|
|
38
26
|
// Store current time in on page reload
|
|
39
27
|
window.addEventListener('unload', function () {
|
|
40
28
|
// Set localStorage if video has started playing
|
|
41
29
|
if (video.currentTime > 0) {
|
|
42
30
|
var currentGuideURL = window.location.href;
|
|
43
|
-
var currentGuideImage =
|
|
31
|
+
var currentGuideImage = video.dataset.featuredImage;
|
|
44
32
|
localStorage.setItem('InmsCurrentTime', video.currentTime);
|
|
45
33
|
localStorage.setItem('InmsDuration', video.duration); // Get totalt duration of video
|
|
46
34
|
localStorage.setItem('InmsCurrentGuideURL', currentGuideURL);
|
|
@@ -140,26 +128,6 @@ function displayChapters() {
|
|
|
140
128
|
// Let data load
|
|
141
129
|
setTimeout(function () {
|
|
142
130
|
video.classList.remove('is-loading');
|
|
143
|
-
[].forEach.call(chapterTrack.cues, function (cues) {
|
|
144
|
-
var chapterName = cues.text;
|
|
145
|
-
var start = cues.startTime;
|
|
146
|
-
var newLocale = document.createElement('li');
|
|
147
|
-
var location = document.createElement('a');
|
|
148
|
-
|
|
149
|
-
location.setAttribute('rel', start);
|
|
150
|
-
newLocale.setAttribute('id', start);
|
|
151
|
-
location.setAttribute('tabindex', '0');
|
|
152
|
-
|
|
153
|
-
// Plain text from the chapter file into HTML text
|
|
154
|
-
var localeDescription = chapterName;
|
|
155
|
-
location.innerHTML = localeDescription;
|
|
156
|
-
newLocale.appendChild(location);
|
|
157
|
-
locationList.appendChild(newLocale);
|
|
158
|
-
|
|
159
|
-
location.addEventListener('click', function () {
|
|
160
|
-
video.currentTime = location.id;
|
|
161
|
-
}, false);
|
|
162
|
-
});
|
|
163
131
|
|
|
164
132
|
// If not set in sessionStorgare, set first cue on forward button on page load
|
|
165
133
|
if (!localStorage.getItem('InmsCurrentTime')) {
|
|
@@ -224,23 +192,10 @@ function displayChapters() {
|
|
|
224
192
|
// get the chapter <li> elements based on the currentLocation
|
|
225
193
|
var locations = [].slice.call(chapter.closest('figure').querySelectorAll('.js-chapters li'));
|
|
226
194
|
|
|
227
|
-
var counter = 0;
|
|
228
|
-
|
|
229
195
|
[].forEach.call(locations, function (location) {
|
|
230
196
|
// remove current classes from all items on page refresh
|
|
231
197
|
location.classList.remove('is-current-item');
|
|
232
198
|
location.querySelector('a').classList.remove('is-current');
|
|
233
|
-
|
|
234
|
-
if (location.classList.contains('is-current-item')) {
|
|
235
|
-
counter += 1; // iterate counter when active chapter is reached
|
|
236
|
-
}
|
|
237
|
-
if (counter < 1) {
|
|
238
|
-
// add watched class to everything before the current chapter to show progress
|
|
239
|
-
location.classList.add('is-watched');
|
|
240
|
-
} else {
|
|
241
|
-
// remove watched on all other items
|
|
242
|
-
location.classList.remove('is-watched');
|
|
243
|
-
}
|
|
244
199
|
});
|
|
245
200
|
chapter.parentNode.classList.add('is-current-item');
|
|
246
201
|
chapter.classList.add('is-current');
|
|
@@ -266,7 +221,6 @@ function displayChapters() {
|
|
|
266
221
|
|
|
267
222
|
[].forEach.call(idSelectors, function (idSelector) {
|
|
268
223
|
idSelector.classList.add('is-current');
|
|
269
|
-
idSelector.focus();
|
|
270
224
|
});
|
|
271
225
|
|
|
272
226
|
if (chapterCues) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetstiftelsen/styleguide",
|
|
3
|
-
"version": "2.24.0
|
|
3
|
+
"version": "2.24.0",
|
|
4
4
|
"main": "dist/components.js",
|
|
5
5
|
"ports": {
|
|
6
6
|
"fractal": "3000"
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"imagemin": "imagemin --out-dir=public/assets/img src/**/*.{png,jpg,gif}",
|
|
20
20
|
"build:css": "npm run stylelint && npm run scss && npm run cssmin",
|
|
21
21
|
"build:js": "npm run eslint && npm run babel && npm run browserify",
|
|
22
|
-
"build:js:replace:string": "replace \"require('./components');\" \"//require('./components');\" src/ -r --include=\"app.js\"",
|
|
23
22
|
"build:img": "npm run imagemin",
|
|
24
23
|
"watch:css": "onchange 'src/**/*.scss' -- npm run build:css",
|
|
25
24
|
"watch:js": "onchange 'src/**/*.js' -- npm run build:js",
|
|
@@ -35,7 +34,7 @@
|
|
|
35
34
|
"copy:zip:build": "copyfiles -f src/assets/zip/* build/assets/zip",
|
|
36
35
|
"copy:fonts:build": "copyfiles -f src/base/fonts/* build/assets/fonts",
|
|
37
36
|
"copy:build": "npm run copy:images:build && npm run copy:zip:build && npm run copy:fonts:build && npm run copy:videos:build",
|
|
38
|
-
"build": "npm run build:css && npm run build:js
|
|
37
|
+
"build": "npm run build:css && npm run build:js && npm run uglify && npm run build:fractal && npm run copy:build",
|
|
39
38
|
"dev": "concurrently \"npm:start:fractal\" \"npm:watch\" \"npm:copy:local-assets\"",
|
|
40
39
|
"package-js": "NODE_ENV=production babel src --out-dir dist --ignore src/**/*.config.js,src/app.js",
|
|
41
40
|
"create-icons-config": "node ./createIconsJson"
|
|
@@ -64,7 +63,6 @@
|
|
|
64
63
|
"onchange": "^6.1.0",
|
|
65
64
|
"postcss-class-prefix": "^0.3.0",
|
|
66
65
|
"postcss-cli": "^8.3.1",
|
|
67
|
-
"replace": "^1.2.1",
|
|
68
66
|
"sass": "^1.35.1",
|
|
69
67
|
"stylelint": "^13.13.1",
|
|
70
68
|
"uglify-es": "^3.3.9"
|
package/src/app.js
CHANGED
package/src/app.scss
CHANGED
|
@@ -66,6 +66,7 @@ $namespace: '';
|
|
|
66
66
|
@import 'molecules/glider/glider';
|
|
67
67
|
@import 'molecules/glider/glider-course';
|
|
68
68
|
@import 'molecules/glider/glider-hero';
|
|
69
|
+
@import 'molecules/continue-video-guide/continue-video-guide';
|
|
69
70
|
|
|
70
71
|
// Organisms
|
|
71
72
|
@import 'organisms/header/header';
|
|
@@ -85,6 +86,8 @@ $namespace: '';
|
|
|
85
86
|
@import 'organisms/event-listing-item/event-listing-item';
|
|
86
87
|
@import 'organisms/podcast/podcast-episodes';
|
|
87
88
|
@import 'organisms/podcast/podcast-player';
|
|
89
|
+
@import 'organisms/video-guide/video-guide';
|
|
90
|
+
@import 'organisms/timeline/timeline';
|
|
88
91
|
|
|
89
92
|
// Structures
|
|
90
93
|
@import 'structures/manifest';
|
package/src/assets/js/youtube.js
CHANGED
|
@@ -15,6 +15,9 @@ function onPlayerStateChange(el, e) {
|
|
|
15
15
|
if (e.data === YT.PlayerState.PLAYING) {
|
|
16
16
|
el.getElementsByTagName('img')[0].style.zIndex = '-1';
|
|
17
17
|
el.getElementsByTagName('button')[0].style.display = 'none';
|
|
18
|
+
} else if (e.data === YT.PlayerState.UNSTARTED) {
|
|
19
|
+
el.getElementsByTagName('img')[0].style.zIndex = null;
|
|
20
|
+
el.getElementsByTagName('button')[0].style.display = null;
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
|
|
@@ -38,6 +41,8 @@ function setupYoutubePlayer(el) {
|
|
|
38
41
|
el.youtube.destroy();
|
|
39
42
|
el.youtube = null;
|
|
40
43
|
el.removeAttribute('data-youtube-ready');
|
|
44
|
+
el.getElementsByTagName('img')[0].style.zIndex = null;
|
|
45
|
+
el.getElementsByTagName('button')[0].style.display = null;
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
playerEl = document.createElement('div');
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
WEBVTT
|
|
2
2
|
|
|
3
3
|
00:00:00.000 --> 00:00:25.000
|
|
4
|
-
|
|
4
|
+
89108
|
|
5
5
|
|
|
6
6
|
00:00:25.000 --> 00:00:39.000
|
|
7
|
-
|
|
7
|
+
91027
|
|
8
8
|
|
|
9
9
|
00:00:39.000 --> 00:01:51.500
|
|
10
|
-
|
|
10
|
+
81345
|
|
11
11
|
|
|
12
12
|
00:01:51.500 --> 00:02:23.000
|
|
13
|
-
|
|
13
|
+
76810
|
|
14
14
|
|
|
15
15
|
00:02:23.000 --> 00:03:27.000
|
|
16
|
-
|
|
16
|
+
86454
|
|
17
17
|
|
|
18
18
|
00:03:27.000 --> 00:03:56.500
|
|
19
|
-
|
|
19
|
+
80127
|
|
20
20
|
|
|
21
21
|
00:03:56.500 --> 00:04:34.000
|
|
22
|
-
|
|
22
|
+
76325
|
|
23
23
|
|
|
24
24
|
00:04:34.000 --> 00:05:17.000
|
|
25
|
-
|
|
25
|
+
76280
|
|
26
26
|
|
|
27
27
|
00:05:17.000 --> 00:06:28.000
|
|
28
|
-
|
|
28
|
+
80725
|
package/src/atoms/tag/_tag.scss
CHANGED
package/src/components.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import './molecules/form';
|
|
2
|
-
import './atoms/textarea/rich-text';
|
|
3
1
|
import './atoms/password-toggle/password-toggle';
|
|
4
2
|
import './utilities/tab-highlighting/tab-highlighting';
|
|
5
3
|
import './molecules/system-error/system-error';
|
|
4
|
+
import 'a11y-toggle';
|
|
6
5
|
import './molecules/cookie-disclaimer/cookie-disclaimer';
|
|
7
6
|
import './organisms/accordion/accordion';
|
|
8
7
|
import './organisms/tabs/tabs';
|
|
@@ -12,7 +11,9 @@ import './molecules/share/share';
|
|
|
12
11
|
import './molecules/natural-language-form/natural-language-form';
|
|
13
12
|
import './atoms/tooltip/tooltip';
|
|
14
13
|
import './atoms/toggle-high-contrast/toggle-high-contrast';
|
|
14
|
+
import './focusTrap';
|
|
15
15
|
import './atoms/height-limiter/height-limiter';
|
|
16
|
+
import './assets/js/conditional';
|
|
16
17
|
import './atoms/file/file';
|
|
17
18
|
import './atoms/file/filePreview';
|
|
18
19
|
import './organisms/podcast/podcast';
|
|
@@ -23,3 +24,6 @@ import './molecules/glider/glider-course';
|
|
|
23
24
|
import './molecules/glider/glider-hero';
|
|
24
25
|
import './molecules/context-menu/context-menu';
|
|
25
26
|
import './molecules/alert/alert';
|
|
27
|
+
import './molecules/continue-video-guide/continue-video-guide';
|
|
28
|
+
import './organisms/video-guide/video-guide';
|
|
29
|
+
import './organisms/timeline/timeline';
|
package/src/globals.scss
CHANGED
|
@@ -25,30 +25,4 @@
|
|
|
25
25
|
@import 'base/fonts/fonts';
|
|
26
26
|
|
|
27
27
|
// Utilities
|
|
28
|
-
@import 'utilities/
|
|
29
|
-
@import 'utilities/padding';
|
|
30
|
-
@import 'utilities/hide';
|
|
31
|
-
@import 'utilities/show';
|
|
32
|
-
@import 'utilities/lists';
|
|
33
|
-
@import 'utilities/position';
|
|
34
|
-
@import 'utilities/fonts';
|
|
35
|
-
@import 'utilities/tab-highlighting/tab-highlighting';
|
|
36
|
-
@import 'utilities/border';
|
|
37
|
-
@import 'utilities/align';
|
|
38
|
-
@import 'utilities/vertical-align';
|
|
39
|
-
@import 'utilities/icons';
|
|
40
|
-
@import 'utilities/wrap';
|
|
41
|
-
@import 'utilities/accessibility-helpers';
|
|
42
|
-
@import 'utilities/links';
|
|
43
|
-
@import 'utilities/z-index';
|
|
44
|
-
@import 'utilities/box-shadow';
|
|
45
|
-
@import 'utilities/flex';
|
|
46
|
-
@import 'utilities/display';
|
|
47
|
-
@import 'utilities/misc';
|
|
48
|
-
@import 'utilities/gutter';
|
|
49
|
-
@import 'utilities/text';
|
|
50
|
-
@import 'utilities/pointer-events';
|
|
51
|
-
@import 'utilities/clear';
|
|
52
|
-
@import 'utilities/fill';
|
|
53
|
-
@import 'utilities/indent';
|
|
54
|
-
@import 'utilities/font-size';
|
|
28
|
+
@import 'utilities/manifest';
|