mirror of
https://git.kh3group.com/georgebiri/khy_website.git
synced 2026-10-16 22:01:47 +00:00
feat: implement lazy loading for product images to enhance performance
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 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:
parent
0a4494bc44
commit
aa1d74f3cb
2 changed files with 59 additions and 3 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue