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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-members-store-main.js

Код файла
Версия от 04.12.2026, 04:03:52 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
1001	html += '</div>';1002	html += '</div>';1003 1004	return html;1005}1006 1007/**1008 * Шаблон элемента группы1009 *1010 * @param {object} props - данные страницы группы1011 * @returns {string} - шаблон страницы группы1012 */1013
История файла и сравнение версий
  • 04.12.2026, 04:03:52 · 56c3b845
function tma__resources__getGroupItemHtml(props) {
1014 let html = '';
1015
1016 html += '<div class="tlk-resources__item">';
1017 html += '<div class="tlk-resources__title">';
1018
1019 if (props.homepage && props.index) {
1020 // TODO: удалить фолбэк после обновления tilda-members-init.min.js
1021 const groupPageUrl =
1022 typeof tma__getGroupPageUrl === 'function'
1023 ? tma__getGroupPageUrl(props.index) || '/members/'
1024 : `/${props.index}`;
1025
1026 html += `<a href="${groupPageUrl}" class="tlk-resources__groups-title-link" data-field="tlk-link">`;
1027 html += props.name;
1028 html +=
1029 '<svg version="1.1" class="tlk-resources__groups-title-link-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100.2 100.2" style="enable-background:new 0 0 100.2 100.2;" xml:space="preserve">';
1030 html += '<g>';
1031 html +=
1032 '<path class="st0" d="M83,47.5c-0.8,0-1.5,0.7-1.5,1.5v17.5h-49v-49H50c0.8,0,1.5-0.7,1.5-1.5s-0.7-1.5-1.5-1.5H31 c-0.8,0-1.5,0.7-1.5,1.5v13.5H17c-0.8,0-1.5,0.7-1.5,1.5v52c0,0.8,0.7,1.5,1.5,1.5h52c0.8,0,1.5-0.7,1.5-1.5V69.5H83 c0.8,0,1.5-0.7,1.5-1.5V49C84.5,48.2,83.8,47.5,83,47.5z M67.5,81.5h-49v-49h11V68c0,0.8,0.7,1.5,1.5,1.5h36.5V81.5z" />';
1033 html +=
1034 '<path class="st0" d="M83,14.5H64c-0.8,0-1.5,0.7-1.5,1.5c0,0.8,0.7,1.5,1.5,1.5h15.4L54.9,41.9c-0.6,0.6-0.6,1.5,0,2.1 c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4l24.4-24.4V35c0,0.8,0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5V16C84.5,15.2,83.8,14.5,83,14.5z" />';
1035 html += '</g>';
1036 html += '</svg>';
1037 html += '</a>';
1038 } else {
1039 html += props.name;
1040 }
1041
1042 html += props.expired ? ` <span>({{resources_title_group_to}} ${tma__getformatDate(props.expired)})</span>` : '';
1043 html += '</div>';
1044
1045 // TODO: есть пользователи у которых в homepage лежит строка 0
1046 if (
1047 (props.pages.length > 0 || props.docs.length > 0) &&
1048 (!props.homepage || props.homepage === '0') &&
1049 !props.index
1050 ) {
1051 html += '<div class="tlk-resources__groups-pages">';
1052
1053 for (let i = 0; i < props.pages.length; i++) {
1054 const page = props.pages[i];
1055
1056 html += '<div class="tlk-resources__groups-pages-item">';
1057 html +=
1058 '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" fill="none" class="tlk-resources__groups-pages-item-icon">';
1059 html +=
1060 '<path d="M8.05 1H3C2.44772 1 2 1.44772 2 2V13C2 13.5523 2.44771 14 3 14H12C12.5523 14 13 13.5523 13 13V5.5M8.05 1L13 5.5M8.05 1V4.5C8.05 5.05228 8.49772 5.5 9.05 5.5H13" stroke="currentColor"/>';
1061 html += '</svg>';
1062 html += `<a href="/${page.link}" class="tlk-resources__groups-pages-item-link" data-field="tlk-link">${page.title}</a>`;
1063 html += '</div>';
1064 }
1065
1066 for (let i = 0; i < props.docs.length; i++) {
1067 const docs = props.docs[i];
1068
1069 html += '<div class="tlk-resources__groups-pages-item">';
1070 html +=
1071 '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" fill="none" class="tlk-resources__groups-pages-item-icon">';
1072 html +=
1073 '<path d="M5 8.5H10M5 10.5H10M5 6.5H10M4.5 2H3C2.44772 2 2 2.44772 2 3V13C2 13.5523 2.44771 14 3 14H12C12.5523 14 13 13.5523 13 13V3C13 2.44772 12.5523 2 12 2H10.5M4.5 2V2C4.5 1.44772 4.94772 1 5.5 1H9.5C10.0523 1 10.5 1.44772 10.5 2V2M4.5 2V2.5C4.5 3.05228 4.94772 3.5 5.5 3.5H9.5C10.0523 3.5 10.5 3.05228 10.5 2.5V2" stroke="currentColor"/>';
1074 html += '</svg>';
1075 html += `<a href="/${docs.link}" class="tlk-resources__groups-pages-item-link" data-field="tlk-link">${docs.title}</a>`;
1076 html += '</div>';
1077 }
1078
1079 html += '</div>';
1080 }
1081
1082 html += '</div>';
1083
1084 return html;
1085}
1086
1087/**
1088 * Получает ID проекта
1089 * @returns {string} - ID проекта
1090 */
1091function tmst__main__getProjectId() {
1092 var allRecords = document.getElementById('allrecords');
1093 return allRecords.getAttribute('data-tilda-project-id') || '';
1094}
Предыдущие 100 строк