if (fonts.textfontsize) { textStyle += 'font-size: ' + fonts.textfontsize + 'px;'; } if (!fonts.textfontweight) { textStyle += 'font-weight: 300;'; } else { textStyle += 'font-weight: ' + fonts.textfontweight + ';'; } textStyle += '}'; } if (fonts.textfont) { if (!isPage) { textStyle += ' body {'; var isSimplifiedVersion = tma__sign__isSimplifiedVersion(); // Не устанавливаем цвет фона из настроек сайта при открытии блока в попапе if (fonts.bgcolor && !isSimplifiedVersion) { textStyle += 'background-color: ' + fonts.bgcolor + ';'; } textStyle += 'font-family: "' + fonts.textfont + '", ' + defaultFontFamily + ';'; textStyle += '}'; } textStyle += ' .tlk-userbar, .tlk-userbar__popup, .tlk-menu, .tlk-popup, .tlk-switcher {'; textStyle += 'font-family: "' + fonts.textfont + '", ' + defaultFontFamily + ' !important;'; textStyle += '}'; } // Стили для ссылок if (fonts.linkcolor || (fonts.linklineheight && fonts.linklinecolor)) { textStyle += ' #allrecords [data-field="tlk-link"],'; textStyle += ' [data-field="tlk-link"] {'; if (fonts.linkcolor) { textStyle += 'color: ' + fonts.linkcolor + ';'; } if (fonts.linklineheight && fonts.linklinecolor) { var height = Number(fonts.linklineheight.replace(/\D/g, '')); var insetHeight = 1; var borderHeight = height - 1; if (height <= 1) { borderHeight = 0; } textStyle += 'border-bottom: ' + borderHeight + 'px solid ' + fonts.linklinecolor + ';'; textStyle += 'box-shadow: inset 0px -' + insetHeight + 'px 0px 0px ' + fonts.linklinecolor + ';'; textStyle += '-webkit-box-shadow: inset 0px -' + insetHeight + 'px 0px 0px ' + fonts.linklinecolor + ';'; textStyle += '-moz-box-shadow: inset 0px -' + insetHeight + 'px 0px 0px ' + fonts.linklinecolor + ';'; } textStyle += 'transition: .3s ease;'; textStyle += '}'; } if (fonts.linkcolor || fonts.linkcolorhover || (fonts.linklineheight && fonts.linklinecolorhover)) { textStyle += ' #allrecords [data-field="tlk-link"]:hover,'; textStyle += ' [data-field="tlk-link"]:hover {'; if (fonts.linkcolorhover) { textStyle += 'color: ' + fonts.linkcolorhover + ';'; } else if (fonts.linkcolor) { textStyle += 'color: ' + fonts.linkcolor + ';'; } if (fonts.linklineheight && fonts.linklinecolorhover) { var height = Number(fonts.linklineheight.replace(/\D/g, '')); var insetHeight = 1; var borderHeight = height - 1; if (height <= 1) { borderHeight = 0; } textStyle += 'border-bottom: ' + borderHeight + 'px solid ' + fonts.linklinecolorhover + ';'; textStyle += 'box-shadow: inset 0px -' + insetHeight + 'px 0px 0px ' + fonts.linklinecolorhover + ';'; textStyle += '-webkit-box-shadow: inset 0px -' + insetHeight + 'px 0px 0px ' + fonts.linklinecolorhover + ';'; textStyle += '-moz-box-shadow: inset 0px -' + insetHeight + 'px 0px 0px ' + fonts.linklinecolorhover + ';'; } textStyle += 'opacity: .7;'; textStyle += '}';