mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
init
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<picture class="kit-picture">
|
||||
<?
|
||||
$webp = new \Bx\Kit\Image\Webp($_SERVER['DOCUMENT_ROOT'] . $arParams['SRC']);
|
||||
if($webp->convert()->isSuccess()) {
|
||||
$webpSrc = $webp->getRelativePath();
|
||||
?><source class="owl-lazy" data-srcset="<?=$webpSrc?>" type="image/webp"><?
|
||||
}
|
||||
?>
|
||||
<img class="kit-img owl-lazy" data-src="<?=$arParams['SRC']?>" alt="<?=\Bx\Kit\Lib\Type\Str::safeHtmlAttr($arParams['ALT'])?>"<?if($arParams['TITLE']) {?> title="<?=\Bx\Kit\Lib\Type\Str::safeHtmlAttr($arParams['TITLE'])?>"<?}?>
|
||||
<?
|
||||
if($arParams['ATTR']) {
|
||||
echo \Bx\Kit\Template::get('attr', $arParams['ATTR']);
|
||||
}
|
||||
?>
|
||||
/>
|
||||
</picture>
|
||||
Reference in New Issue
Block a user