[10.0.024.dev] lazy loading
This commit is contained in:
parent
a06218bdaf
commit
5cd2d71ea3
@ -399,6 +399,11 @@ $(document).ready(function(){
|
||||
$("#navfixedconnected .navLevel2").css({ 'pointer-events' : 'none' });
|
||||
});
|
||||
|
||||
/**
|
||||
* Chargement paresseux des images et des iframes
|
||||
*/
|
||||
$("img,picture,iframe").attr("loading","lazy");
|
||||
|
||||
/**
|
||||
* Effet accordéon
|
||||
*/
|
||||
|
@ -34,7 +34,7 @@ class common {
|
||||
const TEMP_DIR = 'site/tmp/';
|
||||
|
||||
// Numéro de version
|
||||
const ZWII_VERSION = '10.0.023.dev';
|
||||
const ZWII_VERSION = '10.0.024.dev';
|
||||
|
||||
public static $actions = [];
|
||||
public static $coreModuleIds = [
|
||||
@ -99,8 +99,7 @@ class common {
|
||||
'tippy',
|
||||
'zwiico',
|
||||
'imagemap',
|
||||
'simplelightbox',
|
||||
'lazysimon'
|
||||
'simplelightbox'
|
||||
],
|
||||
'view' => ''
|
||||
];
|
||||
|
3
core/vendor/lazysimon/inc.json
vendored
3
core/vendor/lazysimon/inc.json
vendored
@ -1,3 +0,0 @@
|
||||
[
|
||||
"lazy_simon.min.js"
|
||||
]
|
1
core/vendor/lazysimon/lazy_simon.min.js
vendored
1
core/vendor/lazysimon/lazy_simon.min.js
vendored
@ -1 +0,0 @@
|
||||
for(o=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.src=e.target.dataset.l,t.unobserve(e.target))})}),d=document.querySelectorAll("img"),i=d.length-1;i>=0;i--)e=d[i],e.dataset.l=e.src,e.src="data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22/%3E",o.observe(e);
|
Loading…
Reference in New Issue
Block a user