@internetstiftelsen/styleguide 2.22.2 → 2.22.3-beta.0.3
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 +8 -4
- 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 +23 -0
- package/dist/organisms/timeline/timeline.js +154 -0
- package/dist/organisms/video-guide/video-guide.js +298 -0
- package/package.json +7 -3
- package/src/.DS_Store +0 -0
- package/src/app.scss +6 -2
- package/src/assets/.DS_Store +0 -0
- package/src/{atoms/timeline → assets/js}/anchorScroll.js +3 -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 +25 -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/base/_normalize.scss +1 -1
- package/src/base/fonts/_fonts.scss +8 -8
- package/src/components.js +4 -2
- package/src/configurations/_extends.scss +5 -1
- package/src/configurations/_variables.scss +3 -3
- package/src/configurations/grid/_grid.scss +17 -2
- package/src/configurations/icons.json +1 -1
- package/src/configurations/typography/_typography.scss +57 -4
- package/src/molecules/.DS_Store +0 -0
- 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 +104 -0
- package/src/molecules/continue-video-guide/readme.md +3 -0
- package/src/molecules/glider/_glider-course.scss +121 -0
- package/src/molecules/glider/_glider-hero.scss +325 -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 +17 -0
- package/src/molecules/glider/glider.config.js +7 -0
- package/src/organisms/hero/_hero--dynamic-headline.scss +157 -0
- package/src/organisms/hero/_hero.scss +16 -0
- package/src/organisms/hero/hero.config.js +10 -1
- package/src/organisms/timeline/_timeline.scss +292 -0
- package/src/organisms/timeline/timeline.config.js +7 -0
- package/src/organisms/timeline/timeline.js +146 -0
- package/src/organisms/video-guide/_video-guide.scss +337 -0
- package/src/organisms/video-guide/video-guide.config.js +17 -0
- package/src/organisms/video-guide/video-guide.js +293 -0
- package/src/structures/_article.scss +1 -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/atoms/timeline/_timeline.scss +0 -159
- 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/molecules/timeline-navigation/timeline-navigation.config.js +0 -15
- package/src/molecules/timeline-navigation/timeline-navigation.js +0 -32
- package/src/molecules/timeline-navigation/timeline-navigation.scss +0 -165
- package/src/pages/timeline/timeline.config.js +0 -19
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
font-style: normal;
|
|
7
7
|
font-weight: normal;
|
|
8
8
|
src:
|
|
9
|
-
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/
|
|
10
|
-
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/
|
|
9
|
+
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/HKGrotesk-Light.woff2') format('woff2'),
|
|
10
|
+
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/HKGrotesk-Light.woff') format('woff');
|
|
11
11
|
font-display: swap;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
font-style: normal;
|
|
17
17
|
font-weight: normal;
|
|
18
18
|
src:
|
|
19
|
-
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/
|
|
20
|
-
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/
|
|
19
|
+
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/HKGrotesk-Medium.woff2') format('woff2'),
|
|
20
|
+
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/HKGrotesk-Medium.woff') format('woff');
|
|
21
21
|
font-display: swap;
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
font-style: normal;
|
|
27
27
|
font-weight: normal;
|
|
28
28
|
src:
|
|
29
|
-
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/
|
|
30
|
-
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/
|
|
29
|
+
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/HKGrotesk-SemiBold.woff2') format('woff2'),
|
|
30
|
+
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/HKGrotesk-SemiBold.woff') format('woff');
|
|
31
31
|
font-display: swap;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
font-style: normal;
|
|
37
37
|
font-weight: normal;
|
|
38
38
|
src:
|
|
39
|
-
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/
|
|
40
|
-
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/
|
|
39
|
+
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/HKGrotesk-Bold.woff2') format('woff2'),
|
|
40
|
+
url('https://static.internetstiftelsen.se/internetstiftelsen/fonts/HKGrotesk-Bold.woff') format('woff');
|
|
41
41
|
font-display: swap;
|
|
42
42
|
}
|
|
43
43
|
|
package/src/components.js
CHANGED
|
@@ -21,7 +21,9 @@ import './assets/js/responsivePosition';
|
|
|
21
21
|
import './assets/js/youtube';
|
|
22
22
|
import './molecules/glider/glider';
|
|
23
23
|
import './molecules/glider/glider-course';
|
|
24
|
-
import './
|
|
25
|
-
import './molecules/timeline-navigation/timeline-navigation';
|
|
24
|
+
import './molecules/glider/glider-hero';
|
|
26
25
|
import './molecules/context-menu/context-menu';
|
|
27
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';
|
|
@@ -146,13 +146,17 @@
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
&:disabled {
|
|
149
|
-
background-color: $color-
|
|
149
|
+
background-color: $color-concrete !important;
|
|
150
150
|
box-shadow: none;
|
|
151
151
|
cursor: not-allowed;
|
|
152
152
|
|
|
153
153
|
[class*='text'] {
|
|
154
154
|
color: $color-snow !important;
|
|
155
155
|
}
|
|
156
|
+
|
|
157
|
+
svg {
|
|
158
|
+
fill: $color-granit;
|
|
159
|
+
}
|
|
156
160
|
}
|
|
157
161
|
|
|
158
162
|
svg {
|
|
@@ -11,9 +11,9 @@ $font-family-medium: 'HK Grotesk Medium', sans-serif !default;
|
|
|
11
11
|
$font-family-bold: 'HK Grotesk Bold', sans-serif !default;
|
|
12
12
|
$font-family-mono: 'Roboto Mono Regular', monospace !default;
|
|
13
13
|
|
|
14
|
-
$headings-baseline: 0.
|
|
15
|
-
$body-baseline: 0.
|
|
16
|
-
$mono-baseline: 0.
|
|
14
|
+
$headings-baseline: 0.150 !default; // HK Semibold
|
|
15
|
+
$body-baseline: 0.150 !default; // HK Regular
|
|
16
|
+
$mono-baseline: 0.110 !default; // Roboto Mono Regular
|
|
17
17
|
|
|
18
18
|
// Size base
|
|
19
19
|
$size-base: 18px !default;
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
// Set the container width, and override it for fixed navbars in media queries.
|
|
19
19
|
|
|
20
20
|
@if $enable-grid-classes {
|
|
21
|
-
.wrapper
|
|
21
|
+
.wrapper,
|
|
22
|
+
%wrapper {
|
|
22
23
|
@include make-container();
|
|
23
24
|
@include make-container-max-widths();
|
|
24
25
|
|
|
@@ -57,6 +58,12 @@
|
|
|
57
58
|
> [class*='grid-']:nth-child(#{$i}) {
|
|
58
59
|
transform: translateY(rhythm($col-gap));
|
|
59
60
|
}
|
|
61
|
+
|
|
62
|
+
@include bp-only(sm) {
|
|
63
|
+
> [class*='grid-']:last-child {
|
|
64
|
+
transform: translateY(rhythm($gap));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
60
67
|
}
|
|
61
68
|
}
|
|
62
69
|
|
|
@@ -75,7 +82,7 @@
|
|
|
75
82
|
@include make-asymmetric-cols($bp-gap, true);
|
|
76
83
|
}
|
|
77
84
|
|
|
78
|
-
@include bp-up(
|
|
85
|
+
@include bp-up(sm) {
|
|
79
86
|
$bp-gap: $gap * 1.25;
|
|
80
87
|
|
|
81
88
|
margin: rhythm($margin * 1.25) 0 0;
|
|
@@ -89,6 +96,12 @@
|
|
|
89
96
|
}
|
|
90
97
|
}
|
|
91
98
|
|
|
99
|
+
@include bp-up(md) {
|
|
100
|
+
&.asymmetric-reversed {
|
|
101
|
+
margin-bottom: calc(100px);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
92
105
|
@include bp-up(lg) {
|
|
93
106
|
$bp-gap: $gap * 1.5;
|
|
94
107
|
|
|
@@ -100,6 +113,7 @@
|
|
|
100
113
|
|
|
101
114
|
&.asymmetric-reversed {
|
|
102
115
|
@include make-asymmetric-cols($bp-gap, true);
|
|
116
|
+
margin-bottom: calc(180px);
|
|
103
117
|
}
|
|
104
118
|
}
|
|
105
119
|
|
|
@@ -114,6 +128,7 @@
|
|
|
114
128
|
|
|
115
129
|
&.asymmetric-reversed {
|
|
116
130
|
@include make-asymmetric-cols($bp-gap, true);
|
|
131
|
+
margin-bottom: calc(216px);
|
|
117
132
|
}
|
|
118
133
|
}
|
|
119
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":"search","name":"Search"},{"id":"arrow-forwards","name":"Arrow Forwards"},{"id":"arrow-backwards","name":"Arrow Backwards"},{"id":"arrow-down","name":"Arrow Down"},{"id":"arrow-variant","name":"Arrow Variant"},{"id":"hamburger","name":"Hamburger"},{"id":"close","name":"Close"},{"id":"check","name":"Check"},{"id":"quote","name":"Quote"},{"id":"file","name":"File"},{"id":"download","name":"Download"},{"id":"upload","name":"Upload"},{"id":"filter","name":"Filter"},{"id":"read","name":"Read"},{"id":"pin","name":"Pin"},{"id":"user","name":"User"},{"id":"language","name":"Language"},{"id":"linkedin","name":"Linkedin"},{"id":"facebook","name":"Facebook"},{"id":"instagram","name":"Instagram"},{"id":"twitter","name":"Twitter"},{"id":"external-link","name":"External Link"},{"id":"app-share","name":"App Share"},{"id":"print","name":"Print"},{"id":"chapters","name":"Chapters"},{"id":"article","name":"Article"},{"id":"padlock","name":"Padlock"},{"id":"trash","name":"Trash"},{"id":"link","name":"Link"},{"id":"share","name":"Share"},{"id":"questionmark","name":"Questionmark"},{"id":"info","name":"Info"},{"id":"contrast","name":"Contrast"},{"id":"gauge","name":"Gauge"},{"id":"backward-15","name":"Backward 15"},{"id":"play","name":"Play"},{"id":"forward-60","name":"Forward 60"},{"id":"pause","name":"Pause"},{"id":"author","name":"Author"},{"id":"speaker","name":"Speaker"},{"id":"mute","name":"Mute"},{"id":"settings","name":"Settings"},{"id":"lte","name":"Lte"},{"id":"wifi","name":"Wifi"},{"id":"reception","name":"Reception"},{"id":"2g","name":"2g"},{"id":"3g","name":"3g"},{"id":"4g","name":"4g"},{"id":"5g","name":"5g"},{"id":"latency","name":"Latency"},{"id":"spinner","name":"Spinner"},{"id":"spinner-white","name":"Spinner White"},{"id":"3d","name":"3d"},{"id":"accessibility","name":"Accessibility"},{"id":"cafe","name":"Cafe"},{"id":"capacity","name":"Capacity"},{"id":"display","name":"Display"},{"id":"email","name":"Email"},{"id":"headset","name":"Headset"},{"id":"phone","name":"Phone"},{"id":"plus","name":"Plus"},{"id":"podcast","name":"Podcast"},{"id":"richtext-bold","name":"Richtext Bold"},{"id":"richtext-bullet-list","name":"Richtext Bullet List"},{"id":"richtext-italic","name":"Richtext Italic"},{"id":"streaming","name":"Streaming"},{"id":"time","name":"Time"},{"id":"drag-item","name":"Drag Item"},{"id":"personal-data","name":"Personal Data"},{"id":"romance","name":"Romance"},{"id":"shopping","name":"Shopping"},{"id":"warning","name":"Warning"}]
|
|
1
|
+
[{"id":"search","name":"Search"},{"id":"arrow-forwards","name":"Arrow Forwards"},{"id":"arrow-backwards","name":"Arrow Backwards"},{"id":"arrow-down","name":"Arrow Down"},{"id":"arrow-variant","name":"Arrow Variant"},{"id":"hamburger","name":"Hamburger"},{"id":"close","name":"Close"},{"id":"check","name":"Check"},{"id":"quote","name":"Quote"},{"id":"file","name":"File"},{"id":"download","name":"Download"},{"id":"upload","name":"Upload"},{"id":"filter","name":"Filter"},{"id":"read","name":"Read"},{"id":"pin","name":"Pin"},{"id":"user","name":"User"},{"id":"language","name":"Language"},{"id":"linkedin","name":"Linkedin"},{"id":"facebook","name":"Facebook"},{"id":"instagram","name":"Instagram"},{"id":"twitter","name":"Twitter"},{"id":"external-link","name":"External Link"},{"id":"app-share","name":"App Share"},{"id":"print","name":"Print"},{"id":"chapters","name":"Chapters"},{"id":"article","name":"Article"},{"id":"padlock","name":"Padlock"},{"id":"trash","name":"Trash"},{"id":"link","name":"Link"},{"id":"share","name":"Share"},{"id":"questionmark","name":"Questionmark"},{"id":"info","name":"Info"},{"id":"contrast","name":"Contrast"},{"id":"gauge","name":"Gauge"},{"id":"backward-15","name":"Backward 15"},{"id":"step-backwards","name":"Step Backwards"},{"id":"play","name":"Play"},{"id":"step-forwards","name":"Step Forwards"},{"id":"forward-60","name":"Forward 60"},{"id":"pause","name":"Pause"},{"id":"subtitles","name":"Subtitles"},{"id":"author","name":"Author"},{"id":"speaker","name":"Speaker"},{"id":"mute","name":"Mute"},{"id":"settings","name":"Settings"},{"id":"lte","name":"Lte"},{"id":"wifi","name":"Wifi"},{"id":"reception","name":"Reception"},{"id":"2g","name":"2g"},{"id":"3g","name":"3g"},{"id":"4g","name":"4g"},{"id":"5g","name":"5g"},{"id":"latency","name":"Latency"},{"id":"spinner","name":"Spinner"},{"id":"spinner-white","name":"Spinner White"},{"id":"3d","name":"3d"},{"id":"accessibility","name":"Accessibility"},{"id":"cafe","name":"Cafe"},{"id":"capacity","name":"Capacity"},{"id":"display","name":"Display"},{"id":"email","name":"Email"},{"id":"headset","name":"Headset"},{"id":"phone","name":"Phone"},{"id":"plus","name":"Plus"},{"id":"podcast","name":"Podcast"},{"id":"richtext-bold","name":"Richtext Bold"},{"id":"richtext-bullet-list","name":"Richtext Bullet List"},{"id":"richtext-italic","name":"Richtext Italic"},{"id":"streaming","name":"Streaming"},{"id":"time","name":"Time"},{"id":"drag-item","name":"Drag Item"},{"id":"personal-data","name":"Personal Data"},{"id":"romance","name":"Romance"},{"id":"shopping","name":"Shopping"},{"id":"warning","name":"Warning"}]
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
@charset 'UTF-8';
|
|
2
2
|
|
|
3
3
|
h1,
|
|
4
|
-
.alpha
|
|
4
|
+
.alpha,
|
|
5
|
+
%alpha {
|
|
5
6
|
@include plumber(
|
|
6
7
|
$font-size: 3,
|
|
7
8
|
$line-height: 4,
|
|
@@ -22,7 +23,8 @@ h1,
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
h2,
|
|
25
|
-
.beta
|
|
26
|
+
.beta,
|
|
27
|
+
%beta {
|
|
26
28
|
@include plumber(
|
|
27
29
|
$font-size: 2.2,
|
|
28
30
|
$line-height: 3,
|
|
@@ -43,7 +45,8 @@ h2,
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
h3,
|
|
46
|
-
.gamma
|
|
48
|
+
.gamma,
|
|
49
|
+
%gamma {
|
|
47
50
|
@include plumber(
|
|
48
51
|
$font-size: 2.2,
|
|
49
52
|
$line-height: 3,
|
|
@@ -53,7 +56,8 @@ h3,
|
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
h4,
|
|
56
|
-
.delta
|
|
59
|
+
.delta,
|
|
60
|
+
%delta {
|
|
57
61
|
@include plumber(
|
|
58
62
|
$font-size: 2,
|
|
59
63
|
$line-height: 3,
|
|
@@ -168,6 +172,55 @@ small {
|
|
|
168
172
|
}
|
|
169
173
|
}
|
|
170
174
|
|
|
175
|
+
.godzilla {
|
|
176
|
+
@include plumber(
|
|
177
|
+
$leading-top: 0,
|
|
178
|
+
$leading-bottom: 0
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
line-height: 84px;
|
|
182
|
+
font-size: 120px;
|
|
183
|
+
font-family: $font-family-bold;
|
|
184
|
+
letter-spacing: -#{rem(5px)};
|
|
185
|
+
|
|
186
|
+
@include bp-up(sm) {
|
|
187
|
+
line-height: 105px;
|
|
188
|
+
font-size: 150px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@include bp-up(md) {
|
|
192
|
+
line-height: 139px;
|
|
193
|
+
font-size: 200px;
|
|
194
|
+
letter-spacing: -#{rem(10px)};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@include bp-up(lg) {
|
|
198
|
+
line-height: 207px;
|
|
199
|
+
font-size: 295px;
|
|
200
|
+
letter-spacing: -#{rem(20px)};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@include bp-up(xl) {
|
|
204
|
+
line-height: 251px;
|
|
205
|
+
font-size: 360px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Special rule for decade starting with 1
|
|
209
|
+
@include m(19) {
|
|
210
|
+
&::first-letter {
|
|
211
|
+
letter-spacing: -#{rem(20px)};
|
|
212
|
+
|
|
213
|
+
@include bp-up(lg) {
|
|
214
|
+
letter-spacing: -#{rem(40px)};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@include bp-up(xl) {
|
|
218
|
+
letter-spacing: -#{rem(45px)};
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
171
224
|
.preamble,
|
|
172
225
|
%preamble {
|
|
173
226
|
|
|
Binary file
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import className from '../../assets/js/className';
|
|
2
|
+
|
|
3
|
+
class ProgressRing extends HTMLElement {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
const stroke = this.getAttribute('stroke');
|
|
7
|
+
const radius = this.getAttribute('radius');
|
|
8
|
+
const normalizedRadius = radius - stroke * 2;
|
|
9
|
+
this.circumference = normalizedRadius * 2 * Math.PI;
|
|
10
|
+
|
|
11
|
+
this.root = this.attachShadow({ mode: 'open' });
|
|
12
|
+
this.root.innerHTML = `
|
|
13
|
+
<svg
|
|
14
|
+
height="${radius * 2}"
|
|
15
|
+
width="${radius * 2}"
|
|
16
|
+
>
|
|
17
|
+
<circle
|
|
18
|
+
stroke="white"
|
|
19
|
+
stroke-dasharray="${this.circumference} ${this.circumference}"
|
|
20
|
+
style="stroke-dashoffset:${this.circumference}"
|
|
21
|
+
stroke-width="${stroke}"
|
|
22
|
+
fill="transparent"
|
|
23
|
+
r="${normalizedRadius}"
|
|
24
|
+
cx="${radius}"
|
|
25
|
+
cy="${radius}"
|
|
26
|
+
/>
|
|
27
|
+
</svg>
|
|
28
|
+
|
|
29
|
+
<style>
|
|
30
|
+
circle {
|
|
31
|
+
transition: stroke-dashoffset 0.35s;
|
|
32
|
+
transform: rotate(-90deg);
|
|
33
|
+
transform-origin: 50% 50%;
|
|
34
|
+
}
|
|
35
|
+
</style>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
setProgress(percent) {
|
|
40
|
+
const offset = this.circumference - ((percent / 100) * this.circumference);
|
|
41
|
+
const circle = this.root.querySelector('circle');
|
|
42
|
+
circle.style.strokeDashoffset = offset;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static get observedAttributes() {
|
|
46
|
+
return ['progress'];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
50
|
+
if (name === 'progress') {
|
|
51
|
+
this.setProgress(newValue);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
window.customElements.define('progress-ring', ProgressRing);
|
|
57
|
+
|
|
58
|
+
// Get value from sessionStorage if present
|
|
59
|
+
if (sessionStorage.getItem('InmsCurrentTime')) {
|
|
60
|
+
const videoCurrentTime = sessionStorage.getItem('InmsCurrentTime');
|
|
61
|
+
const videoDuration = sessionStorage.getItem('InmsDuration');
|
|
62
|
+
const continueElement = document.querySelector('.js-guide-continue');
|
|
63
|
+
const progressRing = document.querySelector('progress-ring');
|
|
64
|
+
const continueLink = document.querySelector('.js-guide-continue-link');
|
|
65
|
+
const guideURL = sessionStorage.getItem('InmsCurrentGuideURL');
|
|
66
|
+
const guideImage = sessionStorage.getItem('InmsCurrentGuideImage');
|
|
67
|
+
|
|
68
|
+
if ((videoCurrentTime > 0)
|
|
69
|
+
&& progressRing
|
|
70
|
+
&& continueElement
|
|
71
|
+
&& guideImage
|
|
72
|
+
&& continueLink) {
|
|
73
|
+
const alternativeText = continueLink.dataset.altText;
|
|
74
|
+
const currentProgress = videoCurrentTime / videoDuration;
|
|
75
|
+
const currentGuideImage = document.querySelector('.js-guide-continue-image');
|
|
76
|
+
|
|
77
|
+
continueElement.classList.add(className('m-continue-video-guide--has-progress'));
|
|
78
|
+
continueLink.setAttribute('href', guideURL);
|
|
79
|
+
currentGuideImage.src = guideImage;
|
|
80
|
+
continueLink.querySelector('span').innerText = alternativeText;
|
|
81
|
+
// Calculate percentage played
|
|
82
|
+
progressRing.setAttribute('progress', Math.floor(currentProgress * 100));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
@include molecule(continue-video-guide) {
|
|
4
|
+
position: fixed;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
z-index: z_index(middlegroundImportant);
|
|
8
|
+
width: 100px;
|
|
9
|
+
height: calc(100px + 23px + rhythm(1));
|
|
10
|
+
transform: scale(0.7);
|
|
11
|
+
|
|
12
|
+
@include bp-up(md) {
|
|
13
|
+
transform: scale(1);
|
|
14
|
+
bottom: rhythm(2);
|
|
15
|
+
right: rhythm(2);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@include e(inner) {
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include e(progressbar) {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@include e(continue) {
|
|
27
|
+
position: absolute;
|
|
28
|
+
z-index: 3;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
width: 100px;
|
|
33
|
+
height: 100px;
|
|
34
|
+
border-color: $color-snow;
|
|
35
|
+
|
|
36
|
+
&::after {
|
|
37
|
+
content: 'Guidad tur';
|
|
38
|
+
display: block;
|
|
39
|
+
position: absolute;
|
|
40
|
+
left: auto;
|
|
41
|
+
right: auto;
|
|
42
|
+
bottom: 0;
|
|
43
|
+
transform: translateY(calc(100% + rhythm(1)));
|
|
44
|
+
text-align: center;
|
|
45
|
+
background-color: $color-peacock-light;
|
|
46
|
+
font-size: $size-medium;
|
|
47
|
+
font-family: $font-family-headings;
|
|
48
|
+
border-radius: $border-radius;
|
|
49
|
+
color: $color-cyberspace;
|
|
50
|
+
padding: rhythm(0.5) rhythm(1);
|
|
51
|
+
line-height: 1;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@include m(has-progress) {
|
|
56
|
+
@include e(continue) {
|
|
57
|
+
&::after {
|
|
58
|
+
content: 'Fortsätt';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@include e(arrow) {
|
|
62
|
+
width: 0;
|
|
63
|
+
height: 0;
|
|
64
|
+
border-style: solid;
|
|
65
|
+
border-width: 15px 0 15px 20px;
|
|
66
|
+
transition: border-width 0.25s ease-out;
|
|
67
|
+
border-color: transparent transparent transparent inherit;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:hover,
|
|
71
|
+
&:focus {
|
|
72
|
+
> div {
|
|
73
|
+
border-width: 20px 0 20px 30px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@include e(progressbar) {
|
|
79
|
+
display: block;
|
|
80
|
+
position: absolute;
|
|
81
|
+
z-index: 2;
|
|
82
|
+
border-radius: 50%;
|
|
83
|
+
|
|
84
|
+
&::after {
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 6px;
|
|
87
|
+
left: 6px;
|
|
88
|
+
width: 88px;
|
|
89
|
+
height: 88px;
|
|
90
|
+
border-radius: 50%;
|
|
91
|
+
content: '';
|
|
92
|
+
display: block;
|
|
93
|
+
border: 4px solid rgba($color-snow, 0.5);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@include e(image) {
|
|
99
|
+
position: absolute;
|
|
100
|
+
z-index: 1;
|
|
101
|
+
width: 100px;
|
|
102
|
+
height: 100px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
// NOTE: this compnent is dependant on the glider.scss component
|
|
4
|
+
// The Glider components is dependant on JS-classes and is therefore not namespaced
|
|
5
|
+
|
|
6
|
+
.glider-contain-course {
|
|
7
|
+
display: flex;
|
|
8
|
+
position: relative;
|
|
9
|
+
align-items: center;
|
|
10
|
+
margin-top: 0;
|
|
11
|
+
margin-bottom: rhythm(2);
|
|
12
|
+
padding-left: 0;
|
|
13
|
+
padding-right: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.glider-slide {
|
|
17
|
+
@include m(course) {
|
|
18
|
+
margin-left: 0;
|
|
19
|
+
padding-left: 0;
|
|
20
|
+
padding-right: 0;
|
|
21
|
+
|
|
22
|
+
&::after {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@include e(navigation) {
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
|
|
30
|
+
@include bp-up(lg) {
|
|
31
|
+
justify-content: flex-start;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include e(media) {
|
|
36
|
+
|
|
37
|
+
&.zoom {
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
|
|
40
|
+
@include bp-up(lg) {
|
|
41
|
+
pointer-events: auto;
|
|
42
|
+
cursor: zoom-in;
|
|
43
|
+
transition: all 0.15s ease-out;
|
|
44
|
+
position: relative;
|
|
45
|
+
|
|
46
|
+
&::after {
|
|
47
|
+
content: 'Förstora bilden';
|
|
48
|
+
color: $color-snow;
|
|
49
|
+
padding: rhythm(1) rhythm(2) rhythm(1) rhythm(4);
|
|
50
|
+
display: block;
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 0;
|
|
53
|
+
left: 0;
|
|
54
|
+
border-top-left-radius: $border-radius;
|
|
55
|
+
border-bottom-right-radius: $border-radius;
|
|
56
|
+
width: auto;
|
|
57
|
+
line-height: 1;
|
|
58
|
+
height: $icon-size-large * 1.4;
|
|
59
|
+
background-color: rgba($color-cyberspace, 0.8);
|
|
60
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' id='icon-search' viewbox='0 0 32 32' width='32' height='32' fill='%23ffffff'%3E%3Cpath d='M24,21.8l8,8L29.9,32l-8-8c-5.9,4.6-14.3,3.6-19-2.2S-0.7,7.6,5.1,2.9S19.3-0.7,24,5.1C27.9,10,27.9,16.9,24,21.8L24,21.8z M13.4,23.9c5.8,0,10.5-4.7,10.5-10.5S19.2,3,13.4,3S3,7.7,3,13.4S7.7,23.9,13.4,23.9z'/%3E%3C/svg%3E");
|
|
61
|
+
background-position: rhythm(1) center;
|
|
62
|
+
background-size: $icon-size-medium $icon-size-medium;
|
|
63
|
+
background-repeat: no-repeat;
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
img {
|
|
68
|
+
transition: all 0.25s ease-out;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Image zooming
|
|
72
|
+
&.is-zoomed {
|
|
73
|
+
cursor: zoom-out !important;
|
|
74
|
+
position: fixed;
|
|
75
|
+
left: 0;
|
|
76
|
+
right: 0;
|
|
77
|
+
top: 0;
|
|
78
|
+
bottom: 0;
|
|
79
|
+
z-index: z_index(foreground);
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
background-color: rgba($color-cyberspace, 0.8);
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
|
|
86
|
+
&::after {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
img {
|
|
91
|
+
cursor: zoom-out;
|
|
92
|
+
max-width: 100%;
|
|
93
|
+
max-height: 100vh;
|
|
94
|
+
padding: rhythm(1);
|
|
95
|
+
height: auto;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
figcaption {
|
|
99
|
+
max-width: rem(612px);
|
|
100
|
+
text-align: center;
|
|
101
|
+
color: $color-snow;
|
|
102
|
+
padding-left: rhythm(2);
|
|
103
|
+
padding-right: rhythm(2);
|
|
104
|
+
margin-bottom: 0 !important;
|
|
105
|
+
padding-bottom: 0 !important;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
figcaption {
|
|
112
|
+
margin-top: rhythm(1);
|
|
113
|
+
}
|
|
114
|
+
@include bp-up(lg) {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column-reverse;
|
|
117
|
+
margin-top: 0;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|