Add cookie concent

This commit is contained in:
2024-03-19 15:59:13 +05:00
parent 5bcd39457d
commit 1f8574e9bb
6 changed files with 81 additions and 10 deletions

View File

@@ -16,6 +16,8 @@
object-fit: cover;
}
.text-underline{text-decoration: underline;}
@media screen and (max-width: 1024px){
.d-none {
display: none;

File diff suppressed because one or more lines are too long

66
public/assets/js/app.js Normal file
View File

@@ -0,0 +1,66 @@
document.addEventListener('DOMContentLoaded', event => {
const phone = document.getElementById('phone');
(phone) ? new Inputmask("+(\\9\\93)-99-99-99-99").mask(phone) : ''
CookieConsent.run({
categories: {
necessary: {
enabled: true, // this category is enabled by default
readOnly: true // this category cannot be disabled
},
analytics: {}
},
guiOptions: {
consentModal: {
layout: 'cloud inline',
position: 'bottom center'
}
},
language: {
default: 'en',
translations: {
en: {
consentModal: {
title: 'We use cookies',
description: "We use cookies to enhance your browsing experience and provide personalized content. By clicking 'Accept All Cookies,' you consent to the use of all cookies on our website. You can also manage your cookie preferences by selecting 'Cookie Settings.' For more information about how we use cookies and your options, please see our Privacy Policy.",
acceptAllBtn: 'Accept all',
acceptNecessaryBtn: 'Reject all',
showPreferencesBtn: 'Manage Individual preferences'
},
preferencesModal: {
title: 'Manage cookie preferences',
acceptAllBtn: 'Accept all',
acceptNecessaryBtn: 'Reject all',
savePreferencesBtn: 'Accept current selection',
closeIconLabel: 'Close modal',
sections: [
{
title: 'Somebody said ... cookies?',
description: 'I want one!'
},
{
title: 'Strictly Necessary cookies',
description: 'These cookies are essential for the proper functioning of the website and cannot be disabled.',
//this field will generate a toggle linked to the 'necessary' category
linkedCategory: 'necessary'
},
{
title: 'Performance and Analytics',
description: 'These cookies collect information about how you use our website. All of the data is anonymized and cannot be used to identify you.',
linkedCategory: 'analytics'
},
{
title: 'More information',
description: 'For any queries in relation to my policy on cookies and your choices, please <a href="#contact-page">contact us</a>'
}
]
}
}
}
}
});
})

File diff suppressed because one or more lines are too long

BIN
public/privacy-policy.pdf Normal file

Binary file not shown.

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="tk" dir="ltr" class="h-full font-sans antialiased">
<html lang="{{ app()->getLocale() }}" dir="ltr" class="h-full font-sans antialiased">
<head>
<meta name="theme-color" content="#fff">
<meta charset="utf-8">
@@ -10,7 +10,7 @@
<!-- Styles -->
<link rel="stylesheet" href="/vendor/nova/app.css?id=496e3383c5e2918c7bc875f45870e701">
<link rel="stylesheet" href="/assets/css/auth.css">
<style>.text-underline{text-decoration: underline;}</style>
<link rel="stylesheet" href="/assets/css/cookieconsent.css">
</head>
<body>
<div>
@@ -47,7 +47,7 @@
@yield('content')
<div class="text-center relative" style="top: 4em;">
<a href="{{ route('reset-password') }}" class="text-gray-500 font-bold text-underline">
<a href="/privacy-policy.pdf" class="text-gray-500 font-bold text-underline" target="_blank">
{{ __('Privacy Policy') }}
</a>
</div>
@@ -56,14 +56,9 @@
</div>
<script src="/assets/js/inputmask.min.js"></script>
<script src="/assets/js/sweetalert2.js"></script>
<script src="/assets/js/cookieconsent.js"></script>
<script src="/assets/js/fn.js"></script>
<script>
const phone = document.getElementById('phone');
if (phone) {
new Inputmask("+(\\9\\93)-99-99-99-99").mask(phone);
}
</script>
<script src="/assets/js/app.js"></script>
@stack('js')
</body>