Fix pages and components animations

- Fix delays
- Add the init back for TitleSite as it needs a delay for the page instance vs. loader
This commit is contained in:
2020-04-04 11:45:26 +02:00
parent 751694605a
commit 94fa63ef41
8 changed files with 51 additions and 47 deletions

View File

@@ -12,30 +12,27 @@ export const animateIn = scope => {
targets: scope.querySelectorAll('.location'),
onShown (el) {
const tl = anime.timeline({
autoplay: false,
duration: 600,
delay: anime.stagger(200),
easing: 'easeOutQuart'
easing: 'easeOutQuart',
duration: 600
})
// Image
tl.add({
targets: scope.querySelector('img'),
targets: el.querySelector('img'),
scale: [1.3, 1],
opacity: [0, 1],
duration: 1800,
delay: 100
})
duration: 1800
}, 100)
// Name
tl.add({
targets: scope.querySelector('h3'),
targets: el.querySelector('h3'),
translateY: ['100%', 0]
}, 300)
// Country
tl.add({
targets: scope.querySelector('p'),
targets: el.querySelector('p'),
translateY: ['100%', 0]
}, 550)
}