Каталог файловtilda-feed-1.1.js
1301 }1302}1303 1304function t_feed_drawImageInRowBig(opts, post, position, recid) {1305 var imageUrl = post.thumb ? post.thumb : post.image;1306 var height = opts.imageRatio + '%';1307 var str = '';1308 if ((post.thumb !== '' || post.image !== '' || post.mediatype === 'video') && opts.showImage) {1309 var altText = '';1310 if (post.thumb !== '' && post.thumbalt !== '') {1311 altText = post.thumbalt;1312
История файла и сравнение версий
} else if (post.thumb === '' && post.image !== '' && post.imagealt !== '') {
1313 altText = post.imagealt; 1315 var alt = altText ? `role="img" aria-label="${altText}"` : ''; 1318 '<div class="t-feed__post-imgwrapper t-feed__post-imgwrapper_' + 1320 '" style="padding-bottom:' + 1323 if ((opts.showDate && opts.datePos == 'onimage') || (opts.showParts && opts.partsPos == 'onimage')) { 1324 str += '' + t_feed_drawDateAndParts(opts, post, 'onimage', 'col', recid); 1327 class="t-feed__post-bgimg t-bgimg" 1328 data-original="${imageUrl}" 1330 style="background-image:url(${t_feed_getLazyUrl(opts, imageUrl)});" 1331 >${post.thumb ? `<meta itemprop="image" content="${imageUrl}"></meta>` : ''}${post.thumbalt ? `<meta itemprop="caption" content="${altText}"></meta>` : ''}</div> 1337function t_feed_drawImage(opts, post, position, recid, isBgModification) { 1338 var borderRadiusStyle; 1339 var aspectRatioStyle = 'aspect-ratio: ' + (opts.imageRatio ? 100 / opts.imageRatio : 100 / 66).toFixed(1) + ';'; 1341 if (isBgModification && opts.colWithBg.borderRadius) { 1342 if (position == 'afterdescr') { 1344 'border-radius: 0 0 ' + opts.colWithBg.borderRadius + ' ' + opts.colWithBg.borderRadius + ';'; 1347 'border-radius:' + opts.colWithBg.borderRadius + ' ' + opts.colWithBg.borderRadius + ' 0 0;'; 1350 borderRadiusStyle = ''; 1353 var imageStyle = 'style="' + aspectRatioStyle + borderRadiusStyle + '"'; 1355 opts.isHorizOnMob && opts.hasOriginalAspectRatio ? 't-feed__post-imgwrapper_mobile-nopadding' : ''; 1358 if ((post.thumb !== '' || post.image !== '' || post.mediatype === 'video') && opts.showImage) { 1359 var imageUrl = (post.thumb ? post.thumb : post.image) || ''; 1362 if (post.thumb !== '' && post.thumbalt !== '') { 1363 altText = post.thumbalt; 1364 } else if (post.thumb === '' && post.image !== '' && post.imagealt !== '') { 1365 altText = post.imagealt; 1367 var altAria = altText ? `role="img" aria-label="${altText}"` : ''; 1369 if (post.mediatype === 'video' && post.image === '' && post.thumb === '') { 1371 'https://static.tildacdn.' + 1372 t_feed__getRootZone() + 1373 '/ffb6456b-781b-40e8-9517-ffb5225e8bcd/imgfish.jpg'; 1377 '<div class="t-feed__post-imgwrapper t-feed__post-imgwrapper_' + 1385 if ((opts.showDate && opts.datePos == 'onimage') || (opts.showParts && opts.partsPos == 'onimage')) { 1386 str += '' + t_feed_drawDateAndParts(opts, post, 'onimage', 'col', recid); 1389 if (opts.hasOriginalAspectRatio) { 1392 t_feed_getLazySrc(opts, imageUrl) + 1393 ' class="t-feed__post-img t-img js-feed-img" ' + 1398 str += `<div class="t-feed__post-bgimg t-bgimg" ${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>`;