-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
96 lines (81 loc) · 4.33 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<title>Herzlich Willkommen!</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/tailwind.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet" />
<meta name="theme-color" content="#000" />
</head>
<body x-data="{
show: '',
next() {
const states = ['hugo', 'button', 'milla', 'text', 'family']
let currentIndex = states.findIndex(state => state === this.show)
if (currentIndex === states.length - 1) currentIndex = -1
this.show = states[currentIndex + 1]
}
}" x-init="
setTimeout(() => next(), 5)
setTimeout(() => next(), 5550)
">
<canvas
class="cursor-pointer relative w-screen h-screen bg-gray-300 bg-[url('./images/universe.jpg')] bg-contain bg-center"
id="canvas" @click="next()"></canvas>
<div class="absolute inset-0 z-10 text-white pointer-events-none">
<div class="flex items-center justify-center h-full">
<div x-show="show === 'hugo'" x-transition:enter="transition ease-in-out duration-[2000ms] delay-[3500ms]"
x-transition:enter-start="opacity-100 scale-75 rotate-0"
x-transition:enter-end="opacity-0 scale-0 rotate-[-720deg]">
<img src="./images/hugo.gif" alt="hugo">
</div>
<button x-show="show === 'button'" x-transition:enter="transition ease-out duration-500"
x-transition:enter-start="opacity-0 scale-75" x-transition:enter-end="opacity-100 scale-100">
Klick
</button>
<div x-cloak x-show="show === 'milla'" x-transition:enter="transition ease-out duration-[2500ms]"
x-transition:enter-start="opacity-0 scale-75" x-transition:enter-end="opacity-100 scale-100"
class="m-12">
<img class="p-2 bg-white max-h-[800px]" src="./images/milla.jpg" alt="milla">
<button class="w-full mt-2 text-center">Klick</button>
</div>
<div x-cloak x-show="show === 'text'" x-transition:enter="transition ease-out duration-[2500ms]"
x-transition:enter-start="opacity-0 scale-75" x-transition:enter-end="opacity-100 scale-100"
class="m-8">
<div class="p-2 bg-white aspect-[2/3]">
<div class="flex items-center justify-center h-full p-8 bg-teal-900">
<div>
<h1 class="mb-1 text-2xl font-semibold">Milla Skadi Bär</h1>
<div class="mb-12 font-light">01. Oktober 2022</div>
<div class="max-w-sm text-sm font-light text-right">
<div class="mb-1">
Letzte Nacht, am 01. Oktober um 01:14 Uhr, kam unsere Tochter Milla Skadi friedlich
und
in Windeseile bei uns Zuhause zur Welt.
</div>
<div>
Sie ist 51 cm groß und wiegt 3400 g. Die ganze Familie ist wohlauf und mächtig
stolz.
</div>
</div>
</div>
</div>
</div>
<button class="w-full mt-2 text-center">Klick</button>
</div>
<div x-cloak x-show="show === 'family'" x-transition:enter="transition ease-out duration-[2500ms]"
x-transition:enter-start="opacity-0 scale-75" x-transition:enter-end="opacity-100 scale-100"
class="m-12">
<img class="p-2 bg-white max-h-[800px]" src="./images/family.jpg" alt="family">
<button class="w-full mt-2 text-center">Klick</button>
</div>
</div>
</div>
<script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>
<script type="module" src="/index.js"></script>
<script type="module" src="/sparkle.js"></script>
</body>
</html>