Photo: Code optimization
All checks were successful
continuous-integration/drone/push Build is passing
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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user