From f50a8bd71db235557285877db2760f4b6128f72b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20V=C3=B6lkl?= Date: Wed, 23 Nov 2022 16:55:29 +0100 Subject: [PATCH] . --- content/contents/news.blade.php | 1 - content/includes/cookies.blade.php | 253 +++++++++++++++++++++++++++++ content/index.blade.php | 35 +++- content/master.blade.php | 1 + css/main.css | 7 - js/cookies-consent.js | 16 ++ 6 files changed, 301 insertions(+), 12 deletions(-) create mode 100644 content/includes/cookies.blade.php create mode 100644 js/cookies-consent.js diff --git a/content/contents/news.blade.php b/content/contents/news.blade.php index cbb91f7..0825b36 100644 --- a/content/contents/news.blade.php +++ b/content/contents/news.blade.php @@ -40,7 +40,6 @@

- verkaufsstellen.blade.php
diff --git a/content/includes/cookies.blade.php b/content/includes/cookies.blade.php new file mode 100644 index 0000000..7de990c --- /dev/null +++ b/content/includes/cookies.blade.php @@ -0,0 +1,253 @@ + + + \ No newline at end of file diff --git a/content/index.blade.php b/content/index.blade.php index 3195012..013a56c 100644 --- a/content/index.blade.php +++ b/content/index.blade.php @@ -4,14 +4,42 @@ @section('content') + + + +
+
+
+
+
+ +

Biohof Finkenhammer

+

Bäckerei & Hühnerhof

+ +
+
+
+
+
- ... - - @@ -20,7 +48,6 @@
-

Biohof Finkenhammer


diff --git a/content/master.blade.php b/content/master.blade.php index 03205b1..452199d 100644 --- a/content/master.blade.php +++ b/content/master.blade.php @@ -12,6 +12,7 @@ @yield('content') +@include('template.'.config('settings.template').'.content.includes.cookies') @include('template.'.config('settings.template').'.content.includes.footer') @include('template.'.config('settings.template').'.content.includes.scripts') diff --git a/css/main.css b/css/main.css index ca273bd..e506fc5 100644 --- a/css/main.css +++ b/css/main.css @@ -142,13 +142,6 @@ /* line 54, ../sass/_vars.scss */ -a:active, -.alert-warning, -.btn-warning--transition, -.btn-warning--reverse-transition:hover, -.progress .progress-bar--warning { - background-color: #fe6e3a; -} /* line 58, ../sass/_vars.scss */ diff --git a/js/cookies-consent.js b/js/cookies-consent.js new file mode 100644 index 0000000..1a8650f --- /dev/null +++ b/js/cookies-consent.js @@ -0,0 +1,16 @@ +$(window).on('load', function () { + if (Cookies.get('cookies-consent') == undefined) { + $("#cookie-settings").animate({ bottom: '0%' }, 1000); + $('.btn-cookies-consent').click(function (event) { + event.preventDefault(); + let cookiesConsent = $(this).attr('data-cookies'); + if (cookiesConsent != undefined) Cookies.set('cookies-consent', cookiesConsent, { expires: 365 }); + else { + if ($('#functional-cookies').prop('checked') && $('#analytics-cookies').prop('checked') && $('#profile-cookies').prop('checked')) Cookies.set('cookies-consent', 1, { expires: 365 }); + else Cookies.set('cookies-consent', 0, { expires: 365 }); + } + $('#modal-cookie-settings').modal('hide'); + $("#cookie-settings").animate({ bottom: '-100%' }, 1000); + }); + } +});