@@ -280,6 +280,46 @@ <h2 class="text-4xl font-bold mb-4 rounded-lg py-2">Let's Build Something Togeth
280
280
< p > © 2025 < a href ="https://www.ethicalabs.ai/ "> ethicalabs.ai</ a > . All rights reserved.</ p >
281
281
</ footer >
282
282
283
+ <!-- Cookie Notice Banner -->
284
+ < div id ="cookie-banner " class ="fixed bottom-0 left-0 right-0 bg-gray-800 text-white p-4 text-center md:flex md:items-center md:justify-between shadow-lg z-50 ">
285
+ < div class ="container mx-auto flex flex-col md:flex-row items-center justify-between space-y-3 md:space-y-0 md:space-x-4 ">
286
+ < p class ="text-sm md:text-base text-gray-300 ">
287
+ We use a cookie to remember your preference when you click 'Accept'. Our website doesn't track any personal data.
288
+ </ p >
289
+ < div class ="flex-shrink-0 ">
290
+ < button id ="accept-cookies " class ="px-5 py-2 rounded-lg bg-indigo-600 hover:bg-indigo-700 text-white font-medium transition-colors duration-200 ">
291
+ Accept
292
+ </ button >
293
+ </ div >
294
+ </ div >
295
+ </ div >
296
+ < script >
297
+ const cookieBanner = document . getElementById ( 'cookie-banner' ) ;
298
+ const acceptButton = document . getElementById ( 'accept-cookies' ) ;
299
+
300
+ // Function to check for the cookie
301
+ function hasAcceptedCookies ( ) {
302
+ return document . cookie . split ( ';' ) . some ( ( item ) => item . trim ( ) . startsWith ( 'cookie_consent=true' ) ) ;
303
+ }
304
+
305
+ // Function to set the cookie
306
+ function setCookieConsent ( ) {
307
+ const d = new Date ( ) ;
308
+ d . setTime ( d . getTime ( ) + ( 365 * 24 * 60 * 60 * 1000 ) ) ; // 1 year expiry
309
+ let expires = "expires=" + d . toUTCString ( ) ;
310
+ document . cookie = "cookie_consent=true;" + expires + ";path=/;SameSite=Lax" ;
311
+ cookieBanner . style . display = 'none' ;
312
+ }
313
+
314
+ // Hide banner if cookie is already set
315
+ if ( hasAcceptedCookies ( ) ) {
316
+ cookieBanner . style . display = 'none' ;
317
+ }
318
+
319
+ // Event listener for the accept button
320
+ acceptButton . addEventListener ( 'click' , setCookieConsent ) ;
321
+ </ script >
322
+
283
323
< script >
284
324
const mobileMenuButton = document . getElementById ( 'mobile-menu-button' ) ;
285
325
const mobileMenu = document . getElementById ( 'mobile-menu' ) ;
0 commit comments