Photo: Code optimization
All checks were successful
continuous-integration/drone/push Build is passing

- Avoid double declaration of sources
- Use class over an HTML tag for image reveal animation
This commit is contained in:
2020-03-31 17:55:32 +02:00
parent fc74a93508
commit 88186f479c
4 changed files with 43 additions and 49 deletions

View File

@@ -28,7 +28,7 @@ export const animateIn = scope => {
// Photo appearing
const photoReveal = ScrollOut({
once: true,
targets: scope.querySelector('picture'),
targets: scope.querySelector('.photo__image'),
onShown (el) {
// Load the photo then reveal it
imagesLoaded(el, instance => {