feat: implement lazy loading for product images to enhance performance

- Added CSS styles for lazy loading images, improving initial load times and user experience.
- Updated ProductManager class to initialize lazy loading functionality, utilizing Intersection Observer for efficient image loading as they come into view.
- Modified image elements in product catalog to support lazy loading with appropriate data attributes.
This commit is contained in:
George Birikorang 2025-09-19 09:54:06 -07:00
parent 0a4494bc44
commit aa1d74f3cb
2 changed files with 59 additions and 3 deletions

View file

@ -15,6 +15,16 @@
display: flex !important;
}
}
/* Lazy loading styles */
.lazy-load {
opacity: 0.7;
transition: opacity 0.3s ease-in-out;
}
.lazy-load.loaded {
opacity: 1;
}
</style>
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:wght@100;200;300;400;500;600;700&family=Poppins:wght@400;500;600&display=swap"