Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit af1df27

Browse files
committed
Finishing improving animation 🚀
1 parent 078a629 commit af1df27

File tree

6 files changed

+28
-18
lines changed

6 files changed

+28
-18
lines changed

_includes/critical.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_includes/dependencies-blog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
</script>
1717
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_SVG"></script>
1818
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
19-
<script type="text/javascript" src="/assets/js/index.blog.min.js?rev=88e5014643486fc0bae94c82bdf081e6"></script>
19+
<script type="text/javascript" src="/assets/js/index.blog.min.js?rev=c323aa96de6441210c450dec7dfcd86d"></script>
2020
{%include service-worker.html %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"/assets/js/index.blog.min.js?rev=88e5014643486fc0bae94c82bdf081e6",
1+
"/assets/js/index.blog.min.js?rev=c323aa96de6441210c450dec7dfcd86d",

_js/blog/blog-animation.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
/* @flow */
2-
import { TimelineMax } from 'gsap'
2+
import { TweenLite } from 'gsap'
33
import { enableScroll } from '../common/scroll-manager'
4+
import { addCssClass } from '../common/css-class'
45

56
const blogAnimation = (): void => {
6-
const showBlogTimeline: TimelineMax = new TimelineMax({ delay: 0.2 })
7-
showBlogTimeline.to('#loader', 0.2, { opacity: 0 })
8-
showBlogTimeline.to('#loading-screen', 0.4, {
9-
xPercent: -100,
10-
onComplete: enableScroll
11-
}, '+=0.4')
7+
TweenLite.to('#loading-screen', 0.3, {
8+
opacity: 0,
9+
onComplete: onCompleteAnimation,
10+
delay: 0.5
11+
})
12+
}
13+
14+
const onCompleteAnimation = () => {
15+
addCssClass(document.getElementById('loading-screen'), 'd-none')
16+
enableScroll()
1217
}
1318

1419
export { blogAnimation }

_jsbuild/blog/blog-animation.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
/* */
2-
import { TimelineMax } from 'gsap'
2+
import { TweenLite } from 'gsap'
33
import { enableScroll } from '../common/scroll-manager'
4+
import { addCssClass } from '../common/css-class'
45

56
const blogAnimation = () => {
6-
const showBlogTimeline = new TimelineMax({ delay: 0.2 })
7-
showBlogTimeline.to('#loader', 0.2, { opacity: 0 })
8-
showBlogTimeline.to('#loading-screen', 0.4, {
9-
xPercent: -100,
10-
onComplete: enableScroll
11-
}, '+=0.4')
7+
TweenLite.to('#loading-screen', 0.3, {
8+
opacity: 0,
9+
onComplete: onCompleteAnimation,
10+
delay: 0.5
11+
})
12+
}
13+
14+
const onCompleteAnimation = () => {
15+
addCssClass(document.getElementById('loading-screen'), 'd-none')
16+
enableScroll()
1217
}
1318

1419
export { blogAnimation }

assets/js/index.blog.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)