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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-members-userbar.js

Код файла
Версия от 21.10.2026, 07:00:46 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
1001			html += '<div class="tlk-userbar__preloader-text"></div>';1002		}1003 1004		html += '</div>';1005	}1006 1007	html += '</div>';1008 1009	return html;1010}1011 1012/**1013
История файла и сравнение версий
  • 21.10.2026, 07:00:46 · 56c3b845
* Создает стили для userbar из настроек
1014 *
1015 */
1016function tma__userbar__createUserbarStyles() {
1017 if (!window.tildaMembers.settingStyles) return;
1018 var userBarStyle = document.getElementById('tlk-userbar-style');
1019 if (userBarStyle) {
1020 userBarStyle.remove();
1021 }
1022
1023 var styles = window.tildaMembers.settingStyles.controlblock;
1024 var textStyle = '';
1025
1026 if (!styles || (styles && Array.isArray(styles) && !styles.length)) return;
1027
1028 if (styles.user_vertical_coordinate_px || styles.user_horizontal_coordinate_px) textStyle += '.tlk-userbar {';
1029
1030 if (!styles.user_position || (styles.user_position.indexOf('top') !== -1 && styles.user_vertical_coordinate_px)) {
1031 textStyle += 'top: ' + styles.user_vertical_coordinate_px + ' !important; ';
1032 textStyle += 'bottom: auto !important; ';
1033 } else if (styles.user_vertical_coordinate_px) {
1034 textStyle += 'bottom: ' + styles.user_vertical_coordinate_px + '!important; ';
1035 textStyle += 'top: auto !important; ';
1036 }
1037
1038 if (styles.user_position && styles.user_position.indexOf('left') !== -1 && styles.user_horizontal_coordinate_px) {
1039 textStyle += 'left: ' + styles.user_horizontal_coordinate_px + '!important; ';
1040 textStyle += 'right: auto !important; ';
1041 } else if (styles.user_horizontal_coordinate_px) {
1042 textStyle += 'right: ' + styles.user_horizontal_coordinate_px + '!important; ';
1043 textStyle += 'left: auto !important; ';
1044 }
1045
1046 if (styles.user_vertical_coordinate_px || styles.user_horizontal_coordinate_px) textStyle += '}\n';
1047
1048 if (styles.user_background || styles.user_background_opacity || styles.border_color || styles.border_width_px) {
1049 textStyle += '.tlk-userbar__user-image, .tlk-userbar_store .tlk-userbar__user-image {';
1050
1051 if (styles.user_background || styles.user_background_opacity) {
1052 var defaultBackgroundColor = '0, 0, 0, ';
1053
1054 if (window.tildaMembers.is_init_store) defaultBackgroundColor = '255, 255, 255, ';
1055
1056 var backgroundColor = styles.user_background
1057 ? tma__userbar__hexToRgb(styles.user_background).join(', ') + ', '
1058 : defaultBackgroundColor;
1059 var backgroundColorOpacity = tma__userbar__getOpacity(styles.user_background_opacity);
1060
1061 textStyle += 'background-color: rgba(' + backgroundColor + backgroundColorOpacity + ');\n';
1062 }
1063
1064 if (styles.border_color || styles.border_width_px) {
1065 var borderWidth = styles.border_width_px || 1;
1066 var borderColor = styles.border_color || 'transparent';
1067
1068 textStyle += 'border: ' + borderWidth + ' solid ' + borderColor + ';';
1069 }
1070
1071 textStyle += '}\n';
1072 }
1073
1074 if (styles.user_size) {
1075 textStyle += '.tlk-userbar__user-image {';
1076 textStyle += 'width: ' + styles.user_size + '; ';
1077 textStyle += 'height: ' + styles.user_size + '; ';
1078 textStyle += '}\n';
1079 }
1080
1081 if (styles.user_size_mobile) {
1082 textStyle += ' @media screen and (max-width: 1023px) {';
1083 textStyle += '.tlk-userbar__user-image {';
1084 textStyle += 'width: ' + styles.user_size_mobile + '; ';
1085 textStyle += 'height: ' + styles.user_size_mobile + '; ';
1086 textStyle += '}\n';
1087 textStyle += '}\n';
1088 }
1089
1090 if (styles.user_color) {
1091 textStyle += '.tlk-userbar__user-image svg {';
1092 textStyle += 'fill: ' + styles.user_color + '; ';
1093 textStyle += '}\n';
1094 }
1095
1096 if (styles.user_border_color) {
1097 textStyle += ' .tlk-userbar__user-image circle, .tlk-userbar__user-image path,';
1098 textStyle +=
1099 ' .tlk-userbar_store .tlk-userbar__user-image circle, .tlk-userbar_store .tlk-userbar__user-image path {';
1100 textStyle += 'stroke: ' + styles.user_border_color + '; ';
Предыдущие 100 строкСледующие 100 строк