@internetstiftelsen/styleguide 2.22.4 → 2.23.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/.DS_Store +0 -0
- package/dist/assets/js/anchorScroll.js +16 -0
- package/dist/assets/js/offset.js +26 -0
- package/dist/assets/js/parallax.js +17 -0
- package/dist/components.js +2 -0
- package/dist/molecules/continue-video-guide/continue-video-guide.js +91 -0
- package/dist/molecules/glider/glider-course.js +7 -7
- package/dist/molecules/glider/glider-hero.js +46 -0
- package/dist/organisms/timeline/timeline.js +155 -0
- package/dist/organisms/video-guide/video-guide.js +312 -0
- package/package.json +7 -3
- package/src/.DS_Store +0 -0
- package/src/app.scss +3 -2
- package/src/assets/.DS_Store +0 -0
- package/src/assets/js/anchorScroll.js +10 -0
- package/src/assets/js/offset.js +22 -0
- package/src/assets/js/parallax.js +15 -0
- package/src/assets/video/.DS_Store +0 -0
- package/src/assets/video/Internets-Historia-HEVC-h265-HEVC-h265.mov +0 -0
- package/src/assets/video/Internets-Historia-HEVC-h265-vp9-chrome.webm +0 -0
- package/src/assets/video/chapters.vtt +25 -0
- package/src/assets/video/metadata.vtt +28 -0
- package/src/assets/video/movie-webm.webm +0 -0
- package/src/assets/video/videoplayer.vtt +25 -0
- package/src/atoms/.DS_Store +0 -0
- package/src/atoms/button/_button.scss +6 -9
- package/src/atoms/icon/_all-icons.zip +0 -0
- package/src/atoms/icon/spinner-white.svg +1 -9
- package/src/atoms/icon/spinner.svg +1 -9
- package/src/atoms/icon/sprite.svg +17 -0
- package/src/atoms/icon/step-backwards.svg +1 -0
- package/src/atoms/icon/step-forwards.svg +1 -0
- package/src/atoms/icon/subtitles.svg +1 -0
- package/src/atoms/meta/meta.config.js +1 -1
- package/src/atoms/tag/_tag.scss +2 -2
- package/src/base/_normalize.scss +1 -1
- package/src/base/fonts/_fonts.scss +8 -8
- package/src/components.js +1 -0
- package/src/configurations/_extends.scss +5 -1
- package/src/configurations/_variables.scss +3 -3
- package/src/configurations/colors/_colors-functions.scss +2 -3
- package/src/configurations/grid/_grid.scss +26 -7
- package/src/configurations/icons.json +1 -1
- package/src/configurations/typography/_typography.scss +61 -7
- package/src/molecules/.DS_Store +0 -0
- package/src/molecules/glider/_glider-course.scss +121 -0
- package/src/molecules/glider/_glider-hero.scss +327 -0
- package/src/molecules/glider/_glider.scss +3 -116
- package/src/molecules/glider/glider-course.js +7 -7
- package/src/molecules/glider/glider-hero.js +40 -0
- package/src/molecules/glider/glider.config.js +7 -0
- package/src/organisms/hero/_hero--dynamic-headline.scss +168 -0
- package/src/organisms/hero/_hero.scss +16 -0
- package/src/organisms/hero/hero.config.js +10 -1
- package/src/structures/_article.scss +3 -3
- package/src/utilities/_hide.scss +4 -0
- package/src/utilities/_links.scss +11 -0
- package/src/assets/css/footer/isolated-footer.css +0 -7367
- package/src/assets/css/footer/isolated-footer.css.map +0 -1
- package/src/assets/css/footer/isolated-footer.min.css +0 -2
- package/src/brandbook/internetstiftelsen/bildman/303/251r/bildman/303/251r.config.js +0 -5
- package/src/brandbook/internetstiftelsen/tonalitet och spr/303/245kbruk/tonalitet och spr/303/245kbruk.config.js" +0 -5
- package/src/pages/timeline/timeline.config.js +0 -19
|
@@ -0,0 +1,312 @@
|
|
|
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 navigationButton = document.querySelector('.js-show-timelineposts');
|
|
21
|
+
var timeLinePosts = document.querySelector('.js-timeline-posts');
|
|
22
|
+
var currentChapter = 1;
|
|
23
|
+
var manualStep = false;
|
|
24
|
+
var sourceElement = null;
|
|
25
|
+
|
|
26
|
+
// Has src attributes been set already?
|
|
27
|
+
if (sourceElement) {
|
|
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
|
+
|
|
38
|
+
// Store current time in on page reload
|
|
39
|
+
window.addEventListener('unload', function () {
|
|
40
|
+
// Set localStorage if video has started playing
|
|
41
|
+
if (video.currentTime > 0) {
|
|
42
|
+
var currentGuideURL = window.location.href;
|
|
43
|
+
var currentGuideImage = document.querySelector('.js-guide-continue-image').src;
|
|
44
|
+
localStorage.setItem('InmsCurrentTime', video.currentTime);
|
|
45
|
+
localStorage.setItem('InmsDuration', video.duration); // Get totalt duration of video
|
|
46
|
+
localStorage.setItem('InmsCurrentGuideURL', currentGuideURL);
|
|
47
|
+
localStorage.setItem('InmsCurrentGuideImage', currentGuideImage);
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Get value from localStorage in present
|
|
52
|
+
if (localStorage.getItem('InmsCurrentTime')) {
|
|
53
|
+
var videoCurrentTime = localStorage.getItem('InmsCurrentTime');
|
|
54
|
+
|
|
55
|
+
if (videoCurrentTime > 0) {
|
|
56
|
+
video.currentTime = videoCurrentTime;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Toggle subtitles
|
|
61
|
+
if (subtitlesBtn) {
|
|
62
|
+
subtitlesBtn.addEventListener('click', function () {
|
|
63
|
+
subtitlesBtn.classList.toggle('is-active');
|
|
64
|
+
subtitlesContainer.classList.toggle('is-visible');
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Play / pause
|
|
69
|
+
if (playBtn) {
|
|
70
|
+
playBtn.addEventListener('click', function () {
|
|
71
|
+
if (video.paused) {
|
|
72
|
+
video.play();
|
|
73
|
+
pauseIcon.classList.remove('is-hidden');
|
|
74
|
+
playIcon.classList.add('is-hidden');
|
|
75
|
+
manualStep = false;
|
|
76
|
+
} else {
|
|
77
|
+
video.pause();
|
|
78
|
+
pauseIcon.classList.add('is-hidden');
|
|
79
|
+
playIcon.classList.remove('is-hidden');
|
|
80
|
+
manualStep = true;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
video.addEventListener('playing', function () {
|
|
85
|
+
pauseIcon.classList.remove('is-hidden');
|
|
86
|
+
playIcon.classList.add('is-hidden');
|
|
87
|
+
manualStep = false;
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
video.addEventListener('ended', function () {
|
|
91
|
+
pauseIcon.classList.add('is-hidden');
|
|
92
|
+
playIcon.classList.remove('is-hidden');
|
|
93
|
+
video.currentTime = 0;
|
|
94
|
+
currentChapter = 1;
|
|
95
|
+
manualStep = false;
|
|
96
|
+
forwardsButton.removeAttribute('disabled');
|
|
97
|
+
subtitlesContainer.innerHTML = '';
|
|
98
|
+
localStorage.removeItem('InmsCurrentTime');
|
|
99
|
+
localStorage.removeItem('InmsDuration');
|
|
100
|
+
localStorage.removeItem('InmsCurrentGuideURL');
|
|
101
|
+
localStorage.removeItem('InmsCurrentGuideImage');
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (abortButton) {
|
|
106
|
+
abortButton.addEventListener('click', function (e) {
|
|
107
|
+
e.preventDefault();
|
|
108
|
+
var urlTarget = abortButton.getAttribute('href');
|
|
109
|
+
video.pause();
|
|
110
|
+
video.currentTime = 0;
|
|
111
|
+
forwardsButton.removeAttribute('disabled');
|
|
112
|
+
currentChapter = 1;
|
|
113
|
+
manualStep = false;
|
|
114
|
+
localStorage.removeItem('InmsCurrentTime');
|
|
115
|
+
localStorage.removeItem('InmsDuration');
|
|
116
|
+
localStorage.removeItem('InmsCurrentGuideURL');
|
|
117
|
+
localStorage.removeItem('InmsCurrentGuideImage');
|
|
118
|
+
window.location.href = urlTarget;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (navigationButton) {
|
|
123
|
+
navigationButton.addEventListener('click', function () {
|
|
124
|
+
navigationButton.classList.toggle('is-toggeled');
|
|
125
|
+
timeLinePosts.classList.toggle('is-visible');
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function displayChapters() {
|
|
131
|
+
if (chapterTrackElement && trackMetadataElement) {
|
|
132
|
+
// Set all track elements to hidden mode to allow scripting
|
|
133
|
+
[].forEach.call(video.textTracks, function (txtTrack) {
|
|
134
|
+
txtTrack.mode = 'hidden';
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
if (chapterTrack.kind === 'chapters') {
|
|
138
|
+
video.addEventListener('loadedmetadata', function () {
|
|
139
|
+
// Loop through chapters and create chapter list
|
|
140
|
+
// Let data load
|
|
141
|
+
setTimeout(function () {
|
|
142
|
+
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
|
+
|
|
164
|
+
// If not set in sessionStorgare, set first cue on forward button on page load
|
|
165
|
+
if (!localStorage.getItem('InmsCurrentTime')) {
|
|
166
|
+
forwardsButton.setAttribute('data-id', chapterTrack.cues[0].endTime);
|
|
167
|
+
}
|
|
168
|
+
}, 100);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
forwardsButton.addEventListener('click', function () {
|
|
172
|
+
var dataId = forwardsButton.dataset.id;
|
|
173
|
+
var currentTime = parseInt(dataId, 10);
|
|
174
|
+
manualStep = true;
|
|
175
|
+
currentTime += 1;
|
|
176
|
+
video.currentTime = currentTime;
|
|
177
|
+
currentChapter += 1;
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
backwardsButton.addEventListener('click', function () {
|
|
181
|
+
var dataId = backwardsButton.dataset.id;
|
|
182
|
+
var lastTime = parseInt(dataId, 10);
|
|
183
|
+
lastTime -= 1;
|
|
184
|
+
video.currentTime = lastTime;
|
|
185
|
+
forwardsButton.removeAttribute('disabled');
|
|
186
|
+
manualStep = true;
|
|
187
|
+
currentChapter -= 1;
|
|
188
|
+
|
|
189
|
+
if (video.currentTime <= 0) {
|
|
190
|
+
backwardsButton.removeAttribute('data-id');
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
chapterTrack.addEventListener('cuechange', function () {
|
|
195
|
+
// Fire this whenever the chapters changes
|
|
196
|
+
var myCues = chapterTrack.activeCues;
|
|
197
|
+
if (myCues.length > 0) {
|
|
198
|
+
var currentLocation = chapterTrack.activeCues[0].startTime;
|
|
199
|
+
var nextLocation = chapterTrack.activeCues[0].endTime;
|
|
200
|
+
var cueMatch = chapterTrack.activeCues[0].text;
|
|
201
|
+
var matchingCueArray = document.querySelectorAll('[rel="' + currentLocation + '"]');
|
|
202
|
+
|
|
203
|
+
// Set Forward and backwards buttons timestamps
|
|
204
|
+
forwardsButton.setAttribute('data-id', nextLocation);
|
|
205
|
+
backwardsButton.setAttribute('data-id', currentLocation);
|
|
206
|
+
|
|
207
|
+
// Add chapter stepping even when video is played
|
|
208
|
+
if (manualStep === false) {
|
|
209
|
+
currentChapter += 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Disable forwardsbutton when on last chapter
|
|
213
|
+
if (currentChapter >= chapterTrack.cues.length) {
|
|
214
|
+
forwardsButton.setAttribute('disabled', 'disabled');
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Handle current and watched items
|
|
218
|
+
[].forEach.call(matchingCueArray, function (matchingCue) {
|
|
219
|
+
var thisChapter = matchingCue;
|
|
220
|
+
if (thisChapter.innerHTML === cueMatch) {
|
|
221
|
+
var chapter = thisChapter;
|
|
222
|
+
|
|
223
|
+
if (chapter === thisChapter) {
|
|
224
|
+
// get the chapter <li> elements based on the currentLocation
|
|
225
|
+
var locations = [].slice.call(chapter.closest('figure').querySelectorAll('.js-chapters li'));
|
|
226
|
+
|
|
227
|
+
var counter = 0;
|
|
228
|
+
|
|
229
|
+
[].forEach.call(locations, function (location) {
|
|
230
|
+
// remove current classes from all items on page refresh
|
|
231
|
+
location.classList.remove('is-current-item');
|
|
232
|
+
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
|
+
});
|
|
245
|
+
chapter.parentNode.classList.add('is-current-item');
|
|
246
|
+
chapter.classList.add('is-current');
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}, false);
|
|
252
|
+
|
|
253
|
+
// Get timeline post IDs from metadata.vtt
|
|
254
|
+
metadataTrack.addEventListener('cuechange', function () {
|
|
255
|
+
var metadataCues = metadataTrack.activeCues;
|
|
256
|
+
var chapterCues = chapterTrack.activeCues[0];
|
|
257
|
+
|
|
258
|
+
if (metadataCues.length > 0) {
|
|
259
|
+
var metadataCueMatch = metadataTrack.activeCues[0].text;
|
|
260
|
+
|
|
261
|
+
[].forEach.call(timelinePosts, function (timelinePost) {
|
|
262
|
+
timelinePost.classList.remove('is-current');
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
var idSelectors = document.querySelectorAll('[data-id="' + metadataCueMatch + '"]');
|
|
266
|
+
|
|
267
|
+
[].forEach.call(idSelectors, function (idSelector) {
|
|
268
|
+
idSelector.classList.add('is-current');
|
|
269
|
+
idSelector.focus();
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
if (chapterCues) {
|
|
273
|
+
var chapterStartTime = chapterCues.startTime;
|
|
274
|
+
|
|
275
|
+
// Let stuff load
|
|
276
|
+
var listElement = void 0;
|
|
277
|
+
var timeOut = null;
|
|
278
|
+
|
|
279
|
+
setTimeout(function () {
|
|
280
|
+
listElement = document.getElementById(chapterStartTime);
|
|
281
|
+
}, 100);
|
|
282
|
+
|
|
283
|
+
timeOut = function wait(condition, callback) {
|
|
284
|
+
if (typeof condition() !== 'undefined' && listElement) {
|
|
285
|
+
listElement.classList.add('is-current-item');
|
|
286
|
+
} else {
|
|
287
|
+
setTimeout(function () {
|
|
288
|
+
wait(condition, callback);
|
|
289
|
+
}, 0);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
timeOut(function () {
|
|
293
|
+
return listElement;
|
|
294
|
+
}, function () {});
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}, false);
|
|
298
|
+
|
|
299
|
+
// Get subtitles cues from subtitles.vtt
|
|
300
|
+
subtitlesTrack.addEventListener('cuechange', function () {
|
|
301
|
+
var subtitlesCues = subtitlesTrack.activeCues;
|
|
302
|
+
|
|
303
|
+
if (subtitlesCues.length > 0) {
|
|
304
|
+
var subtitlesCuesMatch = subtitlesTrack.activeCues[0].text;
|
|
305
|
+
subtitlesContainer.innerHTML = '<span>' + subtitlesCuesMatch + '</span>';
|
|
306
|
+
}
|
|
307
|
+
}, false);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
displayChapters(chapterTrackElement);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetstiftelsen/styleguide",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
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,15 @@ $namespace: '';
|
|
|
65
64
|
@import 'molecules/icon-overlay/icon-overlay';
|
|
66
65
|
@import 'molecules/submenu/submenu';
|
|
67
66
|
@import 'molecules/glider/glider';
|
|
68
|
-
@import 'molecules/
|
|
67
|
+
@import 'molecules/glider/glider-course';
|
|
68
|
+
@import 'molecules/glider/glider-hero';
|
|
69
69
|
|
|
70
70
|
// Organisms
|
|
71
71
|
@import 'organisms/header/header';
|
|
72
72
|
@import 'organisms/footer/footer';
|
|
73
73
|
@import 'organisms/mega-menu/mega-menu';
|
|
74
74
|
@import 'organisms/hero/hero';
|
|
75
|
+
@import 'organisms/hero/hero--dynamic-headline';
|
|
75
76
|
@import 'organisms/sections/sections';
|
|
76
77
|
@import 'organisms/accordion/accordion';
|
|
77
78
|
@import 'organisms/domain-search/domain-search';
|
|
Binary file
|
|
@@ -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
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
WEBVTT
|
|
2
|
+
|
|
3
|
+
00:00:00.000 --> 00:00:39.000
|
|
4
|
+
Kapitel 1 / 8: Introduktion
|
|
5
|
+
|
|
6
|
+
00:00:39.000 --> 00:01:51.500
|
|
7
|
+
Kapitel 2 / 8: Idén om internet
|
|
8
|
+
|
|
9
|
+
00:01:51.500 --> 00:02:53.000
|
|
10
|
+
Kapitel 3 / 8: Arpanet blir till
|
|
11
|
+
|
|
12
|
+
00:02:53.000 --> 00:03:27.000
|
|
13
|
+
Kapitel 4 / 8: TCP/IP uppfinns
|
|
14
|
+
|
|
15
|
+
00:03:27.000 --> 00:03:56.500
|
|
16
|
+
Kapitel 5 / 8: Sveriges första internetnod
|
|
17
|
+
|
|
18
|
+
00:03:56.500 --> 00:04:34.000
|
|
19
|
+
Kapitel 6 / 8: Toppdomänen .se registreras
|
|
20
|
+
|
|
21
|
+
00:04:34.000 --> 00:05:17.000
|
|
22
|
+
Kapitel 7 / 8: World Wide Web
|
|
23
|
+
|
|
24
|
+
00:05:17.000 --> 00:06:28.000
|
|
25
|
+
Kapitel 8 / 8: Mosaic - den grafiska webbläsaren
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
WEBVTT
|
|
2
|
+
|
|
3
|
+
00:00:00.000 --> 00:00:25.000
|
|
4
|
+
6513
|
|
5
|
+
|
|
6
|
+
00:00:25.000 --> 00:00:39.000
|
|
7
|
+
5555
|
|
8
|
+
|
|
9
|
+
00:00:39.000 --> 00:01:51.500
|
|
10
|
+
1376
|
|
11
|
+
|
|
12
|
+
00:01:51.500 --> 00:02:23.000
|
|
13
|
+
666
|
|
14
|
+
|
|
15
|
+
00:02:23.000 --> 00:03:27.000
|
|
16
|
+
777
|
|
17
|
+
|
|
18
|
+
00:03:27.000 --> 00:03:56.500
|
|
19
|
+
888
|
|
20
|
+
|
|
21
|
+
00:03:56.500 --> 00:04:34.000
|
|
22
|
+
242
|
|
23
|
+
|
|
24
|
+
00:04:34.000 --> 00:05:17.000
|
|
25
|
+
1337
|
|
26
|
+
|
|
27
|
+
00:05:17.000 --> 00:06:28.000
|
|
28
|
+
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
|
|
@@ -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
|
|
176
|
-
height: $icon-size
|
|
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(
|
|
250
|
-
color:
|
|
248
|
+
@include m(snow) {
|
|
249
|
+
color: transparent;
|
|
251
250
|
|
|
252
251
|
&:hover,
|
|
253
252
|
&:focus {
|
|
254
|
-
color:
|
|
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-
|
|
261
|
+
fill: $color-snow;
|
|
265
262
|
}
|
|
266
263
|
}
|
|
267
264
|
|
|
Binary file
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
<g>
|
|
3
|
-
<circle cx="50" cy="50" fill="none" r="43" stroke="none" stroke-width="7"></circle>
|
|
4
|
-
<circle cx="50" cy="50" fill="none" r="43" stroke="#fff" stroke-width="7" stroke-linecap="square" transform="rotate(27.6965 50 50)">
|
|
5
|
-
<animatetransform attributename="transform" type="rotate" calcmode="linear" values="0 50 50;180 50 50;720 50 50" keytimes="0;0.5;1" dur="2.5s" begin="0s" repeatcount="indefinite"></animatetransform>
|
|
6
|
-
<animate attributename="stroke-dasharray" calcmode="linear" values="9.42477796076938 179.0707812546182;188.4955592153876 -2.842170943040401e-14;9.42477796076938 179.0707812546182" keytimes="0;0.5;1" dur="2.5" begin="0s" repeatcount="indefinite"></animate>
|
|
7
|
-
</circle>
|
|
8
|
-
</g>
|
|
9
|
-
</svg>
|
|
1
|
+
<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-ring" style="background: none;"><circle cx="50" cy="50" ng-attr-r="{{config.radius}}" ng-attr-stroke="{{config.base}}" ng-attr-stroke-width="{{config.width}}" fill="none" r="43" stroke="transparent" stroke-width="7"></circle><circle cx="50" cy="50" ng-attr-r="{{config.radius}}" ng-attr-stroke="{{config.stroke}}" ng-attr-stroke-width="{{config.innerWidth}}" ng-attr-stroke-linecap="{{config.linecap}}" fill="none" r="43" stroke="#ffffff" stroke-width="7" stroke-linecap="square" transform="rotate(27.6965 50 50)"><animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;180 50 50;720 50 50" keyTimes="0;0.5;1" dur="2.5s" begin="0s" repeatCount="indefinite"></animateTransform><animate attributeName="stroke-dasharray" calcMode="linear" values="9.42477796076938 179.0707812546182;188.4955592153876 -2.842170943040401e-14;9.42477796076938 179.0707812546182" keyTimes="0;0.5;1" dur="2.5" begin="0s" repeatCount="indefinite"></animate></circle></svg>
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
<g>
|
|
3
|
-
<circle cx="50" cy="50" fill="none" r="43" stroke="#50b2fc" stroke-width="7"></circle>
|
|
4
|
-
<circle cx="50" cy="50" fill="none" r="43" stroke="#a7d8fd" stroke-width="7" stroke-linecap="square" transform="rotate(27.6965 50 50)">
|
|
5
|
-
<animatetransform attributename="transform" type="rotate" calcmode="linear" values="0 50 50;180 50 50;720 50 50" keytimes="0;0.5;1" dur="2.5s" begin="0s" repeatcount="indefinite"></animatetransform>
|
|
6
|
-
<animate attributename="stroke-dasharray" calcmode="linear" values="9.42477796076938 179.0707812546182;188.4955592153876 -2.842170943040401e-14;9.42477796076938 179.0707812546182" keytimes="0;0.5;1" dur="2.5" begin="0s" repeatcount="indefinite"></animate>
|
|
7
|
-
</circle>
|
|
8
|
-
</g>
|
|
9
|
-
</svg>
|
|
1
|
+
<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-ring" style="background: none;"><circle cx="50" cy="50" ng-attr-r="{{config.radius}}" ng-attr-stroke="{{config.base}}" ng-attr-stroke-width="{{config.width}}" fill="none" r="43" stroke="#a7d8fd" stroke-width="7"></circle><circle cx="50" cy="50" ng-attr-r="{{config.radius}}" ng-attr-stroke="{{config.stroke}}" ng-attr-stroke-width="{{config.innerWidth}}" ng-attr-stroke-linecap="{{config.linecap}}" fill="none" r="43" stroke="#50b2fc" stroke-width="7" stroke-linecap="square" transform="rotate(27.6965 50 50)"><animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;180 50 50;720 50 50" keyTimes="0;0.5;1" dur="2.5s" begin="0s" repeatCount="indefinite"></animateTransform><animate attributeName="stroke-dasharray" calcMode="linear" values="9.42477796076938 179.0707812546182;188.4955592153876 -2.842170943040401e-14;9.42477796076938 179.0707812546182" keyTimes="0;0.5;1" dur="2.5" begin="0s" repeatCount="indefinite"></animate></circle></svg>
|
|
@@ -155,10 +155,16 @@
|
|
|
155
155
|
<path d="M16.6 4.1V1l-4.5 4.5 4.5 4.5V7c5.6.3 10 4.9 10 10.6 0 5.9-4.8 10.6-10.6 10.6S5.4 23.4 5.4 17.5c0-3.5 1.8-6.8 4.7-8.8L8.5 6.4c-3.7 2.5-5.9 6.7-5.9 11.2C2.5 25 8.6 31 16 31s13.5-6 13.5-13.5c0-7.2-5.8-13.1-12.9-13.4z"/>
|
|
156
156
|
<path d="M12.5 14.5c0 .2-.1.5-.6.5h-1.1v1.3h1.6v4.8H14v-7.2h-1.5v.6zM18.7 16c-.3 0-.6 0-.8.1l.2-.8H21v-1.5h-4.1l-.9 4 1.4.4.1-.1c.2-.3.6-.6 1-.6.7 0 1.1.5 1.1 1.1 0 .6-.4 1.1-1.1 1.1-.8 0-1-.6-1.2-1.1v-.2l-1.5.4v.2c.3 1.3 1.4 2.2 2.6 2.2 1.5 0 2.7-1.2 2.7-2.6.1-1.4-1.1-2.6-2.4-2.6z"/>
|
|
157
157
|
</symbol>
|
|
158
|
+
<symbol id="icon-step-backwards" viewbox="0 0 32 32">
|
|
159
|
+
<path d="m25.7 28.9-14.2-13 14.2-13v26zM9.753 28h-5V3h5z"/>
|
|
160
|
+
</symbol>
|
|
158
161
|
<symbol id="icon-play" viewbox="0 0 32 32">
|
|
159
162
|
<path d="M16 28.5c6.9 0 12.5-5.6 12.5-12.5S22.9 3.5 16 3.5 3.5 9.1 3.5 16 9.1 28.5 16 28.5m0 3C7.4 31.5.5 24.6.5 16S7.4.5 16 .5 31.5 7.4 31.5 16 24.6 31.5 16 31.5"/>
|
|
160
163
|
<path d="M11.7 8.2l11.4 7.7-11.4 7.7z"/>
|
|
161
164
|
</symbol>
|
|
165
|
+
<symbol id="icon-step-forwards" viewbox="0 0 32 32">
|
|
166
|
+
<path d="m4.8 2.9 14.2 13-14.2 13v-26zM20.7 3.1h5v25h-5z"/>
|
|
167
|
+
</symbol>
|
|
162
168
|
<symbol id="icon-forward-60" viewbox="0 0 32 32">
|
|
163
169
|
<path d="M15.4 4.1V1l4.5 4.5-4.5 4.5V7c-5.6.2-10.1 4.9-10.1 10.5 0 5.9 4.8 10.6 10.7 10.6s10.7-4.8 10.7-10.6c0-3.5-1.8-6.8-4.7-8.8l1.6-2.3c3.7 2.5 6 6.7 6 11.2C29.5 25 23.4 31 16 31S2.5 25 2.5 17.5c0-7.2 5.7-13.1 12.9-13.4z"/>
|
|
164
170
|
<path d="M14.2 16.3c-.2-.1-.5-.1-.7-.2l1.4-2.2H13l-2.1 3.4c-.3.4-.4.9-.4 1.4 0 1.4 1.2 2.6 2.7 2.6 1.5 0 2.7-1.2 2.7-2.6 0-1.1-.7-2-1.7-2.4zm-1 3.4c-.6 0-1.1-.5-1.1-1.1 0-.6.5-1.1 1.1-1.1.6 0 1.1.5 1.1 1.1 0 .7-.5 1.1-1.1 1.1zM18.9 13.8c-2.5 0-2.5 2.8-2.5 3.7 0 2.5.9 3.7 2.6 3.7 1.6 0 2.5-1.3 2.5-3.7 0-2.4-.9-3.7-2.6-3.7zm0 1.6c.9 0 .9 1 .9 2.2 0 1.2-.1 2.2-.9 2.2-.9 0-1-1-1-2.2.1-1.3.2-2.2 1-2.2z"/>
|
|
@@ -166,6 +172,17 @@
|
|
|
166
172
|
<symbol id="icon-pause" viewbox="0 0 32 32">
|
|
167
173
|
<path d="M6 3h8v26H6zM18 3h8v26h-8z"/>
|
|
168
174
|
</symbol>
|
|
175
|
+
<symbol id="icon-subtitles" viewbox="0 0 32 32">
|
|
176
|
+
<path d="M27 10v12H5V10h22m3-3H2v18h28V7z"/>
|
|
177
|
+
<path d="M25 19h-4"/>
|
|
178
|
+
<path d="M21 18h4v2h-4z"/>
|
|
179
|
+
<path d="M19 19H7"/>
|
|
180
|
+
<path d="M7 18h12v2H7z"/>
|
|
181
|
+
<path d="M7 15h4"/>
|
|
182
|
+
<path d="M7 14h4v2H7z"/>
|
|
183
|
+
<path d="M13 15h12"/>
|
|
184
|
+
<path d="M13 14h12v2H13z"/>
|
|
185
|
+
</symbol>
|
|
169
186
|
<symbol id="icon-author" viewbox="0 0 32 32">
|
|
170
187
|
<path d="M4 29h24v2H4zM10.3 26H4v-6.3L22.1 1.6l6.3 6.3L10.3 26zM6 24h3.5L25.6 7.9l-3.5-3.5L6 20.5V24z"/>
|
|
171
188
|
<path d="M17.07 6.69l1.414-1.414 6.293 6.293-1.414 1.415z"/>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32" xml:space="preserve"><path d="m25.7 28.9-14.2-13 14.2-13v26zM9.753 28h-5V3h5z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" style="enable-background:new 0 0 32 32" xml:space="preserve"><path d="m4.8 2.9 14.2 13-14.2 13v-26zM20.7 3.1h5v25h-5z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 32 32" width="32" height="32" xml:space="preserve"><path d="M27 10v12H5V10h22m3-3H2v18h28V7z"/><path class="st0" d="M25 19h-4"/><path d="M21 18h4v2h-4z"/><path class="st0" d="M19 19H7"/><path d="M7 18h12v2H7z"/><g><path class="st0" d="M7 15h4"/><path d="M7 14h4v2H7z"/></g><g><path class="st0" d="M13 15h12"/><path d="M13 14h12v2H13z"/></g></svg>
|