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,15 @@
|
||||
<?
|
||||
use Wt\Core\Type;
|
||||
?>
|
||||
<picture class="kit-picture <?=$arParams['CLASS']?>">
|
||||
<?
|
||||
$webp = new \Bx\Kit\Image\Webp($_SERVER['DOCUMENT_ROOT'] . $arParams['SRC']);
|
||||
if($webp->convert()->isSuccess()) {
|
||||
$webpSrc = $webp->getRelativePath();
|
||||
?><source srcset="<?=$webpSrc?>" type="image/webp"><?
|
||||
}
|
||||
?>
|
||||
<img src="<?=$arParams['SRC']?>" alt="<?=Type\Str::safeHtmlAttr($arParams['ALT'])?>"<?if($arParams['TITLE']) {?> title="<?=Type\Str::safeHtmlAttr($arParams['TITLE'])?>"<?}?>
|
||||
<?=\Bx\Kit\Node\Lib::getAttrByArray($arParams['ATTR']);?>
|
||||
/>
|
||||
</picture>
|
||||
Reference in New Issue
Block a user