Каталог файловtilda-catalog-1.2.js
4001 imgEl.setAttribute('data-original', imgSrc);4002 imgEl.src = t_catalog_getLazySrc(options, imgSrc);4003 var isSafari16_3 = /Version\/16\.3 Safari/.test(navigator.userAgent);4004 if (isSafari16_3) {4005 imgEl.style.objectFit = 'contain';4006 }4007 } else {4008 imgEl = document.createElement('div');4009 imgEl.classList.add('t-catalog__card__bgimg', 't-catalog__card__bgimg_second');4010 imgEl.classList.add('t-bgimg');4011 imgEl.setAttribute('data-original', imgSrc);
История файла и сравнение версий
imgEl.style.backgroundImage = 'url("' + t_catalog_getLazyUrl(options, imgSrc) + '")';
4015 return imgEl.outerHTML; 4021// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 4022// @ts-expect-error ST-2949_2 4023function t_catalog_get_productCard_mark_html(product, options) { 4024 if (!product.mark) { 4028 stylesStr += options.markColor ? 'color:' + options.markColor + ';' : ''; 4029 stylesStr += options.markBgColor ? 'background-color:' + options.markBgColor + ';' : ''; 4030 var style = stylesStr ? 'style="' + stylesStr + '"' : ''; 4032 str += '<div class="t-catalog__card__mark-wrapper">'; 4033 str += '<div class="t-catalog__card__mark" ' + style + '>'; 4034 str += product.mark; 4040// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 4041// @ts-expect-error ST-2949_2 4042function t_catalog_get_productCard_txtAndPrice_html(product, edition, options, strImg) { 4044 var removePadStyle = strImg === '' ? 'style="padding-top:0px;"' : ''; 4045 str += '<div class="t-catalog__card__textwrapper" ' + removePadStyle + '>'; 4046 str += t_catalog_get_productCard_txt_html(product, edition, options); 4051// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) 4052// @ts-expect-error ST-2949_2 4053function t_catalog_get_productCard_txt_html(product, edition, options) { 4056 if (options.price.position === 'at') { 4057 str += t_catalog_get_productCard_Price_html(product, edition, options); 4059 const alignClass = options.align === 'center' ? 't-catalog__card__text_align_center' : ''; 4062 document.getElementById('allrecords') !== document.querySelector('.t-catalog__product-snippet') && 4063 // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) 4064 // @ts-expect-error ST-2949_3 4065 document.getElementById('allrecords').contains(document.querySelector('.t-catalog__product-snippet')); 4067 if (product.title) { 4068 if (parseInt(options.blocksInRow, 10) === 4) { 4069 typoClass = 't-name_xs'; 4070 } else if (parseInt(options.blocksInRow, 10) === 2) { 4071 typoClass = 't-name_xl'; 4073 typoClass = 't-name_md'; 4075 const fieldId = edition.uid; 4076 const titleFieldAttr = 4077 product.editions.length === 1 && fieldId 4078 ? 'field="st_title__' + fieldId + '" data-redactor-toolbar="no"' 4081 '<div class="js-catalog-prod-name js-product-name t-catalog__card__title t-typography__title t-name ' + 4086 (!options.title_typo && Object.prototype.hasOwnProperty.call(options.typo, 'title') 4087 ? 'style="' + options.typo.title + '"' 4091 str += product.title; 4094 if (options.price.position === 'bt') { 4095 str += t_catalog_get_productCard_Price_html(product, edition, options); 4098 const skuVisCss = options.prodCard.showOpts ? '' : 'display:none;'; 4099 const skuStyle = skuVisCss ? 'style="' + skuVisCss + '"' : ''; 4100 const fieldId = edition.uid;