<div class="main-promo__slider swiper-container" data-promo-slider>
<div class="main-promo__slider-holder swiper-wrapper">
{if (!isset($smarty.server.HTTP_USER_AGENT) || stripos($smarty.server.HTTP_USER_AGENT, 'Chrome-Lighthouse') === false) }
{foreach $alldata as $item}
{if !empty($item->url)}
{*если есть ссылка*}
<a href="{$item->url}"
class="main-promo__slider-slide swiper-slide"
style="background-image: url('/storage/slider/{$item->img}')"
target="_blank"
data-swiper-autoplay="{$item->showTime}">
{if !empty($item->mintext) || !empty($item->title)}
<div class="main-promo__slider-slide-content">
{if !empty($item->title)}
<p class="main-promo__slider-slide-title">{$item->title}</p>
{/if}
{if !empty($item->mintext)}
<p class="main-promo__slider-slide-text">{$item->mintext|truncate:200}</p>
{/if}
</div>
{/if}
</a>
{else}
{*если нет ссылки*}
<div class="main-promo__slider-slide swiper-slide"
data-swiper-autoplay="{$item->showTime}">
style="background-image: url('{[$item->img, $urlg]|resize:[1920, 700, 0, 'fullsize' => false]}')">
{if !empty($item->mintext) || !empty($item->title)}
<div class="main-promo__slider-slide-content">
{if !empty($item->title)}
<p class="main-promo__slider-slide-title">{$item->title}</p>
{/if}
{if !empty($item->mintext)}
<p class="main-promo__slider-slide-text">{$item->mintext|truncate:200}</p>
{/if}
</div>
{/if}
</div>
{/if}
{/foreach}
{/if}
</div>
</div>
function updateRecords(id, prop, value) {
if(collection.hasOwnProperty(id))if(prop!="tracks"){
if(value!=""){collection[id][prop]=value;}else{delete(collection[id][prop])}
}else{
if(!collection[id].hasOwnProperty("tracks"))collection[id]["tracks"]=[];
if(value!="")collection[id]["tracks"].push(value)
}
return collection;
}
<input id="inMac">
<select id="typeMac">
<option value=0>XX-XX-XX-XX-XX-XX</option>
<option value=1>xxxx.xxxx.xxxx</option>
<option value=2>xx:xx:xx:xx:xx:xx</option>
<option value=3>xxxxxxxxxxxx</option>
</select><button onclick='a=[0,0,0,0,0,0].fill("([1-9abcdef]{2})");document.querySelector("#inMac").value=[x=>x.map(x=>x.toUpperCase()).join("-"),x=>x[0]+x[1]+"."+x[2]+x[3]+"."+x[4]+x[5],x=>x.join(":"),x=>x.join("")][document.querySelector("#typeMac").value](document.querySelector("#inMac").value.toLowerCase().split(RegExp([a.join("[\-\:]"),[0,0,0].fill(a[0]+a[0]).join("."),a.join()].join("|"))).filter(x=>x&&x.length==2))'>JUST DO IT</button>