3501width = '60px';3502}3503imageStyle = 'style="height: calc(' + width + ' * ' + imageRatio + ');"';3504}35053506var titleStyle = '';3507if (opts.popup_opts.titleColor) titleStyle += 'color:' + opts.popup_opts.titleColor + ';';3508if (opts.popup_opts.titleFontFamily) titleStyle += 'font-family:' + opts.popup_opts.titleFontFamily + ';';3509var textStyle = '';3510if (opts.popup_opts.textColor) textStyle += 'color:' + opts.popup_opts.textColor + ';';3511if (opts.popup_opts.descrFontFamily) textStyle += 'font-family:' + opts.popup_opts.descrFontFamily + ';';
var partsStyle = ''; if (opts.popup_opts.subtitleColor) partsStyle += 'color:' + opts.popup_opts.subtitleColor + ';'; if (opts.popup_opts.subtitleFontFamily) partsStyle += 'font-family:' + opts.popup_opts.subtitleFontFamily + ';'; var imgSrc = ''; if (post.thumb) { imgSrc = post.thumb; } else if (post.image) { imgSrc = post.image; } var str = ''; if (imgSrc) { str += '<div class="t-feed__post-popup__relevants-imgwrapper" ' + imageStyle + '>' + '<div class="t-feed__post-popup__relevants-bgimg t-bgimg" data-original="' + imgSrc + '" style="background-image: url(' + imgSrc + ');"></div>' + '</div>'; } str += '<div class="t-feed__post-popup__relevants-textwrapper">'; if (opts.popup_opts.showParts) { str += '<div class="t-feed__post-popup__relevants-parts" style="">'; post.postparts.forEach(function (item) { if (item != '') { str += '<span class="t-feed__post-popup__relevants-item-tag t-uptitle t-uptitle_xs"' + (partsStyle ? ' style="' + partsStyle + '"' : '') + '>' + item.parttitle + '</span>'; } }); str += '</div>'; } if (post.title) { str += '<div class="t-feed__post-popup__relevants-item-title t-name t-name_xs"' + (titleStyle ? ' style="' + titleStyle + '"' : '') + '>' + post.title + '</div>'; } if (post.descr) { str += '<div class="t-feed__post-popup__relevants-item-descr t-descr t-descr_xxs"' + (textStyle ? ' style="' + textStyle + '"' : '') + '>' + post.descr + '</div>'; } str += '</div>'; return str;}function t_feed_drawPostPopupArrowTop(opts) { var color = opts.arrowtop_opts.color ? 'style="fill: ' + opts.arrowtop_opts.color + ';"' : ''; var bottomCoordinate = opts.arrowtop_opts.bottom ? opts.arrowtop_opts.bottom : '20px'; var position = 'left:20px;'; if (opts.arrowtop_opts.left) { position = 'left:' + opts.arrowtop_opts.left + ';'; } if (opts.arrowtop_opts.right) { position = 'right:' + opts.arrowtop_opts.right + ';'; } var style = 'style="position:fixed;z-index:1;bottom:' + bottomCoordinate + ';' + position + 'min-height:30px;"'; var str = ''; str += '<div class="t-feed__post-popup__arrow-top" ' + style + '>'; switch (+opts.arrowtop_opts.style) { case 2: str += '<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 48 48">' + '<path ' + color + ' d="M24 3.125c11.511 0 20.875 9.364 20.875 20.875S35.511 44.875 24 44.875 3.125 35.511 3.125 24 12.489 3.125 24 3.125m0-3C10.814.125.125 10.814.125 24S10.814 47.875 24 47.875 47.875 37.186 47.875 24 37.186.125 24 .125z"/>' + '<path ' + color + ' d="M25.5 36.033a1.5 1.5 0 11-3 0V16.87l-7.028 7.061a1.497 1.497 0 01-2.121.005 1.5 1.5 0 01-.005-2.121l9.591-9.637A1.498 1.498 0 0124 11.736h.001c.399 0 .783.16 1.063.443l9.562 9.637a1.5 1.5 0 01-2.129 2.114l-6.994-7.049-.003 19.152z"/>' + '</svg>'; break; case 3: