@internetstiftelsen/styleguide 2.25.1-beta.0.666 → 2.25.2-beta.0.1
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/molecules/form/Form.js +2 -2
- package/package.json +1 -1
- package/src/app.scss +0 -1
- package/src/atoms/button/_button.scss +0 -18
- package/src/atoms/height-limiter/_height-limiter.scss +0 -10
- package/src/components.js +0 -2
- package/src/configurations/_extends.scss +0 -10
- package/src/configurations/_wordpress.scss +0 -41
- package/src/configurations/typography/_typography.scss +1 -11
- package/src/molecules/card/_card.scss +6 -0
- package/src/molecules/form/Form.js +2 -2
- package/src/molecules/modal/_modal.scss +0 -79
- package/src/molecules/modal/modal.js +0 -2
- package/src/organisms/sections/_sections.scss +1 -1
- package/src/utilities/_margin.scss +1 -1
- package/src/atoms/hr/hr.config.js +0 -42
- package/src/atoms/hr/readme.md +0 -2
- package/src/molecules/modal/modal-graph.js +0 -40
- package/src/molecules/overview-navigation/_overview-navigation.scss +0 -139
- package/src/molecules/overview-navigation/overview-navigation.config.js +0 -0
- package/src/molecules/overview-navigation/overview-navigation.js +0 -68
- package/src/pages/soi-report/soi-report.config.js +0 -0
|
@@ -141,9 +141,9 @@ var Form = function () {
|
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
this.captchaCallback = function () {
|
|
144
|
-
if (typeof window.grecaptcha !== 'undefined' &&
|
|
144
|
+
if (typeof window.grecaptcha !== 'undefined' && process.env.RECAPTCHA_KEY !== undefined) {
|
|
145
145
|
/* global grecaptcha */
|
|
146
|
-
grecaptcha.execute(process.env.
|
|
146
|
+
grecaptcha.execute(process.env.RECAPTCHA_KEY, { action: _this.recaptcha }).then(function (token) {
|
|
147
147
|
_this.token = token;
|
|
148
148
|
});
|
|
149
149
|
}
|
package/package.json
CHANGED
package/src/app.scss
CHANGED
|
@@ -67,7 +67,6 @@ $namespace: '';
|
|
|
67
67
|
@import 'molecules/glider/glider-course';
|
|
68
68
|
@import 'molecules/glider/glider-hero';
|
|
69
69
|
@import 'molecules/continue-video-guide/continue-video-guide';
|
|
70
|
-
@import 'molecules/overview-navigation/overview-navigation';
|
|
71
70
|
|
|
72
71
|
// Organisms
|
|
73
72
|
@import 'organisms/header/header';
|
|
@@ -317,24 +317,6 @@
|
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
@include m(ocean-light) {
|
|
321
|
-
box-shadow: 0 0 0 1px inset $color-ocean;
|
|
322
|
-
color: $color-ocean-light;
|
|
323
|
-
|
|
324
|
-
&:hover,
|
|
325
|
-
&:focus {
|
|
326
|
-
color: $color-ocean;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
@include e(text) {
|
|
330
|
-
color: $color-cyberspace;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
@include e(icon) {
|
|
334
|
-
fill: $color-cyberspace;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
320
|
@include m(jade) {
|
|
339
321
|
color: $color-jade;
|
|
340
322
|
|
|
@@ -20,16 +20,6 @@
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@include m(white) {
|
|
24
|
-
@include e(inner) {
|
|
25
|
-
&.is-limited {
|
|
26
|
-
&::after {
|
|
27
|
-
background-image: linear-gradient(to bottom, rgba($color-snow, 0) 0%, rgba($color-snow, 1) 100%);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
23
|
@include e(btn) {
|
|
34
24
|
display: flex;
|
|
35
25
|
position: relative;
|
package/src/components.js
CHANGED
|
@@ -24,8 +24,6 @@ import './molecules/glider/glider-course';
|
|
|
24
24
|
import './molecules/glider/glider-hero';
|
|
25
25
|
import './molecules/context-menu/context-menu';
|
|
26
26
|
import './molecules/alert/alert';
|
|
27
|
-
import './molecules/modal/modal-graph';
|
|
28
27
|
import './molecules/continue-video-guide/continue-video-guide';
|
|
29
28
|
import './organisms/video-guide/video-guide';
|
|
30
29
|
import './organisms/timeline/timeline';
|
|
31
|
-
import './molecules/overview-navigation/overview-navigation';
|
|
@@ -348,44 +348,3 @@ div.aligncenter {
|
|
|
348
348
|
margin-top: -#{rhythm(3)};
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
|
|
352
|
-
.wp-block-separator {
|
|
353
|
-
display: flex;
|
|
354
|
-
border-color: currentColor;
|
|
355
|
-
|
|
356
|
-
&[class*=align] {
|
|
357
|
-
height: 22px;
|
|
358
|
-
background-color: currentColor;
|
|
359
|
-
--mask:
|
|
360
|
-
radial-gradient(9.18px at 50% calc(100% + 3.15px),#0000 calc(99% - 3px),#000 calc(101% - 3px) 99%,#0000 101%) calc(50% - 14px) calc(50% - 5px + .5px)/28px 10px repeat-x,
|
|
361
|
-
radial-gradient(9.18px at 50% -3.15px,#0000 calc(99% - 3px),#000 calc(101% - 3px) 99%,#0000 101%) 50% calc(50% + 5px)/28px 10px repeat-x;
|
|
362
|
-
-webkit-mask: var(--mask);
|
|
363
|
-
mask: var(--mask);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
&.aligncenter {
|
|
367
|
-
width: 50vw;
|
|
368
|
-
max-width: rem(469px);
|
|
369
|
-
margin-top: rhythm(2);
|
|
370
|
-
margin-bottom: rhythm(2);
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
&.alignleft {
|
|
374
|
-
margin-left: $indent * 2;
|
|
375
|
-
float: none;
|
|
376
|
-
max-width: rem(90px);
|
|
377
|
-
margin-top: rhythm(2);
|
|
378
|
-
margin-bottom: rhythm(2);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
&.alignwide {
|
|
382
|
-
max-width: none;
|
|
383
|
-
width: 100%;
|
|
384
|
-
max-width: 1360px;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
&.alignfull {
|
|
388
|
-
max-width: none;
|
|
389
|
-
width: 100vw;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
@@ -323,9 +323,6 @@ blockquote {
|
|
|
323
323
|
|
|
324
324
|
@include bp-up(sm) {
|
|
325
325
|
padding-right: rhythm(3);
|
|
326
|
-
max-width: rem(613px);
|
|
327
|
-
margin-left: auto;
|
|
328
|
-
margin-right: auto;
|
|
329
326
|
}
|
|
330
327
|
|
|
331
328
|
@include bp-up(md) {
|
|
@@ -334,13 +331,11 @@ blockquote {
|
|
|
334
331
|
|
|
335
332
|
p {
|
|
336
333
|
@include plumber(
|
|
337
|
-
$font-size:
|
|
334
|
+
$font-size: 3,
|
|
338
335
|
$line-height: 4,
|
|
339
336
|
$leading-bottom: 0,
|
|
340
337
|
$leading-top: 1
|
|
341
338
|
);
|
|
342
|
-
|
|
343
|
-
line-height: 32px;
|
|
344
339
|
}
|
|
345
340
|
|
|
346
341
|
.meta {
|
|
@@ -348,11 +343,6 @@ blockquote {
|
|
|
348
343
|
line-height: rhythm(3.5);
|
|
349
344
|
}
|
|
350
345
|
}
|
|
351
|
-
|
|
352
|
-
@include bp-up(lg) {
|
|
353
|
-
margin-left: initial;
|
|
354
|
-
margin-right: initial;
|
|
355
|
-
}
|
|
356
346
|
}
|
|
357
347
|
|
|
358
348
|
b,
|
|
@@ -282,9 +282,9 @@ export default class Form {
|
|
|
282
282
|
};
|
|
283
283
|
|
|
284
284
|
captchaCallback = () => {
|
|
285
|
-
if (typeof window.grecaptcha !== 'undefined' &&
|
|
285
|
+
if (typeof window.grecaptcha !== 'undefined' && process.env.RECAPTCHA_KEY !== undefined) {
|
|
286
286
|
/* global grecaptcha */
|
|
287
|
-
grecaptcha.execute(process.env.
|
|
287
|
+
grecaptcha.execute(process.env.RECAPTCHA_KEY, { action: this.recaptcha })
|
|
288
288
|
.then((token) => {
|
|
289
289
|
this.token = token;
|
|
290
290
|
});
|
|
@@ -64,19 +64,6 @@
|
|
|
64
64
|
@include m(no-max-width) {
|
|
65
65
|
max-width: none;
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
@include m(dynamic-width) {
|
|
69
|
-
width: 100%;
|
|
70
|
-
max-width: calc(100vw);
|
|
71
|
-
min-width: 0;
|
|
72
|
-
max-height: calc(100% - #{rhythm(2)});
|
|
73
|
-
padding: 0;
|
|
74
|
-
overflow: auto;
|
|
75
|
-
|
|
76
|
-
svg {
|
|
77
|
-
pointer-events: none;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
67
|
}
|
|
81
68
|
|
|
82
69
|
@include bp-up(md) {
|
|
@@ -164,72 +151,6 @@
|
|
|
164
151
|
}
|
|
165
152
|
}
|
|
166
153
|
|
|
167
|
-
@include e(graph-button) {
|
|
168
|
-
padding: 0;
|
|
169
|
-
position: relative;
|
|
170
|
-
|
|
171
|
-
&:hover,
|
|
172
|
-
&:focus {
|
|
173
|
-
@extend %input-focus;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
&::after {
|
|
177
|
-
content: attr(data-zoom);
|
|
178
|
-
color: $color-snow;
|
|
179
|
-
padding: rhythm(1) rhythm(2) rhythm(1) rhythm(4);
|
|
180
|
-
display: block;
|
|
181
|
-
position: absolute;
|
|
182
|
-
top: 0;
|
|
183
|
-
left: 0;
|
|
184
|
-
border-top-left-radius: $border-radius;
|
|
185
|
-
border-bottom-right-radius: $border-radius;
|
|
186
|
-
width: auto;
|
|
187
|
-
line-height: 1;
|
|
188
|
-
height: $icon-size-large * 1.4;
|
|
189
|
-
background-color: rgba($color-cyberspace, 0.7);
|
|
190
|
-
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");
|
|
191
|
-
background-position: rhythm(1) center;
|
|
192
|
-
background-size: $icon-size-medium $icon-size-medium;
|
|
193
|
-
background-repeat: no-repeat;
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@include e(button-fixed) {
|
|
199
|
-
position: fixed !important;
|
|
200
|
-
top: rhythm(2) !important;
|
|
201
|
-
right: rhythm(3) !important;
|
|
202
|
-
z-index: z_index(foreground) !important;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
@include e(overlay-button) {
|
|
206
|
-
position: fixed !important;
|
|
207
|
-
color: $color-snow;
|
|
208
|
-
display: flex;
|
|
209
|
-
align-items: center;
|
|
210
|
-
text-align: center;
|
|
211
|
-
justify-content: center;
|
|
212
|
-
padding: 0;
|
|
213
|
-
z-index: z_index(foregroundMinus) !important;
|
|
214
|
-
top: 0 !important;
|
|
215
|
-
right: 0 !important;
|
|
216
|
-
bottom: 0 !important;
|
|
217
|
-
left: 0 !important;
|
|
218
|
-
background: rgba(0, 0, 0, 0.5);
|
|
219
|
-
text-shadow: 0 0 rhythm(0.5) $color-cyberspace;
|
|
220
|
-
font-family: $font-family-headings;
|
|
221
|
-
border: 0;
|
|
222
|
-
width: 100vw;
|
|
223
|
-
|
|
224
|
-
&.is-hidden {
|
|
225
|
-
display: none;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
@include bp-up(xxl) {
|
|
229
|
-
display: none;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
154
|
@include b(field-group) {
|
|
234
155
|
margin-bottom: rhythm(1);
|
|
235
156
|
}
|
|
@@ -332,7 +332,6 @@ function delegate(e) {
|
|
|
332
332
|
|
|
333
333
|
const id = openModal.getAttribute('data-modal-open');
|
|
334
334
|
const modalEl = document.getElementById(id);
|
|
335
|
-
document.querySelector('body').classList.add('prevent-scroll');
|
|
336
335
|
|
|
337
336
|
if (modalEl) {
|
|
338
337
|
open(modalEl, {
|
|
@@ -355,7 +354,6 @@ function delegate(e) {
|
|
|
355
354
|
e.stopPropagation();
|
|
356
355
|
|
|
357
356
|
const id = closeModal.getAttribute('data-modal-close') || (active && active.el.id);
|
|
358
|
-
document.querySelector('body').classList.remove('prevent-scroll');
|
|
359
357
|
|
|
360
358
|
if (active && active.el.id === id) {
|
|
361
359
|
close();
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
status: 'ready',
|
|
3
|
-
|
|
4
|
-
context: {
|
|
5
|
-
color: null,
|
|
6
|
-
modifier: null,
|
|
7
|
-
},
|
|
8
|
-
variants: [
|
|
9
|
-
{
|
|
10
|
-
name: 'alignfull',
|
|
11
|
-
context: {
|
|
12
|
-
class: 'alignfull',
|
|
13
|
-
color: 'color-cyberspace',
|
|
14
|
-
modifier: 'alignfull',
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: 'alignwide',
|
|
19
|
-
context: {
|
|
20
|
-
class: 'alignwide',
|
|
21
|
-
color: 'color-cyberspace',
|
|
22
|
-
modifier: 'alignwide',
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'aligncenter',
|
|
27
|
-
context: {
|
|
28
|
-
class: null,
|
|
29
|
-
color: 'color-cyberspace',
|
|
30
|
-
modifier: 'aligncenter',
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'alignleft',
|
|
35
|
-
context: {
|
|
36
|
-
class: null,
|
|
37
|
-
color: 'has-cyberspace-color',
|
|
38
|
-
modifier: 'alignleft',
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}
|
package/src/atoms/hr/readme.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Close overlay on graph modal
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
const graphModals = document.querySelectorAll('.js-modal-graph');
|
|
6
|
-
const graphModalButtons = document.querySelectorAll('.js-modal-graph-button');
|
|
7
|
-
|
|
8
|
-
const addMultipleListeners = (el, types, listener, options, useCapture) => {
|
|
9
|
-
types.forEach((type) => el.addEventListener(type, listener, options, useCapture));
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
function closeOverlay(graphModalButton) {
|
|
13
|
-
// Close overlay button on 'click' on itself
|
|
14
|
-
graphModalButton.addEventListener('click', () => {
|
|
15
|
-
graphModalButton.classList.add('is-hidden');
|
|
16
|
-
graphModalButton.blur();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
[].forEach.call(graphModals, (graphModal) => {
|
|
20
|
-
const closeButton = graphModal.querySelector('.js-toggle-modal');
|
|
21
|
-
|
|
22
|
-
closeButton.addEventListener('click', () => {
|
|
23
|
-
graphModalButton.classList.remove('is-hidden');
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
// Close overlay button on 'wheel', 'scroll', 'touchstart' on modal container
|
|
27
|
-
addMultipleListeners(
|
|
28
|
-
graphModal,
|
|
29
|
-
['wheel', 'scroll', 'touchstart'],
|
|
30
|
-
() => {
|
|
31
|
-
graphModalButton.classList.add('is-hidden');
|
|
32
|
-
console.log('fire!');
|
|
33
|
-
},
|
|
34
|
-
);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (graphModalButtons && graphModals) {
|
|
39
|
-
[].forEach.call(graphModalButtons, closeOverlay);
|
|
40
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
@charset "UTF-8";
|
|
2
|
-
|
|
3
|
-
@include molecule(overview-navigation) {
|
|
4
|
-
overflow: visible;
|
|
5
|
-
min-width: 300px;
|
|
6
|
-
max-width: 453px;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
border-radius: $border-radius;
|
|
10
|
-
transition: left 0.25s ease-out, top 0.5s ease-out;
|
|
11
|
-
box-shadow: 0 0 0 1px $color-ash;
|
|
12
|
-
|
|
13
|
-
@include e(list) {
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
border-radius: $border-radius;
|
|
16
|
-
background-color: $color-snow;
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
width: 100%;
|
|
20
|
-
max-height: calc(100vh - rem(130px));
|
|
21
|
-
overflow-y: auto;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@include e(title) {
|
|
25
|
-
margin-bottom: rhythm(2);
|
|
26
|
-
}
|
|
27
|
-
@include e(item) {
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
margin-top: rhythm(1);
|
|
31
|
-
margin-bottom: rhythm(1);
|
|
32
|
-
margin-left: 0;
|
|
33
|
-
|
|
34
|
-
&:last-child {
|
|
35
|
-
margin-bottom: rhythm(3);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@include e(item__link) {
|
|
40
|
-
padding: 0 rhythm(2);
|
|
41
|
-
border: none;
|
|
42
|
-
border-radius: 0;
|
|
43
|
-
background-color: initial;
|
|
44
|
-
color: $color-cyberspace;
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
text-decoration: none;
|
|
48
|
-
|
|
49
|
-
&:hover,
|
|
50
|
-
&:focus {
|
|
51
|
-
border: none !important;
|
|
52
|
-
border-radius: 0 !important;
|
|
53
|
-
background-color: inherit !important;
|
|
54
|
-
text-decoration: underline;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
> svg {
|
|
58
|
-
height: $icon-size-small;
|
|
59
|
-
width: $icon-size-small;
|
|
60
|
-
margin-right: rhythm(1);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
@include e(button) {
|
|
65
|
-
display: none;
|
|
66
|
-
padding: 0;
|
|
67
|
-
border: 0;
|
|
68
|
-
transition: left 0.25s ease-out, top 0.25s ease-out;
|
|
69
|
-
background-color: transparent;
|
|
70
|
-
width: rem(60px);
|
|
71
|
-
height: rem(60px);
|
|
72
|
-
flex-shrink: 0;
|
|
73
|
-
flex-grow: 0;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
border-radius: 50%;
|
|
77
|
-
background-color: $color-snow;
|
|
78
|
-
box-shadow: inset 0 0 0 4px currentColor, 0 0 0 1px $color-snow, 0 0 6px rgba($color-cyberspace, 30%);
|
|
79
|
-
|
|
80
|
-
&:hover,
|
|
81
|
-
&:focus {
|
|
82
|
-
transform: scale(1.1);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
> svg {
|
|
87
|
-
width: $icon-size-large;
|
|
88
|
-
height: $icon-size-large;
|
|
89
|
-
flex-shrink: 0;
|
|
90
|
-
opacity: 1;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&::after {
|
|
94
|
-
content: attr(data-title);
|
|
95
|
-
position: absolute;
|
|
96
|
-
bottom: -#{rhythm(3)};
|
|
97
|
-
right: 0;
|
|
98
|
-
text-transform: uppercase;
|
|
99
|
-
text-align: center;
|
|
100
|
-
font-size: $size-small;
|
|
101
|
-
font-family: $font-family-mono;
|
|
102
|
-
text-shadow: 0 1px 0 $color-snow;
|
|
103
|
-
color: $color-cyberspace;
|
|
104
|
-
background-color: $color-snow;
|
|
105
|
-
border-radius: $border-radius;
|
|
106
|
-
padding-left: rhythm(0.5);
|
|
107
|
-
padding-right: rhythm(0.5);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&.is-fixed {
|
|
111
|
-
display: flex;
|
|
112
|
-
top: calc(100vh -#{rhythm(11)}) !important;
|
|
113
|
-
left: calc(100% -#{rhythm(8)}) !important;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&[aria-hidden="true"] {
|
|
118
|
-
box-shadow: none;
|
|
119
|
-
|
|
120
|
-
> dl {
|
|
121
|
-
display: none;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&[aria-hidden="false"] {
|
|
126
|
-
> dl {
|
|
127
|
-
display: block;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&.is-minimized {
|
|
132
|
-
position: fixed;
|
|
133
|
-
right: rhythm(2);
|
|
134
|
-
bottom: rhythm(13);
|
|
135
|
-
z-index: 3;
|
|
136
|
-
margin-top: 0;
|
|
137
|
-
margin-bottom: 0;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
File without changes
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
const overviewNavigations = document.querySelectorAll('.js-overview-navigation');
|
|
2
|
-
const overviewNavigationButton = document.querySelector('.js-overview-navigation-button');
|
|
3
|
-
|
|
4
|
-
function overViewNav(overviewNavigation) {
|
|
5
|
-
overviewNavigationButton.classList.remove('is-fixed');
|
|
6
|
-
overviewNavigation.classList.remove('is-minimized');
|
|
7
|
-
overviewNavigationButton.setAttribute('aria-expanded', 'true');
|
|
8
|
-
|
|
9
|
-
// Timeout until a11y-toggle is initiated
|
|
10
|
-
setTimeout(() => {
|
|
11
|
-
overviewNavigation.setAttribute('aria-hidden', 'false');
|
|
12
|
-
}, '50');
|
|
13
|
-
|
|
14
|
-
const viewportOffset = overviewNavigation.getBoundingClientRect();
|
|
15
|
-
const topBtnPos = overviewNavigationButton.offsetTop;
|
|
16
|
-
const leftPos = viewportOffset.left;
|
|
17
|
-
const topNavPos = viewportOffset.top;
|
|
18
|
-
|
|
19
|
-
window.addEventListener('scroll', () => {
|
|
20
|
-
if (window.innerWidth > 960) {
|
|
21
|
-
if (overviewNavigation.getBoundingClientRect().top < 0) { // Element is at top of screen
|
|
22
|
-
overviewNavigation.setAttribute('aria-hidden', 'true');
|
|
23
|
-
overviewNavigation.classList.add('is-minimized');
|
|
24
|
-
|
|
25
|
-
overviewNavigationButton.style.left = `${leftPos}px`;
|
|
26
|
-
overviewNavigationButton.style.top = `${topBtnPos}px`;
|
|
27
|
-
overviewNavigationButton.style.display = 'flex';
|
|
28
|
-
overviewNavigationButton.style.position = 'fixed';
|
|
29
|
-
|
|
30
|
-
// Timeout to let styles above apply first
|
|
31
|
-
setTimeout(() => {
|
|
32
|
-
overviewNavigationButton.classList.add('is-fixed');
|
|
33
|
-
}, '10');
|
|
34
|
-
} else if (window.scrollY === 0) { // User has scrolled back to top
|
|
35
|
-
overviewNavigationButton.classList.remove('is-fixed');
|
|
36
|
-
overviewNavigationButton.style.left = `${leftPos}px`;
|
|
37
|
-
overviewNavigationButton.style.top = `${topNavPos}px`;
|
|
38
|
-
|
|
39
|
-
// Timeout same length as CSS-transition
|
|
40
|
-
setTimeout(() => {
|
|
41
|
-
overviewNavigationButton.style.display = 'none';
|
|
42
|
-
overviewNavigation.setAttribute('aria-hidden', 'false');
|
|
43
|
-
overviewNavigation.classList.remove('is-minimized');
|
|
44
|
-
}, '250');
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
window.addEventListener('resize', () => {
|
|
50
|
-
if (window.innerWidth < 960) {
|
|
51
|
-
overviewNavigationButton.classList.add('is-fixed');
|
|
52
|
-
overviewNavigation.classList.add('is-minimized');
|
|
53
|
-
overviewNavigationButton.setAttribute('aria-expanded', 'false');
|
|
54
|
-
overviewNavigation.setAttribute('aria-hidden', 'true');
|
|
55
|
-
} else {
|
|
56
|
-
overviewNavigationButton.classList.remove('is-fixed');
|
|
57
|
-
overviewNavigation.classList.remove('is-minimized');
|
|
58
|
-
overviewNavigationButton.setAttribute('aria-expanded', 'true');
|
|
59
|
-
overviewNavigation.setAttribute('aria-hidden', 'false');
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (overviewNavigations) {
|
|
65
|
-
if (window.innerWidth > 960) {
|
|
66
|
-
[].forEach.call(overviewNavigations, overViewNav);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
File without changes
|