-
Notifications
You must be signed in to change notification settings - Fork 136
/
Copy pathlazyload.phtml
executable file
·40 lines (40 loc) · 1.25 KB
/
lazyload.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* Copyright © Magefan ([email protected]). All rights reserved.
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
*
* Glory to Ukraine! Glory to the heroes!
*/
?>
<?php
/**
* Blog post list lazyload template
*
* @var $block \Magefan\Blog\Block\Post\PostList\Toolbar\Pager
*/
?>
<?php
$width = 220;
$height = 150;
?>
<?php if ($block->useLazyload()) { ?>
<?php
$config = $block->getLazyloadConfig([
'trigger_element' => '.mbblog-lazyload-trigger'
]);
?>
<div class="mfblog-autoloader"
data-mage-init='{"<?= /*@noEscape*/ $block->getLazyloadJs() ?>" : <?= /*@noEscape*/ $config ?>}'>
<button class="mbblog-lazyload-trigger mfblog-hide-onload action primary"
title="<?= $block->escapeHtml(__('See more')) ?>"
type="button">
<span><?= $block->escapeHtml(__('See more')) ?></span>
</button>
<img class="posts-loader mfblog-show-onload"
src="<?= $block->escapeUrl($block->getViewFileUrl('images/loader-2.gif')) ?>"
alt="<?= $block->escapeHtml(__('Posts loader')) ?>"
width="<?= $width ?>"
height="<?= $height ?>"
/>
</div>
<?php } ?>