-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo-cookies.html
66 lines (66 loc) · 2.2 KB
/
demo-cookies.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Move That Bus demo-cookies</title>
<style>
main {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
text-align: center;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
'Helvetica Neue', sans-serif;
}
h2 {
font-size: 1.2rem;
line-height: 1.5;
margin: 0 0 .5rem;
text-transform: uppercase;
}
p {
font-size: 1.6rem;
line-height: 1.5;
margin: .8rem 0;
}
.btn-link {
appearance: none;
-webkit-appearance: none;
text-decoration: underline;
font-size: inherit;
color: blue;
background: none;
border: none;
cursor: pointer;
}
</style>
</head>
<body>
<!-- Initialize the script -->
<main data-movethatbus="{ 'visitorsCookie': 'youShouldMoveThatBus' }">
<h1>Move That Bus demo-cookies</h1>
<h2><a class="btn-link" href="https://github.com/Knogobert/movethatbus.js#readme">Documentation</a></h2>
<p>
This is your content.
</p>
<p>
Canvas element with bus should be displayed in front of this on first time visit IF the "visitorsCookie" is set.
</p>
<p>
<small>(<button class="btn-link"
onclick="
localStorage.removeItem('howManyTimesDidYouMoveThatBus');
localStorage.setItem('youShouldMoveThatBus', true);
window.location.reload(false);
">Set
visitorsCookie, clear clickedCookie and reload</button> if you want to see it again.)</small>
</p>
</main>
<!-- Include the script -->
<script src="lib/movethatbus.js"></script>
</body>
</html>