-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
622 lines (502 loc) Β· 34.7 KB
/
index.html
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
<!DOCTYPE html><html lang="fi"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Team HattiWatti</title><meta name="description" content="Team HattiWatti
Auto ÀÀnentoiston rakentelua hyvÀllÀ hengellÀ."><meta name="generator" content="Publii Open-Source CMS for Static Site"><script type="gdpr-blocker/">var _paq = window._paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.nenimein.fi/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '3']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://matomo.nenimein.fi/matomo.js'; s.parentNode.insertBefore(g,s);
})();</script><link rel="canonical" href="https://teamhattiwatti.fi/"><link rel="alternate" type="application/atom+xml" href="https://teamhattiwatti.fi/feed.xml"><link rel="alternate" type="application/json" href="https://teamhattiwatti.fi/feed.json"><link rel="shortcut icon" href="https://teamhattiwatti.fi/media/website/favicon.png" type="image/png"><link rel="preload" href="https://teamhattiwatti.fi/assets/dynamic/fonts/smoochsans/smoochsans.woff2" as="font" type="font/woff2" crossorigin><link rel="stylesheet" href="https://teamhattiwatti.fi/assets/css/style.css?v=f9ad3a471768fb0173571ded706dbde7"><script type="application/ld+json">{"@context":"http://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://teamhattiwatti.fi/"},"headline":"Team HattiWatti","datePublished":"2024-12-25T11:59+02:00","dateModified":"2024-12-26T21:08+02:00","image":{"@type":"ImageObject","url":"https://teamhattiwatti.fi/media/website/logo.svg","height":794,"width":1123},"description":"Team HattiWatti\nAuto ÀÀnentoiston rakentelua hyvÀllÀ hengellÀ.","author":{"@type":"Person","name":"Sami Nieminen","url":"https://teamhattiwatti.fi/authors/sami-nieminen/"},"publisher":{"@type":"Organization","name":"Sami Nieminen","logo":{"@type":"ImageObject","url":"https://teamhattiwatti.fi/media/website/logo.svg","height":794,"width":1123}}}</script><noscript><style>img[loading] {
opacity: 1;
}</style></noscript></head><body class="page-template"><header class="top js-header"><a class="logo" href="https://teamhattiwatti.fi/"><img src="https://teamhattiwatti.fi/media/website/logo.svg" alt="teamhattiwatti.fi" width="1123" height="794"></a><nav class="navbar js-navbar"><button class="navbar__toggle js-toggle" aria-label="Menu" aria-haspopup="true" aria-expanded="false"><span class="navbar__toggle-box"><span class="navbar__toggle-inner">Menu</span></span></button><ul class="navbar__menu"><li class="active"><a href="https://teamhattiwatti.fi/" target="_self">Etusivu</a></li><li><a href="https://teamhattiwatti.fi/team-hattiwatti/autot/" target="_self">Autot</a></li></ul></nav></header><main class="page"><div class="content"><div class="hero"><div class="hero__content"><div class="wrapper"><h1>Team HattiWatti</h1></div></div></div><div class="wrapper content__entry content__entry--nospace"><figure class="post__image post__image--center"><img loading="lazy" src="https://teamhattiwatti.fi/media/posts/1//logo.svg" alt="" width="965" height="682"></figure><h3 class="fancyfont h1 py-3 align-center">Auto ÀÀnentoiston rakentelua hyvÀllÀ hengellÀ.</h3><h4 class="align-center">Menossa mukana</h4><table class="align-center" style="border-collapse: collapse; width: 100%; height: 81.8125px; border-style: hidden;" border="0"><tbody><tr style="height: 81.8125px;"><td style="width: 33.3333%; height: 81.8125px;"><a href="https://www.eikiusita.net/" target="_blank" rel="noopener noreferrer"><figure class="post__image post__image--center"><img loading="lazy" src="https://teamhattiwatti.fi/media/posts/1/ei-kiusita1-2.jpg" alt="" width="300" height="50" sizes="(max-width: 1920px) 100vw, 1920px" srcset="https://teamhattiwatti.fi/media/posts/1/responsive/ei-kiusita1-2-xs.jpg 640w, https://teamhattiwatti.fi/media/posts/1/responsive/ei-kiusita1-2-sm.jpg 768w, https://teamhattiwatti.fi/media/posts/1/responsive/ei-kiusita1-2-md.jpg 1024w, https://teamhattiwatti.fi/media/posts/1/responsive/ei-kiusita1-2-lg.jpg 1366w, https://teamhattiwatti.fi/media/posts/1/responsive/ei-kiusita1-2-xl.jpg 1600w, https://teamhattiwatti.fi/media/posts/1/responsive/ei-kiusita1-2-2xl.jpg 1920w"></figure></a></td><td style="width: 33.3333%; height: 81.8125px;"><a href="https://emmafinland.com/" target="_blank" rel="noopener noreferrer"><figure class="post__image post__image--center"><img loading="lazy" src="https://teamhattiwatti.fi/media/posts/1/emmafinland-3.png" alt="" width="300" height="223" sizes="(max-width: 1920px) 100vw, 1920px" srcset="https://teamhattiwatti.fi/media/posts/1/responsive/emmafinland-3-xs.png 640w, https://teamhattiwatti.fi/media/posts/1/responsive/emmafinland-3-sm.png 768w, https://teamhattiwatti.fi/media/posts/1/responsive/emmafinland-3-md.png 1024w, https://teamhattiwatti.fi/media/posts/1/responsive/emmafinland-3-lg.png 1366w, https://teamhattiwatti.fi/media/posts/1/responsive/emmafinland-3-xl.png 1600w, https://teamhattiwatti.fi/media/posts/1/responsive/emmafinland-3-2xl.png 1920w"></figure></a></td><td style="width: 33.3333%; height: 81.8125px;"><figure class="post__image post__image--center"><img loading="lazy" src="https://teamhattiwatti.fi/media/posts/1/intertaksi.png" alt="" width="300" height="42" sizes="(max-width: 1920px) 100vw, 1920px" srcset="https://teamhattiwatti.fi/media/posts/1/responsive/intertaksi-xs.png 640w, https://teamhattiwatti.fi/media/posts/1/responsive/intertaksi-sm.png 768w, https://teamhattiwatti.fi/media/posts/1/responsive/intertaksi-md.png 1024w, https://teamhattiwatti.fi/media/posts/1/responsive/intertaksi-lg.png 1366w, https://teamhattiwatti.fi/media/posts/1/responsive/intertaksi-xl.png 1600w, https://teamhattiwatti.fi/media/posts/1/responsive/intertaksi-2xl.png 1920w"></figure></td></tr><tr><td style="width: 33.3333%;"><a href="https://www.cartec.fi/" target="_blank" rel="noopener noreferrer" style="border-bottom: 3px solid rgba(var(--yellow), 1);"><figure class="post__image post__image--center"><img loading="lazy" style="outline: 3px solid rgba(var(--color-primary-rgb), 0.55) !important;" src="https://teamhattiwatti.fi/media/posts/1/cartec_logo-2.jpg" alt="" width="300" height="300" sizes="(max-width: 1920px) 100vw, 1920px" srcset="https://teamhattiwatti.fi/media/posts/1/responsive/cartec_logo-2-xs.jpg 640w, https://teamhattiwatti.fi/media/posts/1/responsive/cartec_logo-2-sm.jpg 768w, https://teamhattiwatti.fi/media/posts/1/responsive/cartec_logo-2-md.jpg 1024w, https://teamhattiwatti.fi/media/posts/1/responsive/cartec_logo-2-lg.jpg 1366w, https://teamhattiwatti.fi/media/posts/1/responsive/cartec_logo-2-xl.jpg 1600w, https://teamhattiwatti.fi/media/posts/1/responsive/cartec_logo-2-2xl.jpg 1920w"></figure></a></td><td style="width: 33.3333%;"><a href="https://www.rvs.fi/" target="_blank" rel="noopener noreferrer" style="border-bottom: 3px solid rgba(var(--yellow), 1);"><figure class="post__image post__image--center"><img loading="lazy" style="outline: 3px solid rgba(var(--color-primary-rgb), 0.55) !important;" src="https://teamhattiwatti.fi/media/posts/1/rvs-2.png" alt="" width="300" height="205" sizes="(max-width: 1920px) 100vw, 1920px" srcset="https://teamhattiwatti.fi/media/posts/1/responsive/rvs-2-xs.png 640w, https://teamhattiwatti.fi/media/posts/1/responsive/rvs-2-sm.png 768w, https://teamhattiwatti.fi/media/posts/1/responsive/rvs-2-md.png 1024w, https://teamhattiwatti.fi/media/posts/1/responsive/rvs-2-lg.png 1366w, https://teamhattiwatti.fi/media/posts/1/responsive/rvs-2-xl.png 1600w, https://teamhattiwatti.fi/media/posts/1/responsive/rvs-2-2xl.png 1920w"></figure></a></td><td style="width: 33.3333%;"><a href="https://www.autostudio.fi" target="_blank" rel="noopener noreferrer" style="border-bottom: 3px solid rgba(var(--yellow), 1);"><figure class="post__image post__image--center"><img loading="lazy" style="outline: 3px solid rgba(var(--color-primary-rgb), 0.55) !important;" src="https://teamhattiwatti.fi/media/posts/1/audioforum-2.jpeg" alt="" width="300" height="300" sizes="(max-width: 1920px) 100vw, 1920px" srcset="https://teamhattiwatti.fi/media/posts/1/responsive/audioforum-2-xs.jpeg 640w, https://teamhattiwatti.fi/media/posts/1/responsive/audioforum-2-sm.jpeg 768w, https://teamhattiwatti.fi/media/posts/1/responsive/audioforum-2-md.jpeg 1024w, https://teamhattiwatti.fi/media/posts/1/responsive/audioforum-2-lg.jpeg 1366w, https://teamhattiwatti.fi/media/posts/1/responsive/audioforum-2-xl.jpeg 1600w, https://teamhattiwatti.fi/media/posts/1/responsive/audioforum-2-2xl.jpeg 1920w"></figure></a></td></tr></tbody></table><p> </p></div></div></main><footer class="footer"><div class="wrapper"><div class="footer__copyright"><p>Made by Sami, Powered by Publii</p></div><div class="footer__social"><a href="https://www.facebook.com/Team-Hattiwatti-2268524800092253/" aria-label="Facebook"><svg><use xlink:href="https://teamhattiwatti.fi/assets/svg/svg-map.svg#facebook"/></svg> </a><a href="https://www.instagram.com/team.hattiwatti/" aria-label="Instagram"><svg><use xlink:href="https://teamhattiwatti.fi/assets/svg/svg-map.svg#instagram"/></svg></a></div><button onclick="backToTopFunction()" id="backToTop" class="footer__bttop" aria-label="Back to top" title="Back to top"><svg width="20" height="20"><use xlink:href="https://teamhattiwatti.fi/assets/svg/svg-map.svg#toparrow"/></svg></button></div></footer><script defer="defer" src="https://teamhattiwatti.fi/assets/js/scripts.min.js?v=ffcbea6c02c8178d10092962b235a5b0"></script><script>window.publiiThemeMenuConfig={mobileMenuMode:'overlay',animationSpeed:300,submenuWidth: 'auto',doubleClickTime:500,mobileMenuExpandableSubmenus:false,relatedContainerForOverlayMenuSelector:'.top'};</script><script>var images = document.querySelectorAll('img[loading]');
for (var i = 0; i < images.length; i++) {
if (images[i].complete) {
images[i].classList.add('is-loaded');
} else {
images[i].addEventListener('load', function () {
this.classList.add('is-loaded');
}, false);
}
}</script><div class="pcb" data-behaviour="badge" data-behaviour-link="#cookie-settings" data-revision="1" data-config-ttl="180" data-debug-mode="false"><div role="dialog" aria-modal="true" aria-hidden="true" aria-labelledby="pcb-title" aria-describedby="pcb-txt" class="pcb__banner pcb__banner--bar"><div class="pcb__inner"><div id="pcb-title" role="heading" aria-level="2" class="pcb__title">TΓ€mΓ€ nettisivu kΓ€yttÀÀ keksejΓ€</div><div id="pcb-txt" class="pcb__txt">Salli keksit jolloin nΓ€en montako kΓ€vijÀÀ sivulla on. Jos et tykkÀÀ kekseistΓ€/seurannasta, paina "ΓlΓ€ salli keksejΓ€" nappulaa.</div><div class="pcb__buttons"><button type="button" class="pcb__btn pcb__btn--link pcb__btn--configure" aria-haspopup="dialog">Manage preferences</button> <button type="button" class="pcb__btn pcb__btn--reject">ΓlΓ€ salli keksejΓ€</button> <button type="button" class="pcb__btn pcb__btn--solid pcb__btn--accept">Salli keksit</button></div></div></div><div class="pcb__popup" role="dialog" aria-modal="true" aria-hidden="true" aria-labelledby="pcb-popup-title"><div class="pcb__popup__wrapper"><div class="pcb__inner pcb__popup__inner"><div class="pcb__popup__heading"><div id="pcb-popup-title" role="heading" aria-level="2" class="pcb__title">Cookie settings</div><button class="pcb__popup__close" aria-label="Close"></button></div><div class="pcb__popup__content"><div class="pcb__txt pcb__popup__txt">We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept All", you consent to our use of cookies.</div><ul class="pcb__groups"><li class="pcb__group"><details><summary class="pcb__group__title no-desc">Required</summary></details><div class="pcb__popup__switch is-checked"><input type="checkbox" data-group-name="" id="pcb-group-0" checked="checked"> <label for="pcb-group-0">Required</label></div></li></ul></div><div class="pcb__buttons pcb__popup__buttons"><button type="button" class="pcb__btn pcb__btn--solid pcb__btn--accept">Accept all</button> <button type="button" class="pcb__btn pcb__btn--reject">Reject all</button> <button type="button" class="pcb__btn pcb__btn--save">Save settings</button></div></div></div></div><div class="pcb__overlay" aria-hidden="true"></div><button class="pcb__badge" aria-label="" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" width="40" height="40" viewBox="0 0 23 23" fill="currentColor"><path d="M21.41 12.71c-.08-.01-.15 0-.22 0h-.03c-.03 0-.05 0-.08.01-.07 0-.13.01-.19.04-.52.21-1.44.19-2.02-.22-.44-.31-.65-.83-.62-1.53a.758.758 0 0 0-.27-.61.73.73 0 0 0-.65-.14c-1.98.51-3.49.23-4.26-.78-.82-1.08-.73-2.89.24-4.49.14-.23.14-.52 0-.75a.756.756 0 0 0-.67-.36c-.64.03-1.11-.1-1.31-.35-.19-.26-.13-.71-.01-1.29.04-.18.06-.38.03-.59-.05-.4-.4-.7-.81-.66C5.1 1.54 1 6.04 1 11.48 1 17.28 5.75 22 11.6 22c5.02 0 9.39-3.54 10.39-8.42.08-.4-.18-.78-.58-.87Zm-9.81 7.82c-5.03 0-9.12-4.06-9.12-9.06 0-4.34 3.05-8 7.25-8.86-.08.7.05 1.33.42 1.81.24.32.66.67 1.38.84-.76 1.86-.65 3.78.36 5.11.61.81 2.03 2 4.95 1.51.18.96.71 1.54 1.18 1.87.62.43 1.38.62 2.1.62.05 0 .09 0 .13-.01-1.23 3.64-4.7 6.18-8.64 6.18ZM13 17c0 .55-.45 1-1 1s-1-.45-1-1 .45-1 1-1 1 .45 1 1Zm5.29-12.3a.99.99 0 0 1-.29-.71c0-.55.45-.99 1-.99a1 1 0 0 1 .71.3c.19.19.29.44.29.71 0 .55-.45.99-1 .99a1 1 0 0 1-.71-.3ZM9 13.5c0 .83-.67 1.5-1.5 1.5S6 14.33 6 13.5 6.67 12 7.5 12s1.5.67 1.5 1.5Zm3.25.81a.744.744 0 0 1-.06-1.05c.28-.32.75-.34 1.05-.06.31.28.33.75.05 1.06-.15.16-.35.25-.56.25-.18 0-.36-.06-.5-.19ZM8.68 7.26c.41.37.44 1 .07 1.41-.2.22-.47.33-.75.33a.96.96 0 0 1-.67-.26c-.41-.37-.44-1-.07-1.41.37-.42 1-.45 1.41-.08Zm11.48 1.88c.18-.19.52-.19.7 0 .05.04.09.1.11.16.03.06.04.12.04.19 0 .13-.05.26-.15.35-.09.1-.22.15-.35.15s-.26-.05-.35-.15a.355.355 0 0 1-.11-.16.433.433 0 0 1-.04-.19c0-.13.05-.26.15-.35Zm-4.93-1.86a.75.75 0 1 1 1.059-1.06.75.75 0 0 1-1.059 1.06Z"/></svg></button></div><script>(function(win) {
if (!document.querySelector('.pcb')) {
return;
}
var cbConfig = {
behaviour: document.querySelector('.pcb').getAttribute('data-behaviour'),
behaviourLink: document.querySelector('.pcb').getAttribute('data-behaviour-link'),
revision: document.querySelector('.pcb').getAttribute('data-revision'),
configTTL: parseInt(document.querySelector('.pcb').getAttribute('data-config-ttl'), 10),
debugMode: document.querySelector('.pcb').getAttribute('data-debug-mode') === 'true',
initialState: null,
initialLsState: null,
previouslyAccepted: []
};
var cbUI = {
wrapper: document.querySelector('.pcb'),
banner: {
element: null,
btnAccept: null,
btnReject: null,
btnConfigure: null
},
popup: {
element: null,
btnClose: null,
btnSave: null,
btnAccept: null,
btnReject: null,
checkboxes: null,
},
overlay: null,
badge: null,
blockedScripts: document.querySelectorAll('script[type^="gdpr-blocker/"]'),
triggerLinks: cbConfig.behaviourLink ? document.querySelectorAll('a[href*="' + cbConfig.behaviourLink + '"]') : null
};
function initUI () {
// setup banner elements
cbUI.banner.element = cbUI.wrapper.querySelector('.pcb__banner');
cbUI.banner.btnAccept = cbUI.banner.element.querySelector('.pcb__btn--accept');
cbUI.banner.btnReject = cbUI.banner.element.querySelector('.pcb__btn--reject');
cbUI.banner.btnConfigure = cbUI.banner.element.querySelector('.pcb__btn--configure');
// setup popup elements
if (cbUI.wrapper.querySelector('.pcb__popup')) {
cbUI.popup.element = cbUI.wrapper.querySelector('.pcb__popup');
cbUI.popup.btnClose = cbUI.wrapper.querySelector('.pcb__popup__close');
cbUI.popup.btnSave = cbUI.popup.element.querySelector('.pcb__btn--save');
cbUI.popup.btnAccept = cbUI.popup.element.querySelector('.pcb__btn--accept');
cbUI.popup.btnReject = cbUI.popup.element.querySelector('.pcb__btn--reject');
cbUI.popup.checkboxes = cbUI.popup.element.querySelector('input[type="checkbox"]');
// setup overlay
cbUI.overlay = cbUI.wrapper.querySelector('.pcb__overlay');
}
cbUI.badge = cbUI.wrapper.querySelector('.pcb__badge');
if (cbConfig.behaviour.indexOf('link') > -1) {
for (var i = 0; i < cbUI.triggerLinks.length; i++) {
cbUI.triggerLinks[i].addEventListener('click', function(e) {
e.preventDefault();
showBannerOrPopup();
});
}
}
}
function initState () {
var lsKeyName = getConfigName();
var currentConfig = localStorage.getItem(lsKeyName);
var configIsFresh = checkIfConfigIsFresh();
if (!configIsFresh || currentConfig === null) {
if (cbConfig.debugMode) {
console.log('πͺ Config not found, or configuration expired');
}
if (window.publiiCBGCM) {
gtag('consent', 'default', {
'ad_storage': window.publiiCBGCM.defaultState.ad_storage ? 'granted' : 'denied',
'ad_personalization': window.publiiCBGCM.defaultState.ad_personalization ? 'granted' : 'denied',
'ad_user_data': window.publiiCBGCM.defaultState.ad_user_data ? 'granted' : 'denied',
'analytics_storage': window.publiiCBGCM.defaultState.analytics_storage ? 'granted' : 'denied',
'personalization_storage': window.publiiCBGCM.defaultState.personalization_storage ? 'granted' : 'denied',
'functionality_storage': window.publiiCBGCM.defaultState.functionality_storage ? 'granted' : 'denied',
'security_storage': window.publiiCBGCM.defaultState.security_storage ? 'granted' : 'denied'
});
if (cbConfig.debugMode) {
console.log('πͺ GCMv2 DEFAULT STATE: ' + JSON.stringify({
'ad_storage': window.publiiCBGCM.defaultState.ad_storage ? 'granted' : 'denied',
'ad_personalization': window.publiiCBGCM.defaultState.ad_personalization ? 'granted' : 'denied',
'ad_user_data': window.publiiCBGCM.defaultState.ad_user_data ? 'granted' : 'denied',
'analytics_storage': window.publiiCBGCM.defaultState.analytics_storage ? 'granted' : 'denied',
'personalization_storage': window.publiiCBGCM.defaultState.personalization_storage ? 'granted' : 'denied',
'functionality_storage': window.publiiCBGCM.defaultState.functionality_storage ? 'granted' : 'denied',
'security_storage': window.publiiCBGCM.defaultState.security_storage ? 'granted' : 'denied'
}));
}
}
showBanner();
} else if (typeof currentConfig === 'string') {
if (cbConfig.debugMode) {
console.log('πͺ Config founded');
}
cbConfig.initialLsState = currentConfig.split(',');
if (window.publiiCBGCM) {
gtag('consent', 'default', {
'ad_storage': getDefaultConsentState(currentConfig, 'ad_storage'),
'ad_personalization': getDefaultConsentState(currentConfig, 'ad_personalization'),
'ad_user_data': getDefaultConsentState(currentConfig, 'ad_user_data'),
'analytics_storage': getDefaultConsentState(currentConfig, 'analytics_storage'),
'personalization_storage': getDefaultConsentState(currentConfig, 'personalization_storage'),
'functionality_storage': getDefaultConsentState(currentConfig, 'functionality_storage'),
'security_storage': getDefaultConsentState(currentConfig, 'security_storage')
});
if (cbConfig.debugMode) {
console.log('πͺ GCMv2 DEFAULT STATE: ' + JSON.stringify({
'ad_storage': getDefaultConsentState(currentConfig, 'ad_storage'),
'ad_personalization': getDefaultConsentState(currentConfig, 'ad_personalization'),
'ad_user_data': getDefaultConsentState(currentConfig, 'ad_user_data'),
'analytics_storage': getDefaultConsentState(currentConfig, 'analytics_storage'),
'personalization_storage': getDefaultConsentState(currentConfig, 'personalization_storage'),
'functionality_storage': getDefaultConsentState(currentConfig, 'functionality_storage'),
'security_storage': getDefaultConsentState(currentConfig, 'security_storage')
}));
}
}
showBadge();
if (cbUI.popup.element) {
var allowedGroups = currentConfig.split(',');
var checkedCheckboxes = cbUI.popup.element.querySelectorAll('input[type="checkbox"]:checked');
for (var j = 0; j < checkedCheckboxes.length; j++) {
var name = checkedCheckboxes[j].getAttribute('data-group-name');
if (name && name !== '-' && allowedGroups.indexOf(name) === -1) {
checkedCheckboxes[j].checked = false;
}
}
for (var i = 0; i < allowedGroups.length; i++) {
var checkbox = cbUI.popup.element.querySelector('input[type="checkbox"][data-group-name="' + allowedGroups[i] + '"]');
if (checkbox) {
checkbox.checked = true;
}
allowCookieGroup(allowedGroups[i]);
}
}
}
setTimeout(function () {
cbConfig.initialState = getInitialStateOfConsents();
}, 0);
}
function checkIfConfigIsFresh () {
var lastConfigSave = localStorage.getItem('publii-gdpr-cookies-config-save-date');
if (lastConfigSave === null) {
return false;
}
lastConfigSave = parseInt(lastConfigSave, 10);
if (lastConfigSave === 0) {
return true;
}
if (+new Date() - lastConfigSave < cbConfig.configTTL * 24 * 60 * 60 * 1000) {
return true;
}
return false;
}
function getDefaultConsentState (currentConfig, consentGroup) {
let configGroups = currentConfig.split(',');
for (let i = 0; i < configGroups.length; i++) {
let groupName = configGroups[i];
let group = window.publiiCBGCM.groups.find(group => group.cookieGroup === groupName);
if (group && group[consentGroup]) {
return 'granted';
}
}
if (window.publiiCBGCM.defaultState[consentGroup]) {
return 'granted';
}
return 'denied';
}
function initBannerEvents () {
cbUI.banner.btnAccept.addEventListener('click', function (e) {
e.preventDefault();
acceptAllCookies('banner');
showBadge();
}, false);
if (cbUI.banner.btnReject) {
cbUI.banner.btnReject.addEventListener('click', function (e) {
e.preventDefault();
rejectAllCookies();
showBadge();
}, false);
}
if (cbUI.banner.btnConfigure) {
cbUI.banner.btnConfigure.addEventListener('click', function (e) {
e.preventDefault();
hideBanner();
showAdvancedPopup();
showBadge();
}, false);
}
}
function initPopupEvents () {
if (!cbUI.popup.element) {
return;
}
cbUI.overlay.addEventListener('click', function (e) {
hideAdvancedPopup();
}, false);
cbUI.popup.element.addEventListener('click', function (e) {
e.stopPropagation();
}, false);
cbUI.popup.btnAccept.addEventListener('click', function (e) {
e.preventDefault();
acceptAllCookies('popup');
}, false);
cbUI.popup.btnReject.addEventListener('click', function (e) {
e.preventDefault();
rejectAllCookies();
}, false);
cbUI.popup.btnSave.addEventListener('click', function (e) {
e.preventDefault();
saveConfiguration();
}, false);
cbUI.popup.btnClose.addEventListener('click', function (e) {
e.preventDefault();
hideAdvancedPopup();
}, false);
}
function initBadgeEvents () {
if (!cbUI.badge) {
return;
}
cbUI.badge.addEventListener('click', function (e) {
showBannerOrPopup();
}, false);
}
initUI();
initState();
initBannerEvents();
initPopupEvents();
initBadgeEvents();
/**
* API
*/
function addScript (src, inline) {
var newScript = document.createElement('script');
if (src) {
newScript.setAttribute('src', src);
}
if (inline) {
newScript.text = inline;
}
document.body.appendChild(newScript);
}
function allowCookieGroup (allowedGroup) {
var scripts = document.querySelectorAll('script[type="gdpr-blocker/' + allowedGroup + '"]');
cbConfig.previouslyAccepted.push(allowedGroup);
for (var j = 0; j < scripts.length; j++) {
addScript(scripts[j].src, scripts[j].text);
}
var groupEvent = new Event('publii-cookie-banner-unblock-' + allowedGroup);
document.body.dispatchEvent(groupEvent);
unlockEmbeds(allowedGroup);
if (cbConfig.debugMode) {
console.log('πͺ Allowed group: ' + allowedGroup);
}
if (window.publiiCBGCM && cbConfig.initialLsState.indexOf(allowedGroup) === -1) {
let consentResult = {};
let group = window.publiiCBGCM.groups.find(group => group.cookieGroup === allowedGroup);
if (group) {
let foundSomeConsents = false;
Object.keys(group).forEach(key => {
if (key !== 'cookieGroup' && group[key] === true) {
consentResult[key] = 'granted';
foundSomeConsents = true;
}
});
if (foundSomeConsents) {
gtag('consent', 'update', consentResult);
if (cbConfig.debugMode) {
console.log('πͺ GCMv2 UPDATE: ' + JSON.stringify(consentResult));
}
}
}
}
}
function showBannerOrPopup () {
if (cbUI.popup.element) {
showAdvancedPopup();
} else {
showBanner();
}
}
function showAdvancedPopup () {
cbUI.popup.element.classList.add('is-visible');
cbUI.overlay.classList.add('is-visible');
cbUI.popup.element.setAttribute('aria-hidden', 'false');
cbUI.overlay.setAttribute('aria-hidden', 'false');
}
function hideAdvancedPopup () {
cbUI.popup.element.classList.remove('is-visible');
cbUI.overlay.classList.remove('is-visible');
cbUI.popup.element.setAttribute('aria-hidden', 'true');
cbUI.overlay.setAttribute('aria-hidden', 'true');
}
function showBanner () {
cbUI.banner.element.classList.add('is-visible');
cbUI.banner.element.setAttribute('aria-hidden', 'false');
}
function hideBanner () {
cbUI.banner.element.classList.remove('is-visible');
cbUI.banner.element.setAttribute('aria-hidden', 'true');
}
function showBadge () {
if (!cbUI.badge) {
return;
}
cbUI.badge.classList.add('is-visible');
cbUI.badge.setAttribute('aria-hidden', 'false');
}
function getConfigName () {
var lsKeyName = 'publii-gdpr-allowed-cookies';
if (cbConfig.revision) {
lsKeyName = lsKeyName + '-v' + parseInt(cbConfig.revision, 10);
}
return lsKeyName;
}
function storeConfiguration (allowedGroups) {
var lsKeyName = getConfigName();
var dataToStore = allowedGroups.join(',');
localStorage.setItem(lsKeyName, dataToStore);
if (cbConfig.configTTL === 0) {
localStorage.setItem('publii-gdpr-cookies-config-save-date', 0);
if (cbConfig.debugMode) {
console.log('πͺ Store never expiring configuration');
}
} else {
localStorage.setItem('publii-gdpr-cookies-config-save-date', +new Date());
}
}
function getInitialStateOfConsents () {
if (!cbUI.popup.element) {
return [];
}
var checkedGroups = cbUI.popup.element.querySelectorAll('input[type="checkbox"]:checked');
var groups = [];
for (var i = 0; i < checkedGroups.length; i++) {
var allowedGroup = checkedGroups[i].getAttribute('data-group-name');
if (allowedGroup !== '') {
groups.push(allowedGroup);
}
}
if (cbConfig.debugMode) {
console.log('πͺ Initial state: ' + groups.join(', '));
}
return groups;
}
function getCurrentStateOfConsents () {
if (!cbUI.popup.element) {
return [];
}
var checkedGroups = cbUI.popup.element.querySelectorAll('input[type="checkbox"]:checked');
var groups = [];
for (var i = 0; i < checkedGroups.length; i++) {
var allowedGroup = checkedGroups[i].getAttribute('data-group-name');
if (allowedGroup !== '') {
groups.push(allowedGroup);
}
}
if (cbConfig.debugMode) {
console.log('πͺ State to save: ' + groups.join(', '));
}
return groups;
}
function getAllGroups () {
if (!cbUI.popup.element) {
return [];
}
var checkedGroups = cbUI.popup.element.querySelectorAll('input[type="checkbox"]');
var groups = [];
for (var i = 0; i < checkedGroups.length; i++) {
var allowedGroup = checkedGroups[i].getAttribute('data-group-name');
if (allowedGroup !== '') {
groups.push(allowedGroup);
}
}
return groups;
}
function acceptAllCookies (source) {
var groupsToAccept = getAllGroups();
storeConfiguration(groupsToAccept);
for (var i = 0; i < groupsToAccept.length; i++) {
var group = groupsToAccept[i];
if (cbConfig.initialState.indexOf(group) > -1 || cbConfig.previouslyAccepted.indexOf(group) > -1) {
if (cbConfig.debugMode) {
console.log('πͺ Skip previously activated group: ' + group);
}
continue;
}
allowCookieGroup(group);
}
if (cbUI.popup.element) {
var checkboxesToCheck = cbUI.popup.element.querySelectorAll('input[type="checkbox"]');
for (var j = 0; j < checkboxesToCheck.length; j++) {
checkboxesToCheck[j].checked = true;
}
}
if (cbConfig.debugMode) {
console.log('πͺ Accept all cookies: ', groupsToAccept.join(', '));
}
if (source === 'popup') {
hideAdvancedPopup();
} else if (source === 'banner') {
hideBanner();
}
}
function rejectAllCookies () {
if (cbConfig.debugMode) {
console.log('πͺ Reject all cookies');
}
storeConfiguration([]);
setTimeout(function () {
window.location.reload();
}, 100);
}
function saveConfiguration () {
var groupsToAccept = getCurrentStateOfConsents();
storeConfiguration(groupsToAccept);
if (cbConfig.debugMode) {
console.log('πͺ Save new config: ', groupsToAccept.join(', '));
}
if (reloadIsNeeded(groupsToAccept)) {
setTimeout(function () {
window.location.reload();
}, 100);
return;
}
for (var i = 0; i < groupsToAccept.length; i++) {
var group = groupsToAccept[i];
if (cbConfig.initialState.indexOf(group) > -1 || cbConfig.previouslyAccepted.indexOf(group) > -1) {
if (cbConfig.debugMode) {
console.log('πͺ Skip previously activated group: ' + group);
}
continue;
}
allowCookieGroup(group);
}
hideAdvancedPopup();
}
function reloadIsNeeded (groupsToAccept) {
// check if user rejected consent for initial groups
var initialGroups = cbConfig.initialState;
var previouslyAcceptedGroups = cbConfig.previouslyAccepted;
var groupsToCheck = initialGroups.concat(previouslyAcceptedGroups);
for (var i = 0; i < groupsToCheck.length; i++) {
var groupToCheck = groupsToCheck[i];
if (groupToCheck !== '' && groupsToAccept.indexOf(groupToCheck) === -1) {
if (cbConfig.debugMode) {
console.log('πͺ Reload is needed due lack of: ', groupToCheck);
}
return true;
}
}
return false;
}
function unlockEmbeds (cookieGroup) {
var iframesToUnlock = document.querySelectorAll('.pec-wrapper[data-consent-group-id="' + cookieGroup + '"]');
for (var i = 0; i < iframesToUnlock.length; i++) {
var iframeWrapper = iframesToUnlock[i];
iframeWrapper.querySelector('.pec-overlay').classList.remove('is-active');
iframeWrapper.querySelector('.pec-overlay').setAttribute('aria-hidden', 'true');
var iframe = iframeWrapper.querySelector('iframe');
iframe.setAttribute('src', iframe.getAttribute('data-consent-src'));
}
}
win.publiiEmbedConsentGiven = function (cookieGroup) {
// it will unlock embeds
allowCookieGroup(cookieGroup);
var checkbox = cbUI.popup.element.querySelector('input[type="checkbox"][data-group-name="' + cookieGroup + '"]');
if (checkbox) {
checkbox.checked = true;
}
var groupsToAccept = getCurrentStateOfConsents();
storeConfiguration(groupsToAccept);
if (cbConfig.debugMode) {
console.log('πͺ Save new config: ', groupsToAccept.join(', '));
}
}
})(window);</script></body></html>