1201str += '' + t_feed_drawDateAndParts(opts, post, 'onimage', 'col', recid);1202}1203var bgFieldAttr = post.uid ? 'bgimgfield="fe_img__' + post.uid + '"' : '';1204str += `<div1205class="t-feed__post-bgimg t-bgimg"1206data-original="${imageUrl}"1207${bgFieldAttr}1208${alt}1209style="background-image:url(${t_feed_getLazyUrl(opts, imageUrl)});"1210>${post.thumb ? `<meta itemprop="image" content="${imageUrl}"></meta>` : ''}${post.thumbalt ? `<meta itemprop="caption" content="${altText}"></meta>` : ''}</div>1211</div>`;
} return str;}function t_feed_drawImage(opts, post, position, recid, isBgModification) { var borderRadiusStyle; var aspectRatioStyle = 'aspect-ratio: ' + (opts.imageRatio ? 100 / opts.imageRatio : 100 / 66).toFixed(1) + ';'; if (isBgModification && opts.colWithBg.borderRadius) { if (position == 'afterdescr') { borderRadiusStyle = 'border-radius: 0 0 ' + opts.colWithBg.borderRadius + ' ' + opts.colWithBg.borderRadius + ';'; } else { borderRadiusStyle = 'border-radius:' + opts.colWithBg.borderRadius + ' ' + opts.colWithBg.borderRadius + ' 0 0;'; } } else { borderRadiusStyle = ''; } var imageStyle = 'style="' + aspectRatioStyle + borderRadiusStyle + '"'; var mobileClass = opts.isHorizOnMob && opts.hasOriginalAspectRatio ? 't-feed__post-imgwrapper_mobile-nopadding' : ''; var str = ''; if ((post.thumb !== '' || post.image !== '' || post.mediatype === 'video') && opts.showImage) { var imageUrl = post.thumb ? post.thumb : post.image; var altText = ''; if (post.thumb !== '' && post.thumbalt !== '') { altText = post.thumbalt; } else if (post.thumb === '' && post.image !== '' && post.imagealt !== '') { altText = post.imagealt; } var altAria = altText ? `role="img" aria-label="${altText}"` : ''; if (post.mediatype === 'video' && post.image === '' && post.thumb === '') { imageUrl = 'https://static.tildacdn.' + t_feed__getRootZone() + '/ffb6456b-781b-40e8-9517-ffb5225e8bcd/imgfish.jpg'; } str += '<div class="t-feed__post-imgwrapper t-feed__post-imgwrapper_' + position + ' ' + mobileClass + '" ' + imageStyle + '>'; if ((opts.showDate && opts.datePos == 'onimage') || (opts.showParts && opts.partsPos == 'onimage')) { str += '' + t_feed_drawDateAndParts(opts, post, 'onimage', 'col', recid); } if (opts.hasOriginalAspectRatio) { var imgFieldAttr = post.uid ? 'imgfield="fe_img__' + post.uid + '"' : ''; str += '<img ' + t_feed_getLazySrc(opts, imageUrl) + ' class="t-feed__post-img t-img js-feed-img" ' + imgFieldAttr + ' alt="' + altText + '">'; } else { var bgFieldAttr = post.uid ? 'bgimgfield="fe_img__' + post.uid + '"' : ''; str += `<div class="t-feed__post-bgimg t-bgimg" ${bgFieldAttr} ${altAria} data-original="${imageUrl}" style="background-image:url(${t_feed_getLazyUrl(opts, imageUrl)});${borderRadiusStyle}">${post.thumb ? `<meta itemprop="image" content="${imageUrl}"></meta>` : ''}${post.thumbalt ? `<meta itemprop="caption" content="${altText}"></meta>` : ''}</div>`; } str += '</div>'; } return str;}function t_feed_drawTitle(recid, opts, post, size, margin) { var rec = document.querySelector('#rec' + recid); if (!rec) return; var feed = rec.querySelector('.js-feed'); var gridType = feed.getAttribute('data-feed-grid-type'); var titleMargin = margin ? 't-feed__post-title_margin' : ''; var fontSize = 't-name'; if (size == 'medium') { fontSize = 't-heading'; } var typoSize = ''; if (opts.blocksInRow == 4) { typoSize += 't-name_xs'; } else if (opts.blocksInRow == 2 || !opts.blocksInRow) { typoSize += 't-name_xl'; } else { typoSize += 't-name_md'; } if (size == 'medium') { typoSize = 't-heading_lg'; } var url = post.directlink ? post.directlink : '#postpopup'; var target = post.directtarget == '_blank' ? 'target="_blank"' : ''; var linkHTML = { open: opts.previewmode ? '<a href="' + url + '" ' + target + ' class="t-feed__link js-feed-post-link">' : '', close: opts.previewmode ? '</a>' : '', }; var str = ''; var styles = opts.typo && opts.typo.title ? ' style="' + opts.typo.title + '"' : '';