-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathCookieConsent.astro
42 lines (41 loc) · 1.15 KB
/
CookieConsent.astro
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
---
import Link from "./Link.astro";
---
<div
x-cloak
x-data="{ show: false }"
x-show="show"
x-init="show = !(posthog.has_opted_out_capturing() || posthog.has_opted_in_capturing())"
class="fixed bottom-6 left-6 z-50 print:hidden"
>
<div class="max-w-[225px] bg-soft-gray shadow-lg dark:text-dark">
<p class="content m-0 px-6 py-4 text-[16px]">
We use a single, first-party analytics cookie to focus our limited time
and energy on the most important documentation. Check out our
<Link
href="https://determinate.systems/policies/privacy"
class="underline"
target="_blank"
>
privacy policy
</Link>
.
</p>
<div
class="grid grid-cols-2 divide-x-1.5 divide-light-gray border-t-1.5 border-light-gray"
>
<button
class="py-2.5 font-bold hover:bg-green hover:text-dark"
@click="posthog.opt_in_capturing(); show = false;"
>
Accept
</button>
<button
class="py-2.5 font-bold hover:bg-red hover:text-white"
@click="posthog.opt_out_capturing(); show = false;"
>
Decline
</button>
</div>
</div>
</div>