Skip to content

Commit 6365327

Browse files
committed
Adding Cookie Declaration
1 parent 6a1d7c4 commit 6365327

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

resources/views/static/cookie.blade.php

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,31 @@
55
<section id="codeweek-privacy-page" class="codeweek-page">
66
<section class="codeweek-content-wrapper cookies" style="margin-top: 0;">
77
<h1 style="margin-bottom:10px;">@lang('cookie_policy.title')</h1>
8-
<!-- Cookie Declaration Script -->
9-
<script id="CookieDeclaration"
10-
src="https://consent.cookiebot.com/719385d2-f5d2-4806-8352-72e5ebe53996/cd.js"
11-
type="text/javascript"
12-
async>
13-
</script>
8+
9+
<!-- Cookie Declaration Container -->
10+
<div id="cookie-declaration-container"></div>
11+
1412
</section>
1513
</section>
1614

1715
@endsection
1816

17+
@push('scripts')
18+
<script>
19+
// Wait for the DOM to fully load
20+
document.addEventListener('DOMContentLoaded', function () {
21+
// Select the target container
22+
const container = document.getElementById('cookie-declaration-container');
23+
24+
// Create the script element
25+
const script = document.createElement('script');
26+
script.id = 'CookieDeclaration';
27+
script.src = 'https://consent.cookiebot.com/719385d2-f5d2-4806-8352-72e5ebe53996/cd.js';
28+
script.type = 'text/javascript';
29+
script.async = true;
30+
31+
// Append the script to the target container
32+
container.appendChild(script);
33+
});
34+
</script>
35+
@endpush

0 commit comments

Comments
 (0)