-
Notifications
You must be signed in to change notification settings - Fork 0
/
balkscript.js
41 lines (39 loc) · 1.54 KB
/
balkscript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
document.addEventListener('DOMContentLoaded', function() {
const savedPosition = localStorage.getItem('balkPositie');
if (savedPosition) {
const blocks = document.querySelector('.blocks');
blocks.style.position = 'fixed';
switch (savedPosition) {
case 'top':
blocks.style.top = '0';
blocks.style.bottom = 'auto';
blocks.style.left = '0';
blocks.style.right = '0';
blocks.style.width = '100%';
break;
case 'bottom':
blocks.style.bottom = '0';
blocks.style.top = 'auto';
blocks.style.left = '0';
blocks.style.right = '0';
blocks.style.width = '100%';
break;
case 'left':
blocks.style.left = '0';
blocks.style.right = 'auto';
blocks.style.top = '0';
blocks.style.bottom = '0';
blocks.style.height = '100%';
break;
case 'right':
blocks.style.right = '0';
blocks.style.left = 'auto';
blocks.style.top = '0';
blocks.style.bottom = '0';
blocks.style.height = '100%';
break;
}
// Voeg deze regel toe om de backdrop-filter op het juiste element toe te passen
document.body.style.backdropFilter = 'blur(10px)';
}
});