aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-03-01 10:47:01 +0100
committerArthurHoaro <arthur@hoa.ro>2015-03-01 11:23:03 +0100
commit34047d23fb5e09b6bc2728f0f8827eaa038f02ea (patch)
treef13db75997d25db1cee52da3bd985259863e165b /index.php
parent7572cfbe9620b13569ee47337f7015bcad119332 (diff)
downloadShaarli-34047d23fb5e09b6bc2728f0f8827eaa038f02ea.tar.gz
Shaarli-34047d23fb5e09b6bc2728f0f8827eaa038f02ea.tar.zst
Shaarli-34047d23fb5e09b6bc2728f0f8827eaa038f02ea.zip
Lazy load images with the light lib bLazy.js instead of jQuery:
* Remove jquery.lazyload lib * Add blazy lib * Add a bit of CSS animation * Delete unused picwall2 template
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/index.php b/index.php
index 99c37652..890eb581 100644
--- a/index.php
+++ b/index.php
@@ -2125,11 +2125,8 @@ function lazyThumbnail($url,$href=false)
2125 2125
2126 $html='<a href="'.htmlspecialchars($t['href']).'">'; 2126 $html='<a href="'.htmlspecialchars($t['href']).'">';
2127 2127
2128 // Lazy image (only loaded by JavaScript when in the viewport). 2128 // Lazy image
2129 if (!empty($GLOBALS['disablejquery'])) // (except if jQuery is disabled) 2129 $html.='<img class="b-lazy" src="#" data-src="'.htmlspecialchars($t['src']).'"';
2130 $html.='<img class="lazyimage" src="'.htmlspecialchars($t['src']).'"';
2131 else
2132 $html.='<img class="lazyimage" src="#" data-original="'.htmlspecialchars($t['src']).'"';
2133 2130
2134 if (!empty($t['width'])) $html.=' width="'.htmlspecialchars($t['width']).'"'; 2131 if (!empty($t['width'])) $html.=' width="'.htmlspecialchars($t['width']).'"';
2135 if (!empty($t['height'])) $html.=' height="'.htmlspecialchars($t['height']).'"'; 2132 if (!empty($t['height'])) $html.=' height="'.htmlspecialchars($t['height']).'"';