-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
58 lines (58 loc) · 1.58 KB
/
test.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="robots" content="noindex" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./src/reset.css" />
<title>Parent</title>
<script src="https://unpkg.com/@funtech-inc/handshake@latest"></script>
</head>
<body>
<div
style="
height: 400vh;
font-size: 10vh;
display: flex;
flex-direction: column;
justify-content: space-between;
mix-blend-mode: difference;
color: white;
">
<p>parent</p>
<p>parent</p>
<p>parent</p>
<p>parent</p>
<p>parent</p>
<p>parent</p>
<p>parent</p>
<p>parent</p>
<p>parent</p>
<p>parent</p>
</div>
<div
id="container"
style="
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
z-index: -1;
"></div>
<script>
new Handshake.Parent({
container: "container",
url: "https://custom-code-component.vercel.app",
}).ready(({ emit }) => {
const handleScroll = () =>
emit(
"scroll",
scrollY /
(document.documentElement.scrollHeight - innerHeight)
);
handleScroll();
window.addEventListener("scroll", handleScroll);
});
</script>
</body>
</html>