Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-feed-1.1.js

Код файла
Версия от 18.08.2026, 07:00:17 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
1001	return str;1002}1003 1004/**1005 * Generate layout for FD30*1006 * @param {object} post – JSON with data for post1007 * @param {object} opts – object with feed settings1008 * @param {string} gridColModification – attribute value to check if the column has a background or not1009 * @param {string} recid – recid of current block1010 * @returns1011 */1012
История файла и сравнение версий
  • 18.08.2026, 07:00:17 · 56c3b845
function t_feed_drawColType(post, opts, gridColModification, recid) {
1013 var isBgModification = gridColModification === 'bg';
1014 var btnsAlignClass = opts.btnsAlign ? ' t-feed__col-grid__wrapper_align' : '';
1015 var paddingClass = isBgModification ? ' t-feed__col-grid__content' : '';
1016 var paddingAfterDescr =
1017 isBgModification && opts.imagePosPs == 'afterdescr' ? ' t-feed__col-grid__content_paddingtop' : '';
1018 var paddingSize = isBgModification ? opts.colWithBg.paddingSize : '';
1019 var marginBottom =
1020 !isBgModification && opts.imagePosPs == 'afterdescr' ? ' t-feed__col-grid__content_marginbottom' : '';
1021 var style = isBgModification ? 'style="' + t_feed_addStyleToColWithBg(opts) + '"' : '';
1022
1023 var str = '';
1024 str += '<div class="t-feed__col-grid__post-wrapper" ' + style + '>';
1025 if (opts.imagePosPs == 'beforetitle' || !opts.imagePosPs) {
1026 str += '' + t_feed_drawImage(opts, post, 'beforetitle', recid, isBgModification);
1027 }
1028 str +=
1029 '<div class="t-feed__col-grid__wrapper' +
1030 btnsAlignClass +
1031 paddingClass +
1032 paddingAfterDescr +
1033 marginBottom +
1034 ' ' +
1035 paddingSize +
1036 '">';
1037
1038 if (
1039 (opts.showDate && opts.datePos == 'beforetitle') ||
1040 (opts.showParts && post.postparts.length > 0 && opts.partsPos == 'beforetitle')
1041 ) {
1042 str += '' + t_feed_drawDateAndParts(opts, post, 'beforetitle', 'col', recid);
1043 }
1044
1045 str += ' <div class="t-feed__textwrapper">';
1046 str += '' + t_feed_drawTitle(recid, opts, post, 'small', false);
1047
1048 if (
1049 (opts.showDate && opts.datePos == 'aftertitle') ||
1050 (opts.showParts && post.postparts.length > 0 && opts.partsPos == 'aftertitle')
1051 ) {
1052 str += '' + t_feed_drawDateAndParts(opts, post, 'aftertitle', 'col', recid);
1053 }
1054
1055 if (opts.showShortDescr) {
1056 str += '' + t_feed_drawDescr(opts, post, 'small');
1057 }
1058 str += ' </div>';
1059
1060 if (
1061 (opts.showDate && opts.datePos == 'afterdescr') ||
1062 (opts.showParts && post.postparts.length > 0 && opts.partsPos == 'afterdescr')
1063 ) {
1064 str += '' + t_feed_drawDateAndParts(opts, post, 'afterdescr', 'col', recid);
1065 }
1066
1067 str += '' + t_feed_drawReadMoreBtn(opts);
1068 str += '</div>';
1069
1070 if (opts.imagePosPs == 'afterdescr') {
1071 str += '' + t_feed_drawImage(opts, post, 'afterdescr', recid, isBgModification);
1072 }
1073 str += '</div>';
1074
1075 return str;
1076}
1077
1078/**
1079 * Generate layout for FD slider
1080 * @param {object} post – JSON with data for post
1081 * @param {object} opts – object with feed settings
1082 * @param {string} gridColModification – attribute value to check if the column has a background or not
1083 * @param {string} recid – recid of current block
1084 * @returns
1085 */
1086function t_feed_drawSliderType(post, opts, gridColModification, recid) {
1087 var isBgModification = gridColModification === 'bg';
1088 var btnsAlignClass = opts.btnsAlign ? ' t-feed__slider-grid__wrapper_align' : '';
1089 var paddingClass = isBgModification ? ' t-feed__slider-grid__content' : '';
1090 var paddingAfterDescr =
1091 isBgModification && opts.imagePosPs == 'afterdescr' ? ' t-feed__slider-grid__content_paddingtop' : '';
1092 var paddingSize = isBgModification ? opts.colWithBg.paddingSize : '';
1093 var marginBottom =
1094 !isBgModification && opts.imagePosPs == 'afterdescr' ? ' t-feed__slider-grid__content_marginbottom' : '';
1095 if (isBgModification || opts.blocksWidth) {
1096 var styleStr = opts.blocksWidth ? 'width: ' + opts.blocksWidth + 'px;' : '';
1097 styleStr += isBgModification ? t_feed_addStyleToColWithBg(opts) : '';
1098 var style = 'style="' + styleStr + '"';
1099 }
1100
Предыдущие 100 строкСледующие 100 строк