@internetstiftelsen/styleguide 2.22.1 → 2.22.3-beta.0.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.
Files changed (137) hide show
  1. package/dist/.DS_Store +0 -0
  2. package/dist/assets/js/anchorScroll.js +16 -0
  3. package/dist/assets/js/offset.js +26 -0
  4. package/dist/assets/js/parallax.js +17 -0
  5. package/dist/components.js +8 -4
  6. package/dist/molecules/continue-video-guide/continue-video-guide.js +91 -0
  7. package/dist/molecules/glider/glider-course.js +7 -7
  8. package/dist/molecules/glider/glider-hero.js +23 -0
  9. package/dist/organisms/timeline/timeline.js +154 -0
  10. package/dist/organisms/video-guide/video-guide.js +298 -0
  11. package/package.json +7 -3
  12. package/src/.DS_Store +0 -0
  13. package/src/app.scss +6 -2
  14. package/src/assets/.DS_Store +0 -0
  15. package/src/{atoms/timeline → assets/js}/anchorScroll.js +3 -0
  16. package/src/assets/js/offset.js +22 -0
  17. package/src/assets/js/parallax.js +15 -0
  18. package/src/assets/video/.DS_Store +0 -0
  19. package/src/assets/video/Internets-Historia-HEVC-h265-HEVC-h265.mov +0 -0
  20. package/src/assets/video/Internets-Historia-HEVC-h265-vp9-chrome.webm +0 -0
  21. package/src/assets/video/chapters.vtt +25 -0
  22. package/src/assets/video/metadata.vtt +25 -0
  23. package/src/assets/video/movie-webm.webm +0 -0
  24. package/src/assets/video/videoplayer.vtt +25 -0
  25. package/src/atoms/.DS_Store +0 -0
  26. package/src/atoms/archive-link/archive-link.config.js +9 -0
  27. package/src/atoms/button/_button.scss +6 -9
  28. package/src/atoms/button/button.config.js +202 -0
  29. package/src/atoms/checkbox/checkbox.config.js +48 -0
  30. package/src/atoms/file/file.config.js +36 -0
  31. package/src/atoms/grid-toggle/grid-toggle.config.js +8 -0
  32. package/src/atoms/height-limiter/height-limiter.config.js +8 -0
  33. package/src/atoms/icon/_all-icons.zip +0 -0
  34. package/src/atoms/icon/icon.config.js +43 -0
  35. package/src/atoms/icon/spinner-white.svg +1 -9
  36. package/src/atoms/icon/spinner.svg +1 -9
  37. package/src/atoms/icon/sprite.svg +17 -0
  38. package/src/atoms/icon/step-backwards.svg +1 -0
  39. package/src/atoms/icon/step-forwards.svg +1 -0
  40. package/src/atoms/icon/subtitles.svg +1 -0
  41. package/src/atoms/input/input.config.js +56 -0
  42. package/src/atoms/label/label.config.js +9 -0
  43. package/src/atoms/logotype/logotype.config.js +39 -0
  44. package/src/atoms/main-menu/main-menu.config.js +75 -0
  45. package/src/atoms/meta/meta.config.js +42 -0
  46. package/src/atoms/paging/paging.config.js +30 -0
  47. package/src/atoms/password-toggle/password-toggle.config.js +14 -0
  48. package/src/atoms/quote/quote.config.js +9 -0
  49. package/src/atoms/radiobutton/radiobutton.config.js +48 -0
  50. package/src/atoms/rating/rating.config.js +7 -0
  51. package/src/atoms/ribbon/ribbon.config.js +9 -0
  52. package/src/atoms/select/select.config.js +78 -0
  53. package/src/atoms/skip/skip.config.js +19 -0
  54. package/src/atoms/spinner/spinner.config.js +5 -0
  55. package/src/atoms/tag/tag.config.js +36 -0
  56. package/src/atoms/textarea/textarea.config.js +56 -0
  57. package/src/atoms/toggle-high-contrast/toggle-high-contrast.config.js +8 -0
  58. package/src/atoms/tooltip/tooltip.config.js +8 -0
  59. package/src/base/_normalize.scss +1 -1
  60. package/src/base/fonts/_fonts.scss +8 -8
  61. package/src/brandbook/goto10/goto10.config.js +187 -0
  62. package/src/brandbook/internetstiftelsen/identitet/identitet.config.js +5 -0
  63. package/src/components.js +4 -2
  64. package/src/configurations/_extends.scss +5 -1
  65. package/src/configurations/_variables.scss +3 -3
  66. package/src/configurations/colors/colors.config.js +225 -0
  67. package/src/configurations/favicon/favicon.config.js +7 -0
  68. package/src/configurations/grid/_grid.scss +17 -2
  69. package/src/configurations/grid/grid.config.js +8 -0
  70. package/src/configurations/icons.json +1 -1
  71. package/src/configurations/typography/_typography.scss +57 -4
  72. package/src/configurations/typography/typography.config.js +17 -0
  73. package/src/molecules/.DS_Store +0 -0
  74. package/src/molecules/alert/alert.config.js +50 -0
  75. package/src/molecules/breadcrumb/breadcrumb.config.js +28 -0
  76. package/src/molecules/byline/byline.config.js +25 -0
  77. package/src/molecules/card/card.config.js +111 -0
  78. package/src/molecules/context-menu/context-menu.config.js +28 -0
  79. package/src/molecules/continue-video-guide/continue-video-guide.config.js +7 -0
  80. package/src/molecules/continue-video-guide/continue-video-guide.js +84 -0
  81. package/src/molecules/continue-video-guide/continue-video-guide.scss +104 -0
  82. package/src/molecules/continue-video-guide/readme.md +3 -0
  83. package/src/molecules/cookie-disclaimer/cookie-disclaimer.config.js +12 -0
  84. package/src/molecules/download/download.config.js +12 -0
  85. package/src/molecules/form/form.config.js +15 -0
  86. package/src/molecules/form-control/form-control.config.js +78 -0
  87. package/src/molecules/glider/_glider-course.scss +121 -0
  88. package/src/molecules/glider/_glider-hero.scss +325 -0
  89. package/src/molecules/glider/_glider.scss +3 -116
  90. package/src/molecules/glider/glider-course.js +7 -7
  91. package/src/molecules/glider/glider-hero.js +17 -0
  92. package/src/molecules/glider/glider.config.js +29 -0
  93. package/src/molecules/icon-overlay/icon-overlay.config.js +11 -0
  94. package/src/molecules/info-box/info-box.config.js +33 -0
  95. package/src/molecules/modal/modal.config.js +44 -0
  96. package/src/molecules/natural-language-form/natural-language-form.config.js +43 -0
  97. package/src/molecules/share/share.config.js +8 -0
  98. package/src/molecules/submenu/submenu.config.js +27 -0
  99. package/src/molecules/system-error/system-error.config.js +10 -0
  100. package/src/molecules/table/table.config.js +55 -0
  101. package/src/molecules/teaser-news-list/teaser-news-list.config.js +47 -0
  102. package/src/organisms/accordion/accordion.config.js +163 -0
  103. package/src/organisms/domain-search/domain-search.config.js +10 -0
  104. package/src/organisms/event-listing-item/event-listing-item.config.js +15 -0
  105. package/src/organisms/features-box/features-box.config.js +227 -0
  106. package/src/organisms/filter/filter.config.js +165 -0
  107. package/src/organisms/footer/footer.config.js +30 -0
  108. package/src/organisms/header/header.config.js +10 -0
  109. package/src/organisms/hero/_hero--dynamic-headline.scss +157 -0
  110. package/src/organisms/hero/_hero.scss +16 -0
  111. package/src/organisms/hero/hero.config.js +126 -0
  112. package/src/organisms/mailchimp/mailchimp.config.js +38 -0
  113. package/src/organisms/mega-menu/mega-menu.config.js +22 -0
  114. package/src/organisms/podcast/podcast.config.js +76 -0
  115. package/src/organisms/search-result/search-result.config.js +12 -0
  116. package/src/organisms/sections/sections.config.js +68 -0
  117. package/src/organisms/tabs/tabs.config.js +28 -0
  118. package/src/organisms/timeline/_timeline.scss +292 -0
  119. package/src/organisms/timeline/timeline.config.js +7 -0
  120. package/src/organisms/timeline/timeline.js +146 -0
  121. package/src/organisms/video-guide/_video-guide.scss +337 -0
  122. package/src/organisms/video-guide/video-guide.config.js +17 -0
  123. package/src/organisms/video-guide/video-guide.js +293 -0
  124. package/src/pages/animate-footer/animate-footer.config.js +10 -0
  125. package/src/pages/conditional/conditional.config.js +4 -0
  126. package/src/pages/internetguider/internetguider.config.js +7 -0
  127. package/src/pages/magazine/magazine.config.js +19 -0
  128. package/src/pages/mailchimp-newsletter/mailchimp-newsletter.config.js +7 -0
  129. package/src/pages/responsive-position/responsive-position.config.js +4 -0
  130. package/src/pages/search/search.config.js +7 -0
  131. package/src/pages/wordpress-blocks/wordpress-blocks.config.js +19 -0
  132. package/src/assets/css/footer/isolated-footer.css +0 -7367
  133. package/src/assets/css/footer/isolated-footer.css.map +0 -1
  134. package/src/assets/css/footer/isolated-footer.min.css +0 -2
  135. package/src/atoms/timeline/_timeline.scss +0 -159
  136. package/src/molecules/timeline-navigation/timeline-navigation.js +0 -32
  137. package/src/molecules/timeline-navigation/timeline-navigation.scss +0 -165
@@ -0,0 +1,298 @@
1
+ 'use strict';
2
+
3
+ var video = document.querySelector('.js-video-guide');
4
+ var playBtn = document.querySelector('.js-play-btn');
5
+ var playIcon = document.querySelector('.js-play-icon');
6
+ var pauseIcon = document.querySelector('.js-pause-icon');
7
+ var subtitlesBtn = document.querySelector('.js-subtitles-btn');
8
+ var abortButton = document.querySelector('.js-abort-guide');
9
+ var subtitlesElement = document.getElementById('video-subtitles');
10
+ var subtitlesContainer = document.querySelector('.js-subtitles-container');
11
+ var locationList = document.querySelector('.js-chapters');
12
+ var chapterTrackElement = document.getElementById('video-chapters');
13
+ var trackMetadataElement = document.getElementById('video-metadata');
14
+ var subtitlesTrack = subtitlesElement === null ? '' : subtitlesElement.track;
15
+ var chapterTrack = chapterTrackElement === null ? '' : chapterTrackElement.track;
16
+ var metadataTrack = trackMetadataElement === null ? '' : trackMetadataElement.track;
17
+ var forwardsButton = document.querySelector('.js-next-chapter');
18
+ var backwardsButton = document.querySelector('.js-previous-chapter');
19
+ var timelinePosts = document.querySelectorAll('.js-timeline-post');
20
+ var currentChapter = 1;
21
+ var manualStep = false;
22
+ var sourceElement = null;
23
+
24
+ // Has src attributes been set already?
25
+ if (sourceElement) {
26
+ document.location.reload();
27
+ } else if (video) {
28
+ var dataSrc = video.dataset.src;
29
+
30
+ sourceElement = document.createElement('source');
31
+ sourceElement.setAttribute('src', dataSrc);
32
+ sourceElement.setAttribute('type', 'video/mp4');
33
+
34
+ video.appendChild(sourceElement);
35
+
36
+ // Store current time in on page reload
37
+ window.addEventListener('unload', function () {
38
+ // Set sessionStorage if video has started playing
39
+ if (video.currentTime > 0) {
40
+ var currentGuideURL = window.location.href;
41
+ var currentGuideImage = document.querySelector('.js-guide-continue-image').src;
42
+ sessionStorage.setItem('InmsCurrentTime', video.currentTime);
43
+ sessionStorage.setItem('InmsDuration', video.duration); // Get totalt duration of video
44
+ sessionStorage.setItem('InmsCurrentGuideURL', currentGuideURL);
45
+ sessionStorage.setItem('InmsCurrentGuideImage', currentGuideImage);
46
+ }
47
+ });
48
+
49
+ // Get value from sessionStorage in present
50
+ if (sessionStorage.getItem('InmsCurrentTime')) {
51
+ var videoCurrentTime = sessionStorage.getItem('InmsCurrentTime');
52
+
53
+ if (videoCurrentTime > 0) {
54
+ video.currentTime = videoCurrentTime;
55
+ }
56
+ }
57
+
58
+ // Toggle subtitles
59
+ if (subtitlesBtn) {
60
+ subtitlesBtn.addEventListener('click', function () {
61
+ subtitlesBtn.classList.toggle('is-active');
62
+ subtitlesContainer.classList.toggle('is-visible');
63
+ });
64
+ }
65
+
66
+ // Play / pause
67
+ if (playBtn) {
68
+ playBtn.addEventListener('click', function () {
69
+ if (video.paused) {
70
+ video.play();
71
+ pauseIcon.classList.remove('is-hidden');
72
+ playIcon.classList.add('is-hidden');
73
+ manualStep = false;
74
+ } else {
75
+ video.pause();
76
+ pauseIcon.classList.add('is-hidden');
77
+ playIcon.classList.remove('is-hidden');
78
+ manualStep = true;
79
+ }
80
+ });
81
+
82
+ video.addEventListener('playing', function () {
83
+ pauseIcon.classList.remove('is-hidden');
84
+ playIcon.classList.add('is-hidden');
85
+ manualStep = false;
86
+ });
87
+
88
+ video.addEventListener('ended', function () {
89
+ pauseIcon.classList.add('is-hidden');
90
+ playIcon.classList.remove('is-hidden');
91
+ video.currentTime = 0;
92
+ currentChapter = 1;
93
+ manualStep = false;
94
+ forwardsButton.removeAttribute('disabled');
95
+ subtitlesContainer.innerHTML = '';
96
+ sessionStorage.removeItem('InmsCurrentTime');
97
+ sessionStorage.removeItem('InmsDuration');
98
+ sessionStorage.removeItem('InmsCurrentGuideURL');
99
+ sessionStorage.removeItem('InmsCurrentGuideImage');
100
+ });
101
+ }
102
+
103
+ if (abortButton) {
104
+ abortButton.addEventListener('click', function (e) {
105
+ e.preventDefault();
106
+ var urlTarget = abortButton.getAttribute('href');
107
+ video.pause();
108
+ video.currentTime = 0;
109
+ forwardsButton.removeAttribute('disabled');
110
+ currentChapter = 1;
111
+ manualStep = false;
112
+ sessionStorage.removeItem('InmsCurrentTime');
113
+ sessionStorage.removeItem('InmsDuration');
114
+ sessionStorage.removeItem('InmsCurrentGuideURL');
115
+ sessionStorage.removeItem('InmsCurrentGuideImage');
116
+ window.location.href = urlTarget;
117
+ });
118
+ }
119
+ }
120
+
121
+ function displayChapters() {
122
+ if (chapterTrackElement && trackMetadataElement) {
123
+ // Set all track elements to hidden mode to allow scripting
124
+ [].forEach.call(video.textTracks, function (txtTrack) {
125
+ txtTrack.mode = 'hidden';
126
+ });
127
+
128
+ if (chapterTrack.kind === 'chapters') {
129
+ video.addEventListener('loadedmetadata', function () {
130
+ // Loop through chapters and create chapter list
131
+ // Let data load
132
+ setTimeout(function () {
133
+ video.classList.remove('is-loading');
134
+ [].forEach.call(chapterTrack.cues, function (cues) {
135
+ var chapterName = cues.text;
136
+ var start = cues.startTime;
137
+ var newLocale = document.createElement('li');
138
+ var location = document.createElement('a');
139
+
140
+ location.setAttribute('rel', start);
141
+ newLocale.setAttribute('id', start);
142
+ location.setAttribute('tabindex', '0');
143
+
144
+ // Plain text from the chapter file into HTML text
145
+ var localeDescription = chapterName;
146
+ location.innerHTML = localeDescription;
147
+ newLocale.appendChild(location);
148
+ locationList.appendChild(newLocale);
149
+
150
+ location.addEventListener('click', function () {
151
+ video.currentTime = location.id;
152
+ }, false);
153
+ });
154
+
155
+ // If not set in sessionStorgare, set first cue on forward button on page load
156
+ if (!sessionStorage.getItem('InmsCurrentTime')) {
157
+ forwardsButton.setAttribute('data-id', chapterTrack.cues[0].endTime);
158
+ }
159
+ }, 100);
160
+ });
161
+
162
+ forwardsButton.addEventListener('click', function () {
163
+ var dataId = forwardsButton.dataset.id;
164
+ var currentTime = parseInt(dataId, 10);
165
+ manualStep = true;
166
+ currentTime += 1;
167
+ video.currentTime = currentTime;
168
+ currentChapter += 1;
169
+ });
170
+
171
+ backwardsButton.addEventListener('click', function () {
172
+ var dataId = backwardsButton.dataset.id;
173
+ var lastTime = parseInt(dataId, 10);
174
+ lastTime -= 1;
175
+ video.currentTime = lastTime;
176
+ forwardsButton.removeAttribute('disabled');
177
+ manualStep = true;
178
+ currentChapter -= 1;
179
+
180
+ if (video.currentTime <= 0) {
181
+ backwardsButton.removeAttribute('data-id');
182
+ }
183
+ });
184
+
185
+ chapterTrack.addEventListener('cuechange', function () {
186
+ // Fire this whenever the chapters changes
187
+ var myCues = chapterTrack.activeCues;
188
+ if (myCues.length > 0) {
189
+ var currentLocation = chapterTrack.activeCues[0].startTime;
190
+ var nextLocation = chapterTrack.activeCues[0].endTime;
191
+ var cueMatch = chapterTrack.activeCues[0].text;
192
+ var matchingCueArray = document.querySelectorAll('[rel="' + currentLocation + '"]');
193
+
194
+ // Set Forward and backwards buttons timestamps
195
+ forwardsButton.setAttribute('data-id', nextLocation);
196
+ backwardsButton.setAttribute('data-id', currentLocation);
197
+
198
+ // Add chapter stepping even when video is played
199
+ if (manualStep === false) {
200
+ currentChapter += 1;
201
+ }
202
+
203
+ // Disable forwardsbutton when on last chapter
204
+ if (currentChapter >= chapterTrack.cues.length) {
205
+ forwardsButton.setAttribute('disabled', 'disabled');
206
+ }
207
+
208
+ // Handle current and watched items
209
+ [].forEach.call(matchingCueArray, function (matchingCue) {
210
+ var thisChapter = matchingCue;
211
+ if (thisChapter.innerHTML === cueMatch) {
212
+ var chapter = thisChapter;
213
+
214
+ if (chapter === thisChapter) {
215
+ // get the chapter <li> elements based on the currentLocation
216
+ var locations = [].slice.call(chapter.closest('figure').querySelectorAll('.js-chapters li'));
217
+
218
+ var counter = 0;
219
+
220
+ [].forEach.call(locations, function (location) {
221
+ // remove current classes from all items on page refresh
222
+ location.classList.remove('is-current-item');
223
+ location.querySelector('a').classList.remove('is-current');
224
+
225
+ if (location.classList.contains('is-current-item')) {
226
+ counter += 1; // iterate counter when active chapter is reached
227
+ }
228
+ if (counter < 1) {
229
+ // add watched class to everything before the current chapter to show progress
230
+ location.classList.add('is-watched');
231
+ } else {
232
+ // remove watched on all other items
233
+ location.classList.remove('is-watched');
234
+ }
235
+ });
236
+ chapter.parentNode.classList.add('is-current-item');
237
+ chapter.classList.add('is-current');
238
+ }
239
+ }
240
+ });
241
+ }
242
+ }, false);
243
+
244
+ // Get timeline post IDs from metadata.vtt
245
+ metadataTrack.addEventListener('cuechange', function () {
246
+ var metadataCues = metadataTrack.activeCues;
247
+ var chapterCues = chapterTrack.activeCues[0];
248
+
249
+ if (metadataCues.length > 0) {
250
+ var metadataCueMatch = metadataTrack.activeCues[0].text;
251
+
252
+ [].forEach.call(timelinePosts, function (timelinePost) {
253
+ timelinePost.classList.remove('is-current');
254
+ });
255
+
256
+ document.querySelector('[data-id="' + metadataCueMatch + '"]').classList.add('is-current');
257
+
258
+ if (chapterCues) {
259
+ var chapterStartTime = chapterCues.startTime;
260
+
261
+ // Let stuff load
262
+ var listElement = void 0;
263
+ var timeOut = null;
264
+
265
+ setTimeout(function () {
266
+ listElement = document.getElementById(chapterStartTime);
267
+ }, 100);
268
+
269
+ timeOut = function wait(condition, callback) {
270
+ if (typeof condition() !== 'undefined' && listElement) {
271
+ listElement.classList.add('is-current-item');
272
+ } else {
273
+ setTimeout(function () {
274
+ wait(condition, callback);
275
+ }, 0);
276
+ }
277
+ };
278
+ timeOut(function () {
279
+ return listElement;
280
+ }, function () {});
281
+ }
282
+ }
283
+ }, false);
284
+
285
+ // Get subtitles cues from subtitles.vtt
286
+ subtitlesTrack.addEventListener('cuechange', function () {
287
+ var subtitlesCues = subtitlesTrack.activeCues;
288
+
289
+ if (subtitlesCues.length > 0) {
290
+ var subtitlesCuesMatch = subtitlesTrack.activeCues[0].text;
291
+ subtitlesContainer.innerHTML = '<span>' + subtitlesCuesMatch + '</span>';
292
+ }
293
+ }, false);
294
+ }
295
+ }
296
+ }
297
+
298
+ displayChapters(chapterTrackElement);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "2.22.1",
3
+ "version": "2.22.3-beta.0.2",
4
4
  "main": "dist/components.js",
5
5
  "ports": {
6
6
  "fractal": "3000"
@@ -26,13 +26,15 @@
26
26
  "watch:icons": "onchange 'src/atoms/icon/*.svg' -- npm run create-icons-config",
27
27
  "watch": "concurrently \"npm:watch:css\" \"npm:watch:js\" \"npm:watch:icons\"",
28
28
  "copy:images": "copyfiles -f src/assets/images/* public/assets/images",
29
+ "copy:videos": "copyfiles -f src/assets/video/* public/assets/video",
29
30
  "copy:fonts": "copyfiles -f src/base/fonts/* public/assets/fonts",
30
31
  "copy:zip": "copyfiles -f src/assets/zip/* public/assets/zip",
31
- "copy:local-assets": "npm run copy:images && npm run copy:fonts && npm run copy:zip",
32
+ "copy:local-assets": "npm run copy:images && npm run copy:fonts && npm run copy:videos && npm run copy:zip",
32
33
  "copy:images:build": "copyfiles -f src/assets/images/* build/assets/images",
34
+ "copy:videos:build": "copyfiles -f src/assets/video/* build/assets/video",
33
35
  "copy:zip:build": "copyfiles -f src/assets/zip/* build/assets/zip",
34
36
  "copy:fonts:build": "copyfiles -f src/base/fonts/* build/assets/fonts",
35
- "copy:build": "npm run copy:images:build && npm run copy:zip:build && npm run copy:fonts:build",
37
+ "copy:build": "npm run copy:images:build && npm run copy:zip:build && npm run copy:fonts:build && npm run copy:videos:build",
36
38
  "build": "npm run build:css && npm run build:js && npm run uglify && npm run build:fractal && npm run copy:build",
37
39
  "dev": "concurrently \"npm:start:fractal\" \"npm:watch\" \"npm:copy:local-assets\"",
38
40
  "package-js": "NODE_ENV=production babel src --out-dir dist --ignore src/**/*.config.js,src/app.js",
@@ -48,6 +50,8 @@
48
50
  "babel-eslint": "^10.0.3",
49
51
  "babel-plugin-syntax-dynamic-import": "^6.18.0",
50
52
  "babel-plugin-transform-class-properties": "^6.24.1",
53
+ "babel-plugin-transform-custom-element-classes": "^0.1.0",
54
+ "babel-plugin-transform-es2015-classes": "^6.24.1",
51
55
  "babel-plugin-transform-object-rest-spread": "^6.26.0",
52
56
  "babel-preset-env": "^1.7.0",
53
57
  "browserify": "^16.5.0",
package/src/.DS_Store ADDED
Binary file
package/src/app.scss CHANGED
@@ -42,7 +42,6 @@ $namespace: '';
42
42
  @import 'atoms/ribbon/ribbon';
43
43
  @import 'atoms/quote/quote';
44
44
  @import 'atoms/rating/rating';
45
- @import 'atoms/timeline/timeline';
46
45
 
47
46
  // Molecules
48
47
  @import 'molecules/breadcrumb/breadcrumb';
@@ -65,13 +64,16 @@ $namespace: '';
65
64
  @import 'molecules/icon-overlay/icon-overlay';
66
65
  @import 'molecules/submenu/submenu';
67
66
  @import 'molecules/glider/glider';
68
- @import 'molecules/timeline-navigation/timeline-navigation';
67
+ @import 'molecules/glider/glider-course';
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';
72
73
  @import 'organisms/footer/footer';
73
74
  @import 'organisms/mega-menu/mega-menu';
74
75
  @import 'organisms/hero/hero';
76
+ @import 'organisms/hero/hero--dynamic-headline';
75
77
  @import 'organisms/sections/sections';
76
78
  @import 'organisms/accordion/accordion';
77
79
  @import 'organisms/domain-search/domain-search';
@@ -84,6 +86,8 @@ $namespace: '';
84
86
  @import 'organisms/event-listing-item/event-listing-item';
85
87
  @import 'organisms/podcast/podcast-episodes';
86
88
  @import 'organisms/podcast/podcast-player';
89
+ @import 'organisms/video-guide/video-guide';
90
+ @import 'organisms/timeline/timeline';
87
91
 
88
92
  // Structures
89
93
  @import 'structures/manifest';
Binary file
@@ -1,7 +1,10 @@
1
1
  import SmoothScroll from 'smooth-scroll';
2
2
 
3
3
  const anchorScroll = new SmoothScroll('a[href*="#"]', {
4
+ speed: 1500,
5
+ speedAsDuration: true,
4
6
  easing: 'easeOutCubic',
7
+ ignore: '[data-scroll-ignore]',
5
8
  });
6
9
 
7
10
  module.exports = anchorScroll;
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ // Get top of element relative to window
3
+ offsetTop(el) {
4
+ const rect = el.getBoundingClientRect();
5
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
6
+ return rect.top + scrollTop;
7
+ },
8
+
9
+ // Get bottom of element relative to window
10
+ offsetBottom(el) {
11
+ const rect = el.getBoundingClientRect();
12
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
13
+ return rect.bottom + scrollTop;
14
+ },
15
+
16
+ // Get left of element relative to window
17
+ offsetLeft(el) {
18
+ const rect = el.getBoundingClientRect();
19
+ const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
20
+ return rect.left + scrollLeft;
21
+ },
22
+ };
@@ -0,0 +1,15 @@
1
+ function isInView(el) {
2
+ const box = el.getBoundingClientRect();
3
+ return box.top < window.innerHeight && box.bottom >= 0;
4
+ }
5
+
6
+ const parallaxes = document.querySelectorAll('.js-parallax');
7
+
8
+ window.addEventListener('scroll', () => {
9
+ [].forEach.call(parallaxes, (parallax) => {
10
+ const visible = isInView(parallax);
11
+ if (visible) {
12
+ parallax.classList.add('animate');
13
+ }
14
+ });
15
+ });
Binary file
@@ -0,0 +1,25 @@
1
+ WEBVTT
2
+
3
+ 00:00:00.000 --> 00:00:39.000
4
+ 1 / 8: Introduktion
5
+
6
+ 00:00:39.000 --> 00:01:51.500
7
+ 2 / 8: Idén om internet
8
+
9
+ 00:01:51.500 --> 00:02:53.000
10
+ 3 / 8: Arpanet blir till
11
+
12
+ 00:02:53.000 --> 00:03:27.000
13
+ 4 / 8: TCP/IP uppfinns
14
+
15
+ 00:03:27.000 --> 00:03:56.500
16
+ 5 / 8: Sveriges första internetnod
17
+
18
+ 00:03:56.500 --> 00:04:34.000
19
+ 6 / 8: Toppdomänen .se registreras
20
+
21
+ 00:04:34.000 --> 00:05:17.000
22
+ 7 / 8: World Wide Web
23
+
24
+ 00:05:17.000 --> 00:06:28.000
25
+ 8 / 8: Mosaic - den grafiska webbläsaren
@@ -0,0 +1,25 @@
1
+ WEBVTT
2
+
3
+ 00:00:00.000 --> 00:00:39.000
4
+ 6513
5
+
6
+ 00:00:39.000 --> 00:01:51.500
7
+ 1376
8
+
9
+ 00:01:51.500 --> 00:02:23.000
10
+ 666
11
+
12
+ 00:02:23.000 --> 00:03:27.000
13
+ 777
14
+
15
+ 00:03:27.000 --> 00:03:56.500
16
+ 888
17
+
18
+ 00:03:56.500 --> 00:04:34.000
19
+ 242
20
+
21
+ 00:04:34.000 --> 00:05:17.000
22
+ 1337
23
+
24
+ 00:05:17.000 --> 00:06:28.000
25
+ 1177
Binary file
@@ -0,0 +1,25 @@
1
+ WEBVTT
2
+
3
+ 1
4
+ 00:00:00.500 --> 00:00:02.000
5
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit
6
+
7
+ 2
8
+ 00:00:02.100 --> 00:00:03.000
9
+ Phasellus eget lorem dui
10
+
11
+ 3
12
+ 00:00:03.100 --> 00:00:04.500
13
+ Morbi ac nisi ac purus maximus semper a vitae diam fusce sit amet libero non tortor
14
+
15
+ 4
16
+ 00:00:04.600 --> 00:00:05.500
17
+ Ut scelerisque sagittis justo vitae viverra
18
+
19
+ 5
20
+ 00:00:05.600 --> 00:00:06.500
21
+ unc blandit justo sed odio tempus ultrices. Pellentesque sollicitudin justo.
22
+
23
+ 6
24
+ 00:00:06.100 --> 00:00:08.000
25
+ Etiam ut volutpat tortor. Nunc iaculis luctus sapien.
Binary file
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ status: 'ready',
3
+
4
+ context: {
5
+ text: 'Fler nyheter',
6
+ url: '#',
7
+ icon: 'arrow-forwards'
8
+ }
9
+ }
@@ -64,7 +64,6 @@
64
64
 
65
65
  @include e(text) {
66
66
  position: relative;
67
- top: -#{rhythm(0.2)};
68
67
  transform: translateY(0);
69
68
  transition: 0.3s opacity, 0.3s transform;
70
69
  transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
@@ -172,8 +171,8 @@
172
171
 
173
172
  @include e(icon) {
174
173
  position: static;
175
- width: $icon-size-medium;
176
- height: $icon-size-medium;
174
+ width: $icon-size;
175
+ height: $icon-size;
177
176
  transform: none;
178
177
  fill: $color-cyberspace;
179
178
  }
@@ -246,22 +245,20 @@
246
245
  }
247
246
  }
248
247
 
249
- @include m(sandstone) {
250
- color: $color-sandstone;
248
+ @include m(snow) {
249
+ color: transparent;
251
250
 
252
251
  &:hover,
253
252
  &:focus {
254
- color: darken($color-sandstone, 12%);
255
- text-shadow: none;
253
+ color: $color-snow;
256
254
  }
257
255
 
258
256
  @include e(text) {
259
257
  color: $color-snow;
260
- text-shadow: 0 0 rhythm(2) $color-sandstone-dark;
261
258
  }
262
259
 
263
260
  @include e(icon) {
264
- fill: $color-cyberspace;
261
+ fill: $color-snow;
265
262
  }
266
263
  }
267
264