-
Notifications
You must be signed in to change notification settings - Fork 1
animated svg on homepage #331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 6 commits
548d4c4
e829235
f6cb5af
c5244f7
bd81621
0923909
6495b26
d457cd0
1e24ef9
a38aa8e
1e91ceb
16d25b3
5aa5260
3f509a5
df1b019
3f9da8e
3ffdc34
d74d8bf
e7047e4
fd15d37
e758822
b186ffc
a078f0a
7dbd17f
4b10faf
6195fab
03dadf4
3f96886
d5385b9
1d1c72a
9377aa7
2cd2f85
a1a4b46
42e68d0
b6bc650
e4db1a6
101bdda
3195c42
0fc3005
7001002
02abf68
3f5c123
ebe5e65
9b59d02
84c3bef
14ef40a
dc66503
c64777e
8b8d8bd
bc3aa37
6b9f1ff
cc9fd28
ac02be3
7390ee6
216467e
75c7715
af5a80b
f99105b
fd471d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,3 +113,13 @@ Array.from(document.querySelectorAll('h1.edit input')).forEach(inputh1 => { | |
| () => inputh1.value || h1.classList.remove('active') | ||
| ) | ||
| }) | ||
|
|
||
| /* animation picto sections */ | ||
| Array.from(document.querySelectorAll('.svg-animation')).forEach(svg => { | ||
| window.addEventListener('scroll', function() { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes ! |
||
| if (svg.getBoundingClientRect().top < 600) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe document why
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea I didn't know how to get the moment where the picto start being watched. Maybe |
||
| svg.classList.add('active') | ||
| window.onscroll = null | ||
| } | ||
| }) | ||
| }) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
es6 arrow function for consistency:
…,() => {There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍