Каталог файловtilda-members-scripts.js
1501 1502 window.TildaFonts = fonts.tf_fonts_selected ? fonts.tf_fonts_selected.split(',') : fonts.tf_fonts.split(',');1503 1504 tma__loadJS(tma__getStaticCdnHost() + '/js/tilda-fonts.min.js');1505 }1506 1507 if (!isPage && (fonts.headlinefont === 'TildaSans' || fonts.textfont === 'TildaSans')) {1508 tma__loadCSS(tma__getStaticCdnHost() + '/css/fonts-tildasans.css');1509 }1510 1511 if (!isPage && fonts.customcssfile) {1512
История файла и сравнение версий
tma__loadCSS(fonts.customcssfile);
1514 if (fonts.gf_fonts) { 1516 'https://fonts.googleapis.com/css2?' + fonts.gf_fonts + (fonts.fontsswap === 'y' ? '&display=swap' : '') 1519 } else if (!fonts.customcssfile && fonts.gf_fonts) { 1521 'https://fonts.googleapis.com/css2?' + fonts.gf_fonts + (fonts.fontsswap === 'y' ? '&display=swap' : '') 1527 if (!isPage && fonts.myfonts_json) { 1528 var fontsArray = JSON.parse(fonts.myfonts_json); 1530 if (!Array.isArray(fontsArray) || fontsArray.length === 0) return; 1532 var fontsJson = fontsArray[0]; 1533 var fontsName = fontsJson.f_name; 1534 var isFontsSwap = fonts.fontsswap === 'y'; 1536 fontsJson.f_name = ''; 1538 if (!fontsName) return; 1540 for (var key in fontsJson) { 1541 if (key !== 'cnt' && fontsJson[key]) { 1542 var props = key.split('_'); 1543 var prop1 = props[1]; 1544 var prop2 = props[2]; 1547 fontsStr += tma__createFontFace(fontsName, fontsJson[key], prop1, prop2, isFontsSwap); 1549 fontsStr += tma__createFontFace(fontsName, fontsJson[key], 'woff', prop1, isFontsSwap); 1555 if (!isPage && fonts.typekitid) { 1556 tma__loadJS('https://use.typekit.net/' + fonts.typekitid + '.js'); 1558 tma__waitForVariable( 1561 window.Typekit.load({ async: true }); 1568 tma__createFontStyles(fontsStr, isPage); 1569 window.tildaMembers.is_create_fonts = true; 1575 * @param {string} fontsStr - Разметка шрифта 1576 * @param {boolean} isPage - Является страницей на тильде или нет 1578function tma__createFontStyles(fontsStr, isPage) { 1579 var fonts = window.tildaMembers.settingStyles.fonts; 1580 var defaultFontFamily = 1581 '"Arial", Roboto, "Open Sans", sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Cantarell, "Helvetica Neue"'; 1583 var textStyle = fontsStr; 1585 // Стили для заголовков 1586 if (fonts.headlinecolor || fonts.headlinefont || fonts.headlinefontweight) { 1587 textStyle += '[data-field="tlk-title"] {'; 1589 if (fonts.headlinecolor) { 1590 textStyle += 'color: ' + fonts.headlinecolor + ';'; 1593 if (fonts.headlinefont) { 1594 textStyle += 'font-family: "' + fonts.headlinefont + '", ' + defaultFontFamily + ';'; 1597 if (fonts.headlinefontweight) { 1598 textStyle += 'font-weight: ' + fonts.headlinefontweight + ';'; 1599 } else if (fonts.headlinefont) { 1600 textStyle += 'font-weight: 600;';