diff --git a/assets/responsivelyLazy.min.js b/assets/responsivelyLazy.min.js deleted file mode 100644 index 494b283..0000000 --- a/assets/responsivelyLazy.min.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Responsively Lazy - * http://ivopetkov.com/b/lazy-load-responsive-images/ - * Copyright 2015-2017, Ivo Petkov - * Free to use under the MIT license. -*/ -var responsivelyLazy="undefined"!==typeof responsivelyLazy?responsivelyLazy:function(){var r=!1,t=!1,l=null,p=null,m="undefined"!==typeof IntersectionObserver,q=!1,u=[],v=function(a){if(null===l)return!1;var b=a.getBoundingClientRect();a=b.top;var c=b.left,d=b.width,b=b.height;return ab[1])return 1;if(a[1]===b[1]){if(-1!==b[0].indexOf(".webp",b[0].length-5))return 1;if(-1!==a[0].indexOf(".webp",a[0].length-5))return-1}return 0});c=d}else c=[];else c=[];k=a.offsetWidth*("undefined"!==typeof window.devicePixelRatio?window.devicePixelRatio:1);d=null;h=c.length;for(f=0;f=k){d=e;break}null===d&&(d=[b.getAttribute("src"), -999999]);"undefined"===typeof a.responsivelyLazyLastSetOption&&(a.responsivelyLazyLastSetOption=["",0]);a.responsivelyLazyLastSetOption[1] [ 'bearcms/bearframework-addon', 'bearframework/localization-addon', - 'ivopetkov/client-packages-bearframework-addon' + 'ivopetkov/client-packages-bearframework-addon', + 'ivopetkov/responsively-lazy-bearframework-addon' ] ]); diff --git a/components/embedElement.php b/components/embedElement.php index 8537f68..2be6edc 100644 --- a/components/embedElement.php +++ b/components/embedElement.php @@ -127,14 +127,14 @@ } } } - $containerStyle = 'padding-bottom:' . $paddingBottom . ';'; + $containerStyle = 'position:relative;height:0;padding-bottom:' . $paddingBottom . ';'; } else { if (strlen($height) === 0) { $height = '420px'; } - $containerStyle = 'height:' . $height . ';'; + $containerStyle = 'position:relative;height:' . $height . ';'; } - $content = '
'; + $content = '
'; } else { if ($app->bearCMS->currentUser->exists()) { $content = '
'; @@ -147,7 +147,7 @@ ?> - + diff --git a/composer.json b/composer.json index 5ba227b..bad091a 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "bearcms/bearframework-addon": "1.*", "bearframework/localization-addon": "1.*", "ivopetkov/html5-dom-document-php": "2.*", - "ivopetkov/client-packages-bearframework-addon": "1.*" + "ivopetkov/client-packages-bearframework-addon": "1.*", + "ivopetkov/responsively-lazy-bearframework-addon": "1.*" }, "autoload": { "files": [