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

© 2020-2026 Некодим

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

Компания

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

Полезное

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

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

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

tilda-catalog-1.1.js

Код файла
Версия от 04.12.2026, 04:03:55 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
5801				shadowOptions.shadowOpacity = rawVal;5802				break;5803			case 'opacity':5804				if (shouldInclude('opacity')) {5805					t_store_addRule(rulesArr, mapSimpleProps[key], t_store_percentToFloat(rawVal));5806				}5807				break;5808			case 'color':5809				if (shouldInclude('color')) {5810					t_store_addTextColorRule(rulesArr, rawVal);5811				}5812				break;
История файла и сравнение версий
  • 04.12.2026, 04:03:55 · 56c3b845
5813 default:
5814 if (mapSimpleProps[key] && shouldInclude(mapSimpleProps[key])) {
5815 t_store_addRule(rulesArr, mapSimpleProps[key], rawVal);
5816 }
5817 break;
5818 }
5819 });
5820
5821 const baseShadow = t_store_buildTextShadow(shadowOptions);
5822 if (baseShadow && shouldInclude('text-shadow')) {
5823 t_store_addRule(rulesArr, 'text-shadow', baseShadow);
5824 }
5825}
5826
5827/**
5828 * Removes font-size and padding-top/padding-bottom styles from a styles line string.
5829 *
5830 * @param {string} styleString - A string representing a styles line.
5831 * @return {string} - The filtered styles line, with font-size and padding-top/padding-bottom styles removed. If the input is falsy, returns an empty string.
5832 */
5833function t_store_removeSizesFromStylesLine(styleString) {
5834 // Return an empty string if input is falsy
5835 if (!styleString) {
5836 return '';
5837 } else {
5838 // Split the style string into an array
5839 var styleArray = styleString.split(';');
5840
5841 // Filter the array to exclude font-size and padding-top/padding-bottom
5842 var filteredStyles = styleArray.filter(function (style) {
5843 return !style.match(/(font-size|padding-(top|bottom)|line-height)/);
5844 });
5845
5846 // Join the filtered styles back into a string and return it
5847 return filteredStyles.join(';');
5848 }
5849}
5850
5851// Функция вызывается каждый раз, при открытии нового попапа,
5852// Или один раз для страницы со сниппетом
5853function t_store_drawProdPopup_drawGallery(recid, popupElement, product, options) {
5854 var GALLERY_BREAKPOINT = 980;
5855 var CATALOGSLDS_SCRIPT_URL =
5856 'https://static.tildacdn.' + t_store__getRootZone() + '/js/tilda-catalog-slds-1.0.min.js';
5857
5858 var el_popup = popupElement;
5859
5860 if (window.jQuery && el_popup instanceof jQuery) {
5861 if (el_popup.length === 0) {
5862 return;
5863 }
5864 el_popup = el_popup[0];
5865 }
5866
5867 if (!el_popup) return;
5868
5869 var prodSliderElement = el_popup.querySelector('.js-store-prod-slider');
5870 var galleryArr;
5871 if (!product.gallery) {
5872 if (prodSliderElement) prodSliderElement.innerHTML = '';
5873 return;
5874 }
5875
5876 if (typeof product.gallery === 'string') {
5877 galleryArr = JSON.parse(product.gallery);
5878 } else {
5879 galleryArr = product.gallery;
5880 }
5881
5882 if (galleryArr.length === 0) {
5883 if (prodSliderElement) prodSliderElement.innerHTML = '';
5884 return;
5885 }
5886
5887 var initGallery = function () {
5888 var params = {
5889 recid: recid,
5890 el_popup: el_popup,
5891 product: product,
5892 options: options,
5893 galleryArr: galleryArr,
5894 };
5895 var isMobileDevice =
5896 window.isMobile || ('ontouchend' in document && navigator.userAgent.indexOf('AppleWebKit') !== -1);
5897 var windowWidth = isMobileDevice ? document.documentElement.clientWidth : window.innerWidth;
5898 if (
5899 (options.galleryStyle && windowWidth > GALLERY_BREAKPOINT) ||
5900 (options.popup_opts.mobileGalleryStyle && windowWidth <= GALLERY_BREAKPOINT)
Предыдущие 100 строкСледующие 100 строк