function t_feed_drawSliderDots(recid, galleryItems, opts) {
3114 var isGallery = typeof opts.gallery != 'undefined'; 3115 var bulletWidth = isGallery ? opts.gallery.dotsWidth : '8px'; 3116 bulletWidth = parseInt(bulletWidth); 3117 if (bulletWidth > 20) { 3120 var activeBulletClass = ''; 3121 var dotsActiveBg = isGallery ? opts.gallery.dotsActiveBg : ''; 3122 dotsActiveBg = dotsActiveBg !== '' ? dotsActiveBg : '#222222'; 3123 var dotsBg = isGallery ? opts.gallery.dotsBg : ''; 3124 var dotsBorderSize = isGallery ? opts.gallery.dotsBorderSize : ''; 3128 bulletWidth !== '' && !isNaN(bulletWidth) ? 'width:' + bulletWidth + 'px;height:' + bulletWidth + 'px;' : ''; 3129 dotsStyle += dotsBg !== '' ? 'background-color:' + dotsBg + ';' : ''; 3130 dotsStyle += dotsBorderSize !== '' ? 'border:' + dotsBorderSize + ' solid ' + dotsActiveBg + ';' : ''; 3133 str += '<ul class="t-slds__bullet_wrapper">'; 3134 galleryItems.forEach(function (item, i) { 3135 if (item.length != 1) { 3136 activeBulletClass = i == 0 ? ' t-slds__bullet_active' : ''; 3138 '<li class="t-slds__bullet' + 3140 '" data-slide-bullet-for="' + 3143 '<button type="button" class="t-slds__bullet_body" aria-label="' + 3144 t_feed_getDictionary('bulletlabel', recid) + 3157function t_feed_setGalleryImageHeight(recid) { 3158 var rec = document.querySelector('#rec' + recid); 3159 var images = rec.querySelectorAll('.t-feed__post-popup__slider-separator'); 3160 Array.prototype.forEach.call(images, function (image) { 3161 var width = image.getAttribute('data-slider-image-width'); 3162 var height = image.getAttribute('data-slider-image-height'); 3163 var ratio = height / width; 3164 var padding = ratio * 100; 3165 image.style.paddingBottom = padding + '%'; 3169function t_feed_initCodeHightlight() { 3170 var post = document.querySelector('.js-feed-post-text'); 3172 var codeBlocks = post.querySelectorAll('.t-redactor__highlightcode code'); 3173 if (!codeBlocks.length) return; 3175 if (typeof window.hljs !== 'undefined') { 3176 t_feed_highlightCodeBlocks(codeBlocks); 3178 t_feed_loadCodeHighlight(function () { 3179 t_feed_highlightCodeBlocks(codeBlocks); 3184function t_feed_loadCodeHighlight(callback) { 3185 var script = document.createElement('script'); 3186 var style = document.createElement('link'); 3188 style.href = 'https://static.tildacdn.' + t_feed__getRootZone() + '/css/highlight.min.css'; 3189 script.src = 'https://static.tildacdn.' + t_feed__getRootZone() + '/js/highlight.min.js'; 3191 style.type = 'text/css'; 3192 style.rel = 'stylesheet'; 3195 script.onload = callback; 3198 document.head.appendChild(script); 3199 document.head.appendChild(style);