-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (48 loc) · 1.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width ,initial-scale=1.0">
<script src="./src/assets/js/observer.js"></script>
<title>resume-builder</title>
<script src="https://kit.fontawesome.com/72bd45ff6b.js" crossorigin="anonymous"></script>
<link rel="icon" type="image/jpg" href="./src/assets/img/favicon.jpg">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500" rel="stylesheet">
</head>
<body>
<div id="app"></div>
<script src="/dist/build.js"></script>
</body>
</html>
<script>
document.addEventListener('DOMContentLoaded', () => {
setTimeout(() => {
let appearOnSwipe = new IntersectionObserver((entries, appearOnSwipe) => {
entries.forEach(entry => {
if (!entry.isIntersecting) {
return
} else {
entry.target.classList.add('swipe')
appearOnSwipe.unobserve(entry.target)
}
})
})
document.querySelectorAll('.title h6, .welcome h6, .welcome p').forEach(item => {
appearOnSwipe.observe(item)
})
let appearOnFade = new IntersectionObserver((entries, appearOnFade) => {
entries.forEach(entry => {
if (!entry.isIntersecting) {
return
} else {
entry.target.classList.add('fader')
appearOnFade.unobserve(entry.target)
}
})
})
document.querySelectorAll('.projects .list > div, .welcome .shape').forEach(item => {
appearOnFade.observe(item)
})
})
})
</script>