-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
52 lines (47 loc) · 1.67 KB
/
index.html
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
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>🍪 Leckerli</title>
<script type="module" crossorigin src="./dist/assets/leckerli.min.js"></script>
<link rel="stylesheet" href="./dist/assets/leckerli.min.css" />
</head>
<body style="background: #cbd5e1; display: grid; place-content: center; font-family: sans-serif; min-height: 100vh;">
<h1>Your website here 🤗</h1>
<script defer type="module" src="/src/index.tsx"></script>
<script>
// To listen the initialisation
document.addEventListener('leckerli:initialised', (event) => {
// to get cookie data OR null if the user's choice has not been made
console.log('init', event.detail.cookie);
});
// To listen to the permissions / cookie's updates
document.addEventListener('leckerli:permissions-updated', (event) => {
// to get cookie data
console.log('update', event.detail.cookie);
});
// To listen the modal states
document.addEventListener('leckerli:modal-opened', () => {
// react to modal opened
console.log('modal opened')
});
document.addEventListener('leckerli:modal-closed', () => {
// react to modal closed
console.log('modal closed')
});
</script>
<style>
/*
:root {
--leckerli-foreground: #fff;
--leckerli-background: #000;
--leckerli-primary: #ff0099;
--leckerli-primary-hover: #d1007e;
--leckerli-primary-active: #9D005F;
--leckerli-font: sans-serif;
}
*/
</style>
</body>
</html>