Skip to content

Commit

Permalink
Update ResponsivelyLazy library.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivopetkov committed Nov 22, 2021
1 parent 739e80b commit 5b0762c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
15 changes: 0 additions & 15 deletions assets/responsivelyLazy.min.js

This file was deleted.

3 changes: 2 additions & 1 deletion autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'require' => [
'bearcms/bearframework-addon',
'bearframework/localization-addon',
'ivopetkov/client-packages-bearframework-addon'
'ivopetkov/client-packages-bearframework-addon',
'ivopetkov/responsively-lazy-bearframework-addon'
]
]);
8 changes: 4 additions & 4 deletions components/embedElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<div class="bearcms-embed-element responsively-lazy" style="' . $containerStyle . 'font-size:0;line-height:0;" data-lazycontent="' . htmlentities($html) . '"></div>';
$content = '<div class="bearcms-embed-element" style="' . $containerStyle . 'font-size:0;line-height:0;" data-responsively-lazy-type="html" data-responsively-lazy="' . htmlentities($html) . '"></div>';
} else {
if ($app->bearCMS->currentUser->exists()) {
$content = '<div style="background-color:red;color:#fff;padding:10px 15px 9px 15px;border-radius:4px;line-height:25px;font-size:14px;font-family:Arial,sans-serif;">';
Expand All @@ -147,7 +147,7 @@
?><html>

<head>
<link rel="client-packages-embed" name="-bearcms-embed-element-responsively-lazy">
<link rel="client-packages-embed" name="responsivelyLazy">
</head>

<body><?= $content ?></body>
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit 5b0762c

Please sign in to comment.