<style>
.pdf-container {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
padding: 10px 10px 30px 10px;
background-color: white; /* Цвет фона за PDF документом */
box-sizing: border-box;
}
#pdf-canvas {
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Фоновая тень PDF */
max-width: 1000px; /* Максимальная ширина PDF на ПК */
width: 100%;
height: auto;
}
#prev, #next, #zoom-in, #zoom-out, #download-pdf {
display: flex;
align-items: center;
justify-content: center;
outline: none;
border-none;
border-radius: 30px; /* Радиус скругления границы кнопок управления */
background-color: #313131; /* Фоновый цвет кнопок управления */
margin-right: 10px; /* Отступ между кнопоками управления */
width: 36px;
height: 36px;
}
.controls rect, .controls path {
fill: white; /* Цвет элементов в кнопках управления */
}
.controls {
display: flex;
justify-content: center;
margin-bottom: 10px;
position: sticky;
top: 10px;
}
.controls div:hover {
cursor: pointer;
transform: scale(1.1);
}
@media screen and (max-width: 480px){
#zoom-in, #zoom-out {
display: none;
}
.controls {
position: absolute;
top: auto;
bottom: 0;
}
}
</style>
<a id='pdf-link' href='ССЫЛКА НА ВАШ ДОКУМЕНТ' style='display: none' target='blank' download></a>
<div class="pdf-container">
<div class="controls">
<div id="prev" style="font-size: 24px; color: white">
<svg
width="26"
height="26"
viewBox="0 0 216 156"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M22.5 90.9904C12.5 85.2169 12.5 70.7831 22.5 65.0096L94.5 23.4404C104.5 17.6669 117 24.8838 117 36.4308L117 119.569C117 131.116 104.5 138.333 94.5 132.56L22.5 90.9904Z"
fill="#D9D9D9"
/>
<rect x="95" y="54" width="121" height="48" rx="24" fill="#D9D9D9" />
</svg>
</div>
<div id="next">
<svg
width="26"
height="26"
viewBox="0 0 216 156"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M193.5 65.0096C203.5 70.7831 203.5 85.2169 193.5 90.9904L121.5 132.56C111.5 138.333 99 131.116 99 119.569L99 36.4308C99 24.8838 111.5 17.6669 121.5 23.4404L193.5 65.0096Z"
fill="#D9D9D9"
/>
<rect
x="121"
y="102"
width="121"
height="48"
rx="24"
transform="rotate(-180 121 102)"
fill="#D9D9D9"
/>
</svg>
</div>
<div id="zoom-in">
<svg
width="26"
height="26"
viewBox="0 0 201 201"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect
x="201"
y="125"
width="201"
height="48"
rx="24"
transform="rotate(-180 201 125)"
fill="#D9D9D9"
/>
<rect
x="77"
y="201"
width="201"
height="48"
rx="24"
transform="rotate(-90 77 201)"
fill="#D9D9D9"
/>
</svg>
</div>
<div id="zoom-out">
<svg
width="26"
height="26"
viewBox="0 0 201 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect
x="201"
y="48"
width="201"
height="48"
rx="24"
transform="rotate(-180 201 48)"
fill="#D9D9D9"
/>
</svg>
</div>
<div id="download-pdf">
<svg
width="26"
height="26"
viewBox="0 0 156 200"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M90.5987 173.502C84.6892 182.648 71.3108 182.648 65.4012 173.502L25.4025 111.599C18.9533 101.618 26.118 88.4583 38.0012 88.4583L117.999 88.4583C129.882 88.4583 137.047 101.618 130.598 111.599L90.5987 173.502Z"
fill="#D9D9D9"
/>
<rect
x="54"
y="108.117"
width="108.116"
height="48"
rx="24"
transform="rotate(-90 54 108.117)"
fill="#D9D9D9"
/>
<rect x="23" y="185" width="113" height="15" rx="7.5" fill="#D9D9D9" />
</svg>
</div>
</div>
<canvas id="pdf-canvas"></canvas>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.338/pdf.min.js"></script>
<script>
const canvas = document.getElementById('pdf-canvas');
const ctx = canvas.getContext('2d');
const pdfLinkElement = document.getElementById('pdf-link');
const pdfUrl = pdfLinkElement.href;
let pdfDoc = null;
let currentPage = 1;
let scaleFactor = 5;
const pdfContainer = document.querySelector('.pdf-container');
const pdfCanvas = document.getElementById('pdf-canvas');
pdfjsLib.getDocument(pdfUrl).promise.then((pdf) => {
pdfDoc = pdf;
renderPage(currentPage);
}).catch((error) => {
console.error('Ошибка загрузки PDF:', error);
});
function renderPage(pageNum) {
pdfDoc.getPage(pageNum).then((page) => {
const viewport = page.getViewport({ scale: scaleFactor });
canvas.height = viewport.height;
canvas.width = viewport.width;
const renderContext = {
canvasContext: ctx,
viewport: viewport,
};
page.render(renderContext);
});
}
document.getElementById('next').addEventListener('click', () => {
if (currentPage < pdfDoc.numPages) {
currentPage++;
renderPage(currentPage);
}
});
document.getElementById('prev').addEventListener('click', () => {
if (currentPage > 1) {
currentPage--;
renderPage(currentPage);
}
});
document.getElementById('zoom-in').addEventListener('click', () => {
scaleFactor += 0.1;
const currentMaxWidth = parseInt(getComputedStyle(pdfCanvas).maxWidth);
pdfCanvas.style.maxWidth = `${currentMaxWidth + 50}px`;
renderPage(currentPage);
});
document.getElementById('zoom-out').addEventListener('click', () => {
scaleFactor = Math.max(0.1, scaleFactor - 0.1);
const currentMaxWidth = parseInt(getComputedStyle(pdfCanvas).maxWidth);
if (currentMaxWidth > 50) {
pdfCanvas.style.maxWidth = `${currentMaxWidth - 50}px`;
}
renderPage(currentPage);
});
document.getElementById('download-pdf').addEventListener('click', () => {
document.getElementById('pdf-link').click();
});
</script> <style>
.stleft-icon, .stright-icon {
display: block; /* Замените block на none, чтобы полностью скрыть иконки управления */
width: 40px;
user-select: none;
transition: transform 0.3s ease;
}
.stleft-icon:hover, .stright-icon:hover {
transform: scale(1.1);
}
.stright-icon {
margin-bottom: 120px;
}
.uc-st-wrapper {
overflow: hidden;
display: flex;
z-index: 100;
}
.uc-st-container {
position: relative;
display: flex;
overflow: hidden;
scroll-behavior: smooth;
}
.uc-story {
min-width: 100vw;
width: 100vw;
}
#stleft {
display: none;
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 100%;
cursor: pointer;
z-index: 9999999999;
align-items: center;
justify-content: center;
padding-left: 20px;
}
#stright {
display: none;
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 100%;
cursor: pointer;
z-index: 9999999999;
margin-top: 60px;
align-items: center;
justify-content: center;
padding-right: 20px;
}
.indicator-wrapper {
display: none;
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 2px;
background-color: transparent;
margin-top: 10px;
z-index: 9999999999;
}
.stindicators {
display: flex;
height: 100%;
z-index: 9999999999;
padding-left: 10px !important;
padding-right:10px !important;
}
.stindicators .indicator {
flex: 1;
background-color: rgba(255, 255, 255, 0.5);
border-radius: 5px;
position: relative;
margin: 0 1px;
z-index: 9999999999;
}
.stindicators .indicator.fill {
background-color: white;
transition: width 0.1s linear;
z-index: 9999999999;
}
@media screen and (max-width: 980px) {
.stleft-icon, .stright-icon {
display: none;
}
}
</style>
<div id='stleft'>
<!--Ссылка на иконку для левой кнопки-->
<img src='https://lf-cloud.ru/uploads/66cc43eed8de1.svg' class="stleft-icon">
</div>
<div id='stright'>
<!--Ссылка на иконку для правой кнопки-->
<img src='https://lf-cloud.ru/uploads/66cc43fabbbda.svg' class="stright-icon">
</div>
<div class='indicator-wrapper'>
<div class='stindicators'></div>
</div>
<script>
var stWrapper = document.querySelector('.uc-st-wrapper');
var stContainer = document.querySelector('.uc-st-container');
var stleftButton = document.getElementById('stleft');
var strightButton = document.getElementById('stright');
var indicatorWrapper = document.querySelector('.indicator-wrapper');
var isScrolling = false;
var visibleSlideIndex = 0;
function updateSlideVisibility() {
var slides = document.querySelectorAll('.uc-story');
slides.forEach(function(slide, index) {
slide.style.display = (index === visibleSlideIndex) ? 'block' : 'none';
});
}
function slideRight() {
if (!isScrolling) {
isScrolling = true;
var slides = document.querySelectorAll('.uc-story');
visibleSlideIndex = (visibleSlideIndex + 1) % slides.length;
updateSlideVisibility();
updateIndicators();
setTimeout(function() {
isScrolling = false;
}, 1000);
}
}
function slideLeft() {
if (!isScrolling) {
isScrolling = true;
var slides = document.querySelectorAll('.uc-story');
visibleSlideIndex = (visibleSlideIndex - 1 + slides.length) % slides.length;
updateSlideVisibility();
updateIndicators();
setTimeout(function() {
isScrolling = false;
}, 1000);
}
}
function createIndicators() {
var indicatorsContainer = document.querySelector('.stindicators');
indicatorsContainer.innerHTML = '';
var slides = document.querySelectorAll('.uc-story');
slides.forEach(function() {
var indicator = document.createElement('div');
indicator.className = 'indicator';
indicatorsContainer.appendChild(indicator);
});
updateIndicators();
}
function updateIndicators() {
var indicators = document.querySelectorAll('.stindicators .indicator');
indicators.forEach(function(indicator, index) {
if (index === visibleSlideIndex) {
indicator.classList.add('fill');
} else {
indicator.classList.remove('fill');
}
});
}
function hideButtons() {
if (stleftButton !== null) {
stleftButton.style.display = 'none';
}
if (strightButton !== null) {
strightButton.style.display = 'none';
}
if (indicatorWrapper !== null) {
indicatorWrapper.style.display = 'none';
}
}
function showButtons() {
if (stleftButton !== null) {
stleftButton.style.display = 'flex';
}
if (strightButton !== null) {
strightButton.style.display = 'flex';
}
if (indicatorWrapper !== null) {
indicatorWrapper.style.display = 'block';
}
}
if (stleftButton !== null && strightButton !== null) {
stleftButton.addEventListener('click', function() {
slideLeft();
});
strightButton.addEventListener('click', function() {
slideRight();
});
}
var slides = document.querySelectorAll('.uc-story');
stWrapper.appendChild(stContainer);
slides.forEach(function(slide) {
stContainer.appendChild(slide);
});
createIndicators();
var touchstartX = 0;
var touchendX = 0;
var touchstartY = 0;
var touchendY = 0;
stContainer.addEventListener('touchstart', function(event) {
touchstartX = event.changedTouches[0].screenX;
touchstartY = event.changedTouches[0].screenY;
});
stContainer.addEventListener('touchend', function(event) {
touchendX = event.changedTouches[0].screenX;
touchendY = event.changedTouches[0].screenY;
handleGesture();
});
function handleGesture() {
var xDiff = touchendX - touchstartX;
var yDiff = touchendY - touchstartY;
if (Math.abs(xDiff) > Math.abs(yDiff)) {
if (xDiff < 0) {
slideRight();
} else if (xDiff > 0) {
slideLeft();
}
} else {
if (yDiff > 0) {
var tPopupClose = document.querySelector('.t-popup__close');
if (tPopupClose) {
tPopupClose.click();
}
}
}
}
window.addEventListener('resize', function() {
var slideWidth = stContainer.querySelector('.uc-story').offsetWidth;
var scrollDistance = stContainer.scrollLeft;
var index = Math.round(scrollDistance / slideWidth);
visibleSlideIndex = index;
updateSlideVisibility();
updateIndicators();
});
var showStoriesButtons = document.querySelectorAll('.show-stories');
showStoriesButtons.forEach(function(button) {
button.addEventListener('click', function() {
showButtons();
var videos = document.querySelectorAll('.uc-story video');
videos.forEach(function(video) {
video.muted = false;
});
});
});
var tPopupClose = document.querySelector('.t-popup__close');
if (tPopupClose !== null) {
tPopupClose.addEventListener('click', hideButtons);
}
document.addEventListener('keydown', function(event) {
if (event.key === 'Escape' || event.key === 'Esc') {
hideButtons();
}
});
var observer = new IntersectionObserver(function(entries) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
var videos = entry.target.querySelectorAll('video');
videos.forEach(function(video) {
video.play();
video.muted = false;
clearTimeout(video.timeout);
video.timeout = setTimeout(function() {
slideRight();
}, video.duration * 1000);
console.log('Длительность видео:', video.duration, 'секунд');
});
} else {
var videos = entry.target.querySelectorAll('video');
videos.forEach(function(video) {
video.pause();
video.currentTime = 0;
clearTimeout(video.timeout);
});
}
});
}, { threshold: 0.5 });
slides.forEach(function(slide) {
observer.observe(slide);
});
updateSlideVisibility();
</script>
<script>
function preventPopupClick(event) {
if (event.target.closest('.t-popup__close')) {
return;
}
event.stopImmediatePropagation();
}
function blockPopupClick() {
const tPopupElement = document.querySelector('.t-popup');
if (tPopupElement) {
tPopupElement.addEventListener('click', preventPopupClick);
}
}
setInterval(blockPopupClick, 100);
</script> <style>
.uc-banner {
transition: opacity 0.5s ease-out;
z-index: 9999999999999999;
}
.close-banner {
cursor: pointer;
user-select: none;
}
.fade-out {
opacity: 0;
visibility: hidden;
height: 0 !important;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
var banner = document.querySelector('.uc-banner');
var closeButton = document.querySelector('.close-banner');
if (banner && closeButton) {
// Проверяем, есть ли в sessionStorage информация о закрытии баннера
if (sessionStorage.getItem('bannerClosed') === 'true') {
banner.classList.add('fade-out');
}
// Обработчик события нажатия на кнопку закрытия
closeButton.addEventListener('click', function() {
banner.classList.add('fade-out');
// Сохраняем информацию о том, что баннер закрыт
sessionStorage.setItem('bannerClosed', 'true');
});
} else {
console.error('Элемент не найден на странице.');
}
});
</script>
<!-- Первая часть кода -->
<style>
.favorites-counter {
display: flex;
align-items: center;
justify-content: center;
width: 30px; /* Ширина круга */
height: 30px; /* Высота круга */
border-radius: 50px; /* Скругление границ */
font-size: 18px; /* Размер цифр */
color: white; /* Цвет цифр */
background-color: red; /* Цвет круга */
}
</style>
<div class="favorites-counter"></div>
<!-- Вторая часть кода -->
<style>
.show-favorites {
cursor: pointer;
user-select: none;
}
.t1002__wishlisticon {
display: none;
}
.t1002__wishlisticon-counter, .js-wishlisticon-counter {
display: none;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
var t100Elements = document.querySelectorAll('.show-favorites');
var t1002Element = document.querySelector('.t1002__wishlisticon-wrapper');
var tldBlocks = document.querySelectorAll('.favorites-counter');
t100Elements.forEach(function(t100Element) {
t100Element.addEventListener('click', function () {
if (t1002Element) {
simulateClick(t1002Element);
}
});
});
function simulateClick(element) {
var event = new MouseEvent('click', {
bubbles: true,
cancelable: true,
view: window
});
element.dispatchEvent(event);
}
function updateCounter() {
var wishlistCounter = document.querySelector('.t1002__wishlisticon-counter');
if (wishlistCounter) {
var counterValue = wishlistCounter.innerText.trim();
tldBlocks.forEach(function(tldBlock) {
if (counterValue !== '' && counterValue !== '0') {
tldBlock.innerText = counterValue;
tldBlock.style.display = 'flex';
} else {
tldBlock.style.display = 'none';
}
});
}
}
updateCounter();
var observer = new MutationObserver(updateCounter);
observer.observe(document.body, { attributes: true, subtree: true, attributeFilter: ['class'] });
});
</script>
<!-- Первая часть кодая -->
<style>
.basket-counter {
display: flex;
align-items: center;
justify-content: center;
width: 30px; /* Ширина круга */
height: 30px; /* Высота круга */
border-radius: 50px; /* Скругление границ */
font-size: 18px; /* Размер цифр */
color: white; /* Цвет цифр */
background-color: red; /* Цвет круга */
}
</style>
<div class="basket-counter"></div>
<!-- Вторая часть кодая -->
<style>
.order-counter {
color: white;
font-weight: 600;
}
</style>
<div class="order-counter"> р</div>
<!-- Третья часть кодая -->
<style>
.show-basket {
cursor: pointer;
user-select: none;
}
.t706__carticon {
display: none;
}
.t706__carticon-counter, .js-wishlisticon-counter {
display: none;
}
.remove-all {
cursor: pointer;
user-select: none;
font-family: 'TildaSans',Arial,sans-serif; /* Шрифт текста внутри кнопки удаления всех товаров */
font-weight: 600;
color: white; /* Цвет текста внутри кнопки удаления всех товаров */
background: black; /* Фоновый цвет кнопки удаления всех товаров */
padding: 10px 10px; /* Отступы свурху и снизу, слева и справа, внутри кнопки удаления всех товаров */
text-align: center; /* Позиционирование текста кнопки удаления всех товаров */
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
var t103Elements = document.querySelectorAll('.show-basket');
var t104Element = document.querySelector('.t706__carticon');
var tlddBlocks = document.querySelectorAll('.basket-counter');
t103Elements.forEach(function (t103Element) {
t103Element.addEventListener('click', function () {
simulateClick(t104Element);
});
});
function simulateClick(element) {
var event = new MouseEvent('click', {
bubbles: true,
cancelable: true,
view: window
});
element.dispatchEvent(event);
}
function updateCounter() {
var basketCounter = document.querySelector('.t706__carticon-counter');
if (basketCounter) {
var counterValue = basketCounter.innerText.trim();
tlddBlocks.forEach(function (tlddBlock) {
if (counterValue !== '' && counterValue !== '0') {
tlddBlock.innerText = counterValue;
tlddBlock.style.display = 'flex';
} else {
tlddBlock.style.display = 'none';
}
});
}
}
updateCounter();
var observer = new MutationObserver(updateCounter);
observer.observe(document.body, { attributes: true, subtree: true, attributeFilter: ['class'] });
function addRemoveAllButton() {
var removeAllButton = document.createElement('div');
removeAllButton.className = 'remove-all';
removeAllButton.innerText = 'Очистить корзину'; // Текст внутри кнопки удаления всех товаров из корзины
var cartwinTopElement = document.querySelector('.t706__cartwin-bottom');
if (cartwinTopElement) {
cartwinTopElement.appendChild(removeAllButton);
removeAllButton.addEventListener('click', function () {
var productDeleteButtons = document.querySelectorAll('.t706__product-del');
productDeleteButtons.forEach(function (button) {
button.click();
});
});
} else {
console.error('Не удалось найти элемент с классом "t706__cartwin-bottom".');
}
}
addRemoveAllButton();
function updateOrderCounter(value, letter) {
var orderCounterElements = document.querySelectorAll('.order-counter');
orderCounterElements.forEach(function (orderCounterElement) {
orderCounterElement.innerText = value + ' ' + letter;
});
}
function updateOrderCounterValue() {
var prodAmountPriceElement = document.querySelector('.t706__cartwin-prodamount-price');
var orderLetterElement = document.querySelector('.t706__cartwin-prodamount-currency');
if (prodAmountPriceElement) {
var prodAmountPriceText = prodAmountPriceElement.innerText;
var orderLetterText = orderLetterElement ? orderLetterElement.innerText : '';
updateOrderCounter(prodAmountPriceText, orderLetterText);
document.querySelectorAll('.order-counter').forEach(function (orderCounterElement) {
orderCounterElement.style.display = 'block';
});
} else {
document.querySelectorAll('.order-counter').forEach(function (orderCounterElement) {
orderCounterElement.style.display = 'none';
});
}
}
updateOrderCounterValue();
setInterval(updateOrderCounterValue, 50);
});
</script> <!--NLM061--><!--settings{"blockId":"ЗАМЕНИТЬ","hsLink":"#ССЫЛКА ДЛЯ ПОКАЗА","onPageLoad":"1","hsAnimation":"0","scrollAfterShow":"","scrollAfterShowType":"0","scrollAfterShowMargin":"","scrollAfterHide":"","scrollAfterHideType":"0","scrollAfterHideMargin":"","changeText":{"openText":"","closeText":""}}settingsend--><!--ts1734581220523ts--> <script> (function() { if (!window.nlm061obj) { window.nlm061obj = { blocksHideOnLoadPage: [] } } function t_ready(e) { "loading" != document.readyState ? e() : document.addEventListener ? document.addEventListener("DOMContentLoaded", e) : document.attachEvent("onreadystatechange", (function() { "loading" != document.readyState && e() })) } function hasClassStartingWith(element, prefix) { return Array.from(element.classList).some(className => className.startsWith(prefix)); } t_ready((function() { let hs = setInterval(function() { let hsBlockList = document.querySelectorAll('[href="#ССЫЛКА ДЛЯ ПОКАЗА"]'); if (hsBlockList.length > 0) { clearInterval(hs); let block = document.querySelectorAll('ЗАМЕНИТЬ'); let blockIdList = []; block.forEach(function(item) { blockIdList.push(item.id); }); let t = 0; block.forEach(function(e) { window.nlm061obj.blocksHideOnLoadPage.push("#" + e.id); if (e.hasAttribute("nlm087slider-id")) { let sldId = e.getAttribute("nlm087slider-id"); e.closest(`#rec${sldId}nlm`).classList.add("nolimAutoScaleFix061"); e.closest(`#rec${sldId}nlm`).classList.add("nlm061-hide"); } else { if(hasClassStartingWith(e, 'nlm113-notactive-block')) { return; } else { e.classList.add("nolimAutoScaleFix061"); e.classList.add("nlm061-hide"); } } }); function getParents(el) { var parents = []; var p = el.parentNode; let htmlBlk = document.querySelector('html'); while (p !== htmlBlk) { var o = p; if (o.classList.contains('t-rec')) { parents.push(o); } p = o.parentNode; } return parents; } let isClicked = true; let intervalAllowed = true; let padTopInit = 0; let padBotInit = 0; block.forEach(function(block) { if (block.style.paddingTop) { padTopInit = parseInt(block.style.paddingTop, 10); } if (block.style.paddingBottom) { padBotInit = parseInt(block.style.paddingBottom, 10); } }); var slideHideShowObj = { slideUp: function(element, duration = 500) { isClicked = false; return new Promise(function(resolve, reject) { element.style.height = (element.offsetHeight - padTopInit - padBotInit) + 'px'; element.style.transitionProperty = 'height, margin, padding'; element.style.transitionDuration = duration + 'ms'; element.offsetHeight; element.style.overflow = 'hidden'; element.style.height = 0; element.style.paddingTop = 0; element.style.paddingBottom = 0; element.style.marginTop = 0; element.style.marginBottom = 0; window.setTimeout(function() { if(hasClassStartingWith(element, 'nlm113-notactive-block')) { return; } else { element.classList.add('nolimAutoScaleFix061'); element.classList.add('nlm061-hide'); element.style.removeProperty('height'); element.style.removeProperty('padding-top'); element.style.removeProperty('padding-bottom'); element.style.removeProperty('margin-top'); element.style.removeProperty('margin-bottom'); element.style.removeProperty('overflow'); element.style.removeProperty('transition-duration'); element.style.removeProperty('transition-property'); resolve(false); isClicked = true; } }, duration); }); }, slideDown: function(element, duration = 500) { isClicked = false; return new Promise(function(resolve, reject) { element.style.removeProperty('display'); if (element.classList.contains('nolimAutoScaleFix061')) { element.classList.remove('nolimAutoScaleFix061'); element.classList.remove('nolimAutoScaleFix113'); } element.classList.add('nlm061-open'); offsetHeight = element.offsetHeight; let height = offsetHeight - padTopInit - padBotInit; element.style.overflow = 'hidden'; element.style.height = 0; element.style.paddingTop = 0; element.style.paddingBottom = 0; element.style.marginTop = 0; element.style.marginBottom = 0; element.offsetHeight; element.style.transitionProperty = 'height, margin, padding'; element.style.transitionDuration = duration + 'ms'; element.style.height = height + 'px'; element.style.removeProperty('padding-top'); element.style.removeProperty('padding-bottom'); element.style.removeProperty('margin-top'); element.style.removeProperty('margin-bottom'); window.setTimeout(function() { element.style.removeProperty('height'); element.style.removeProperty('overflow'); element.style.removeProperty('transition-duration'); element.style.removeProperty('transition-property'); isClicked = true; }, duration); }); }, slideToggle: function(element, duration = 500) { if (element.classList.contains('nolimAutoScaleFix061')) { return this.slideDown(element, duration); } else { return this.slideUp(element, duration); } } }; function checkIsBlockASlider(blk, type, state) { if (blk.hasAttribute("nlm079slider-id")) { if (blk.classList.contains("activeSlide")) { if (type == "standart" && state == "toopen") { blk.classList.remove('nolimAutoScaleFix061'); blk.classList.remove('nolimAutoScaleFix113'); blk.classList.add('nlm061-open'); blk.style.display = "block"; } else if (type == "standart" && state == "toclose") { if(hasClassStartingWith(blk, 'nlm113-notactive-block')) { return; } else { blk.classList.add('nolimAutoScaleFix061'); blk.classList.add('nlm061-hide'); } } else { slideHideShowObj.slideToggle(blk); } } else { let sliderId = blk.getAttribute("nlm079slider-id"); document.querySelectorAll(`[nlm079slider-id="${sliderId}"]`).forEach(function(item) { if (item.classList.contains("activeSlide")) { if (type == "standart" && state == "toopen") { item.classList.remove('nolimAutoScaleFix061'); item.classList.remove('nolimAutoScaleFix113'); item.classList.add('nlm061-open'); item.style.display = "block"; } else if (type == "standart" && state == "toclose") { if(hasClassStartingWith(item, 'nlm113-notactive-block')) { return; } else { item.classList.add('nolimAutoScaleFix061'); item.classList.add('nlm061-hide'); } } else { slideHideShowObj.slideToggle(item); } } }); } } else { if (blk.hasAttribute("nlm087slider-id")) { let sldId = blk.getAttribute("nlm087slider-id"); blk = blk.closest(`#rec${sldId}nlm`); } if(hasClassStartingWith(blk, 'nlm113-notactive-block')) { return; } if (type == "standart" && state == "toopen") { blk.classList.remove('nolimAutoScaleFix061'); blk.classList.remove('nolimAutoScaleFix113'); console.log('blk2',blk); blk.classList.add('nlm061-open'); blk.style.display = "block"; } else if (type == "standart" && state == "toclose") { if(hasClassStartingWith(blk, 'nlm113-notactive-block')) { return; } else { blk.classList.add('nolimAutoScaleFix061'); blk.classList.add('nlm061-hide'); } } else { slideHideShowObj.slideToggle(blk); } } } function checkSlideToggle(slideElem) { if (isClicked) { slideElem.forEach(function(e) { checkIsBlockASlider(e); }); } else if (isClicked == false && intervalAllowed == true) { intervalAllowed = false; let int = setInterval(function() { if (isClicked) { clearInterval(int); intervalAllowed = true; slideElem.forEach(function(e) { checkIsBlockASlider(e); }); } }, 10); } } function forAutoscaleMode() { "y" === window.lazy && t_lazyload_update(); block.forEach(function(block) { typeof t_slds_updateSlider != "undefined" && t_slds_updateSlider(block.getAttribute("id").replace("rec", "")); if (block && block.getAttribute("data-record-type") == 396) { t396_doResize(block.getAttribute("id").replace("rec", "")); } }); if (window.CustomEvent && typeof window.CustomEvent === 'function') { var myCustomEvent = new CustomEvent('displayChanged'); } else { var myCustomEvent = document.createEvent('CustomEvent'); myCustomEvent.initCustomEvent('displayChanged', true, true); } block.forEach(function(block) { block.dispatchEvent(myCustomEvent); }); } function scrollTo(elem, type) { elem.scrollIntoView({ block: type, behavior: "smooth" }); } function scrollToWithMargin(elem, margin) { let rect = elem.getBoundingClientRect(); let elementPosition = rect.top + window.pageYOffset; let offsetPosition = elementPosition - margin; window.scrollTo({ top: offsetPosition, behavior: 'smooth' }); } let stylesNlm129 = document.querySelector('.styles__nlm129'); let clickEv = function(e) { e.preventDefault(); if (0 == t) { checkSlideToggle(block); block.forEach(function(item) { if(hasClassStartingWith(item, 'nlm113-notactive-block')) { return; } else { item.classList.remove("nlm061-hide"); item.classList.add("nlm061-open"); } }); forAutoscaleMode(); t = 1; } else { if (1 == t) { checkSlideToggle(block); block.forEach(function(item) { if(hasClassStartingWith(item, 'nlm113-notactive-block')) { return; } else { item.classList.remove("nlm061-open"); item.classList.add("nlm061-hide"); } }); forAutoscaleMode(); t = 0; } } if(stylesNlm129) { setTimeout(() => { console.log('q'); window.dispatchEvent(new Event('resize')); },1000); } }; hsBlockList.forEach(function(item) { let parentsList = getParents(item); parentsList.forEach(function(elem) { let childList = elem.querySelectorAll('[href="#ССЫЛКА ДЛЯ ПОКАЗА"]'); let tildaFuncChangeCount = 0; childList.forEach(function(w) { w.removeEventListener('click', clickEv); w.addEventListener('click', clickEv); if (w.closest(".t-rec").getAttribute("data-record-type") == 649 || w.closest(".t-rec").getAttribute("data-record-type") == 336) { w.style.pointerEvents = "none"; } }); }); }); }; }, 50); })); })(); </script> <style> .t-cards__col { cursor: pointer; } .t994__item { width: auto !important; } .nolimAutoScaleFix061 { opacity: 0!important; height: 0!important; max-height: 0!important; min-height: 0!important; pointer-events: none!important; overflow: hidden!important; padding-top: 0!important; padding-bottom: 0!important; } </style> <style>
#upload-form {
display: flex;
flex-flow: column;
align-items: center;
}
/*Стили кнопки выбора файла*/
.custom-file-upload {
display: inline-block;
padding: 6px 12px;
cursor: pointer;
font-size: 16px;
font-weight: 700;
text-align: center;
color: #ffffff;
background-color: #007bff;
border: 1px solid #007bff;
border-radius: 4px;
margin-top: 20px;
}
/*Стили кнопки выбора файла при наведении*/
.custom-file-upload:hover {
background-color: #0069d9;
border: 1px solid #0062cc;
}
/*Стили кнопки отправки файла*/
#submit-button {
display: inline-block;
padding: 6px 12px;
cursor: pointer;
font-size: 16px;
font-weight: 700;
text-align: center;
color: #ffffff;
background-color: #007bff;
border: 1px solid #007bff;
border-radius: 4px;
margin-top: 20px;
}
/*Стили кнопки отправки файла при наведении*/
#submit-button:hover {
background-color: #0069d9;
border: 1px solid #0062cc;
}
/*Стилизация сообщения об успешной отправке файла или об ошибке*/
#result-message {
margin-top: 10px;
font-size: 16px;
font-weight: 700;
color: #cccccc;
}
.file-input {
display: none;
}
</style>
<form id="upload-form">
<!-- кнопка выбора файла -->
<button class="custom-file-upload">Выбрать файл</button>
<input id="file-upload" class='file-input' type="file" name="file-upload" accept="*" required/>
<!-- кнопка отправки файла -->
<button id="submit-button" type="submit">Отправить</button>
<div id="result-message"></div>
</form>
<script>
const form = document.querySelector('#upload-form');
const fileInput = document.querySelector('#file-upload');
const submitButton = document.querySelector('#submit-button');
const resultMessage = document.querySelector('#result-message');
form.addEventListener('submit', (e) => {
e.preventDefault();
const file = fileInput.files[0];
const formData = new FormData();
formData.append('document', file);
formData.append('chat_id', '801546223');// chat id вашего телеграм бота
submitButton.disabled = true;
resultMessage.innerHTML = 'Отправка файла...'; // текст сообщения в процессе отправки файла
fetch(`https://api.telegram.org/botAPI Token/sendDocument`, { // API Token вашего телеграм бота
method: 'POST',
body: formData,
})
.then(response => response.json())
.then(data => {
if (data.ok) {
resultMessage.innerHTML = 'Файл успешно отправлен в Telegram бот!'; // текст сообщения в случае успешной отправки
} else {
resultMessage.innerHTML = 'Произошла ошибка при отправке файла в Telegram бот!'; // текст сообщения в случае ошибки
}
submitButton.disabled = false;
})
.catch(error => {
console.error(error);
resultMessage.innerHTML = 'Произошла ошибка при отправке файла в Telegram бот!'; // текст сообщения в случае ошибки
submitButton.disabled = false;
});
});
</script>
<script>
const fileInput2 = document.querySelector('#file-upload');;
const customFileUpload = document.querySelector('.custom-file-upload');
customFileUpload.addEventListener('click', () => {
fileInput.click();
});
fileInput2.addEventListener('change', () => {
if (fileInput.value) {
customFileUpload.innerHTML = fileInput2.files[0].name;
} else {
customFileUpload.innerHTML = 'Выбрать файл';
}
});
</script>
<style>
.shirina{
background:none !important; right: 0 !important;left: 0 !important;}
.parpadding{padding:0 !important;}
.tn-atom .t-form__errorbox-wrapper, .tn-form__errorbox-popup , .t-form-success-popup { z-index: 9999999 !important; }
</style>
<script>
$( document ).ready(function() {
var ZeroPopID = '#rec288543986';//ID Zero
var PopWindID = '#rec288544167';//ID PopUp окна BF503
$(PopWindID + " .t-popup__container").addClass("shirina").html($(ZeroPopID)).parent(".t-popup").addClass("parpadding");
$('a[href^="#popupzero"]').click(function(e) {e.preventDefault();
setTimeout(function(){window.dispatchEvent(new Event('resize')); }, 10);
});
$(document).on('click','a[href="#close"], '+ZeroPopID+' .t396__filter',function(e){e.preventDefault();t390_closePopup(PopWindID.replace(/[^0-9]/gim, ""));});
$(ZeroPopID).delegate(".t-submit", "click", function(){
setTimeout(function(){if($(ZeroPopID+" .t-form").hasClass("js-send-form-success")){t390_closePopup(PopWindID.replace(/[^0-9]/gim, ""))}}, 1000);});
});
</script> <style>
/* ID пустого блока */
#rec658133609 {
display: flex;
position: relative;
}
/* Класс слайдов */
.uc-sld_items {
margin: 0 !important;
display: none;
width: 100%;
height: 100%;
}
#leftsld {
z-index: 10000;
width: 60px;
height: 60px;
cursor: pointer;
position: absolute;
left: 80px;
top: 50%; /
transform: translateY(-50%);
}
#rightsld {
z-index: 10000;
width: 60px;
height: 60px;
cursor: pointer;
position: absolute;
right: 80px;
top: 50%; /
transform: translateY(-50%);
}
#leftsld:hover, #rightsld:hover {
scale: 1.1;
}
@media (max-width: 800px) {
#leftsld {
left: 20px;
}
#rightsld {
right: 20px;
}
}
</style>
<img src="ссылка на иконку кнопки" id='leftsld' alt="">
<img src="ссылка на иконку кнопки" id='rightsld' alt="">
<script>
var currentSlide = 0;
var sliderItems = document.querySelectorAll(".uc-sld_items");
var slidercont = document.getElementById ("rec658133609"); // ID пустого zero block
let lbutton = document.getElementById ("leftsld");
let rbutton = document.getElementById ("rightsld");
let slide = document.getElementById ("rec658133726"); //ID слайда
let slide2 = document.getElementById ("rec658136997"); //ID слайда
let slide3 = document.getElementById ("rec658137855"); //ID слайда
let autoSlideInterval;
slidercont.appendChild(lbutton);
slidercont.appendChild(rbutton);
slidercont.appendChild(slide);
slidercont.appendChild(slide2);
slidercont.appendChild(slide3);
sliderItems[currentSlide].style.display = "block";
function nextSlide() {
sliderItems[currentSlide].style.display = "none"; // Скрываем текущий блок
currentSlide = (currentSlide + 1) % sliderItems.length; // Переходим к следующему блоку
sliderItems[currentSlide].style.display = "block"; // Показываем новый блок
}
function prevSlide() {
sliderItems[currentSlide].style.display = "none"; // Скрываем текущий блок
currentSlide = (currentSlide - 1 + sliderItems.length) % sliderItems.length; // Переходим к предыдущему блоку
sliderItems[currentSlide].style.display = "block"; // Показываем новый блок
}
// Функция для запуска автоматического переключения слайдов
function startAutoSlide() {
autoSlideInterval = setInterval(nextSlide, 5000);
}
function stopAutoSlide() {
clearInterval(autoSlideInterval);
}
rbutton.addEventListener("click", () => {
nextSlide();
stopAutoSlide();
});
lbutton.addEventListener("click", () => {
prevSlide();
stopAutoSlide();
});
slidercont.addEventListener("mouseenter", stopAutoSlide);
slidercont.addEventListener("mouseleave", startAutoSlide);
startAutoSlide();
//rbutton.addEventListener("click", nextSlide);
//lbutton.addEventListener("click", prevSlide);
</script> <style>
.uc-menu {
position: fixed;
top: 0;
left: -320px;
transition: left 0.3s;
z-index: 500;
}
.burger-menu {
width: 320px;
height: 100vh;
background-color: blue; /* Цвет фона меню */
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: none;
z-index: 499;
}
.menu-show, .menu-hide {
cursor: pointer;
z-index: 501;
}
.menu-li {
color: black; /* Цвет ссылок */
}
.menu-li:hover {
color: yellow; /* Цвет ссылок при наведении */
}
</style>
<div class='overlay'></div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const showButton = document.querySelector('.menu-show');
const hideButton = document.querySelector('.menu-hide');
const burgerMenu = document.querySelector('.uc-menu');
const overlay = document.querySelector('.overlay');
const menuLiItems = document.querySelectorAll('.menu-li');
showButton.addEventListener('click', function () {
burgerMenu.style.left = '0';
overlay.style.display = 'block';
showButton.style.opacity= '0';
});
hideButton.addEventListener('click', function () {
burgerMenu.style.left = '-320px';
overlay.style.display = 'none';
showButton.style.opacity= '1';
});
overlay.addEventListener('click', function () {
burgerMenu.style.left = '-320px';
overlay.style.display = 'none';
showButton.style.opacity= '1';
});
menuLiItems.forEach(menuLi => {
menuLi.addEventListener('click', function () {
burgerMenu.style.left = '-320px';
overlay.style.display = 'none';
showButton.style.opacity= '1';
});
});
});
</script> <style>
.uc-menu {
position: fixed;
top: 0;
right: -320px; /* Изменение свойства right */
transition: right 0.3s; /* Изменение свойства transition */
z-index: 500;
}
.burger-menu {
width: 320px;
height: 100vh;
background-color: blue; /* Цвет фона меню */
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
const showButton = document.querySelector('.menu-show');
const hideButton = document.querySelector('.menu-hide');
const burgerMenu = document.querySelector('.uc-menu');
const overlay = document.querySelector('.overlay');
const menuLiItems = document.querySelectorAll('.menu-li');
showButton.addEventListener('click', function () {
burgerMenu.style.right = '0';
overlay.style.display = 'block';
showButton.style.opacity= '0';
});
hideButton.addEventListener('click', function () {
burgerMenu.style.right = '-320px';
overlay.style.display = 'none';
showButton.style.opacity= '1';
});
overlay.addEventListener('click', function () {
burgerMenu.style.right = '-320px';
overlay.style.display = 'none';
showButton.style.opacity= '1';
});
menuLiItems.forEach(menuLi => {
menuLi.addEventListener('click', function () {
burgerMenu.style.right = '-320px';
overlay.style.display = 'none';
showButton.style.opacity= '1';
});
});
});
</script> <style>
.uc-slider-container {
display: flex;
align-items: center;
position: relative;
width: 100%;
padding: 0;
}
.uc-video-sld {
display: none;
width: 100%;
height: 100%;
margin: 0;
}
.leftsld, .rightsld {
cursor: pointer;
}
.uc-slider-buttons {
position: absolute;
width: 100%;
top: 50%; /
transform: translateY(-50%);
}
</style>
<script>
var currentSlide = 0;
var videoContainer = document.querySelector(".uc-slider-container");
var videoSlides = document.querySelectorAll(".uc-video-sld");
var videoButtons = document.querySelector(".uc-slider-buttons");
let lbutton = document.querySelector(".leftsld");
let rbutton = document.querySelector(".rightsld");
videoSlides.forEach((slide) => {
videoContainer.appendChild(slide);
});
videoContainer.appendChild(videoButtons);
videoSlides[currentSlide].style.display = "block";
function nextSlide() {
videoSlides[currentSlide].style.display = "none";
const currentSlideElement = videoSlides[currentSlide];
videoContainer.removeChild(currentSlideElement);
currentSlide = (currentSlide + 1) % videoSlides.length;
videoContainer.appendChild(videoSlides[currentSlide]);
videoSlides[currentSlide].style.display = "block";
triggerResize();
}
function prevSlide() {
videoSlides[currentSlide].style.display = "none";
const currentSlideElement = videoSlides[currentSlide];
videoContainer.removeChild(currentSlideElement);
currentSlide = (currentSlide - 1 + videoSlides.length) % videoSlides.length;
videoContainer.appendChild(videoSlides[currentSlide]);
videoSlides[currentSlide].style.display = "block";
triggerResize();
}
function triggerResize() {
window.dispatchEvent(new Event('resize'));
}
rbutton.addEventListener("click", () => {
nextSlide();
});
lbutton.addEventListener("click", () => {
prevSlide();
});
</script>
<style>
/* Стили для кнопки с изображением */
.icon-button {
position: relative;
cursor: pointer;
}
.icon-button::before {
content:'';
position: absolute;
top: 50%;
left: 30px; /* Устанавливаем отступ слева от иконки */
transform: translate(-50%, -50%);
width: 30px; /* Устанавливаем ширину иконки */
height: 30px; /* Устанавливаем высоту иконки */
background: url('https://lifehackov.ru/uploads/65535c4358075.svg') center center no-repeat; /* Ссылка на иконку */
background-size: cover;
}
</style> <style>
#rec665995871 { /* ID зеро блока */
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: none;
z-index: 999999999;
}
.autopopup_close {
cursor: pointer;
z-index: 999999999;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function() {
setTimeout(function() {
var popupContainer = document.querySelector("#rec665995871"); // ID зеро блока
popupContainer.style.display = "block";
var closeAutoButton = document.querySelector(".autopopup_close");
closeAutoButton.addEventListener("click", function() {
popupContainer.style.display = "none";
});
}, 3000); // Время до открытия popup
});
</script> <!-- Первая модификация -->
<style>
.uc-hidden-block {
display: none;
}
</style>
<script>
// Укажите дату и время, когда блок должен стать видимым
const showDate = new Date('2024-01-28T19:49:00'); // формат: гггг-мм-ддTчч:мм:сс
// Укажите дату и время, когда блок должен исчезнуть
const hideDate = new Date('2024-01-28T19:50:00'); // формат: гггг-мм-ддTчч:мм:сс
function updateVisibility() {
const now = new Date();
const hiddenBlock = document.querySelector('.uc-hidden-block');
if (now >= showDate && now < hideDate) {
hiddenBlock.style.display = 'block';
} else {
hiddenBlock.style.display = 'none';
}
}
updateVisibility();
setInterval(updateVisibility, 1000);
</script>
<!-- Вторая модификация -->
<style>
.uc-hidden-block {
display: none;
}
</style>
<script>
// Укажите день недели (0 - воскресенье, 1 - понедельник, и так далее)
const targetDayOfWeek = 3; // Например, среда
function updateVisibility() {
const now = new Date();
const hiddenBlock = document.querySelector('.uc-hidden-block');
if (hiddenBlock && now.getDay() === targetDayOfWeek) {
hiddenBlock.style.display = 'block';
} else if (hiddenBlock) {
hiddenBlock.style.display = 'none';
}
}
updateVisibility();
setInterval(updateVisibility, 1000);
</script> <script src="https://cdnjs.cloudflare.com/ajax/libs/smoothscroll/1.4.10/SmoothScroll.min.js" integrity="sha256-huW7yWl7tNfP7lGk46XE+Sp0nCotjzYodhVKlwaNeco=" crossorigin="anonymous"></script>
<script>
SmoothScroll({
animationTime: 800,
stepSize: 75,
accelerationDelta: 30,
keyboardSupport: true,
arrowScroll: 50,
pulseAlgorithm: true,
touchpadSupport: true
});
</script> <style>
.uc-oldsearch {
display: none; /* Скрываем стандартный поиск */
}
.newsearch {
width: 100%;
height: 50px; /* Высота поля поиска */
border: 2px solid black; /* Размер, тип и цвет границы поля поиска */
border-radius: 30px; /* Округление границ поля поиска */
color: black; /* Цвет текста внутри поля поиска */
background-color: transparent; /* Фоновый цвет поля поиска */
}
.newsearch::placeholder {
color: black; /* Цвет надписи "Поиск" внутри поля поиска*/
}
.t-site-search-dm {
background-color: black; /* Фоновый цвет плашки с результатами */
border-radius: 15px; /* Округлениие границ плашки с результатами */
margin-top: 10px; /* Отступ свурху от плашки с результатами */
overflow: hidden;
}
.t-site-search-dm__result__title.t-text {
color: white; /* Цвет текста внутри плашки с результатами */
}
.t-site-search-dm__result__body.t-text, h3.t-title, .t-site-search-dm__result__title.t-descr {
color: white; /* Цвет второй строки в плашке и цвета заголовков в popup */
}
.t-site-search-popup {
background-color: black; /* Фоновый цвет popup */
border-radius: 15px; /* Округдениие границ popup */
color: white; /* Цвет текста в popup */
z-index: 99999;
}
.t-site-search-close {
display: none !important;
}
.t985__clear-icon {
display: none;
}
.search-icon {
position: absolute;
top: 10px; /* Отступ сверху от иконки поиска */
right: 10px; /* Отступ справа от иконки поиска */
width: 20px; /* Ширина иконки поиска */
height: 20px; /* Высота иконки поиска */
cursor: pointer;
}
</style>
<div class="t838__wrapper t-site-search-input">
<div class="t838__blockinput" style='position: relative;'>
<input type="text" class="t838__input t-input newsearch" placeholder="Найти" data-search-target="all">
<button style='border: none; background: none; padding: 0;'><img class="search-icon" src='ссылка на икноку' alt="поиск"></button>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
var poppopElement = document.querySelector('.search-icon');
poppopElement.addEventListener('click', function () {
console.log('Клик был выполнен!');
var event = new KeyboardEvent('keydown', {
key: 'Enter',
bubbles: true,
cancelable: true
});
poppopElement.dispatchEvent(event);
});
poppopElement.addEventListener('keydown', function (event) {
if (event.key === 'Enter') {
console.log('Enter был нажат!');
}
});
});
</script> <style>
.t418__slidecontainer {
white-space: nowrap;
overflow: hidden;
position: relative;
cursor: default;
}
.t418__item {
display: inline-block;
}
.t418__next, .t418__control, .t418__previous {
display: none;
}
</style>
<script>
const slideContainers = document.querySelectorAll('.t418__slidecontainer');
const cloneCount = 300;
slideContainers.forEach(slideContainer => {
const items = Array.from(slideContainer.querySelectorAll('.t418__item'));
// Клонирование элементов
for (let i = 1; i < cloneCount; i++) {
items.forEach(item => {
const clone = item.cloneNode(true);
slideContainer.appendChild(clone);
});
}
let currentPosition = 0;
const scrollSpeed = 3; // Увеличивайте значение для увеличения скорости анимации
const totalWidth = items[0].offsetWidth * items.length * cloneCount;
let animationId = null;
let isPaused = false;
function autoScroll() {
if (!isPaused) {
currentPosition -= scrollSpeed;
if (Math.abs(currentPosition) >= totalWidth / 2) {
currentPosition = 0;
}
slideContainer.style.transform = `translateX(${currentPosition}px)`;
slideContainer.style.transition = 'transform 0s linear';
}
animationId = requestAnimationFrame(autoScroll);
}
function pauseScroll() {
isPaused = true;
if (animationId) {
cancelAnimationFrame(animationId);
}
}
function resumeScroll() {
isPaused = false;
requestAnimationFrame(autoScroll);
}
slideContainer.addEventListener('mouseenter', pauseScroll);
slideContainer.addEventListener('mouseleave', resumeScroll);
requestAnimationFrame(autoScroll);
});
</script>
<style>
.tn-atom:not([field]) {
cursor: pointer;
white-space: nowrap;
overflow: hidden;
}
.tn-atom > span {
display: inline-block;
animation: running-text 4s linear infinite; /* Скорость движения текста в секундах */
}
@keyframes running-text {
0% { transform: translateX(100%); }
100% { transform: translateX(-100%); }
}
</style>
<script>
var elements = document.querySelectorAll('.tn-atom:not([field])');elements.forEach(function(element) {var words = element.textContent.trim().split(/\s+/);if (words.length > 3) {var span = document.createElement('span');span.textContent = element.textContent;element.textContent = '';element.appendChild(span);}});
</script>
<script>
var nolabBlock = document.querySelector('.uc-nolab');if (nolabBlock) {nolabBlock.style.width = '100%';nolabBlock.style.position = 'absolute';nolabBlock.style.zIndex = '3';}
</script>
<script>
document.addEventListener("DOMContentLoaded", function() {var style = document.createElement("style");style.innerHTML = `body {scrollbar-width: thin;scrollbar-color: transparent transparent;margin-right: calc(-1 * (100vw - 100%));overflow-y: scroll;}::-webkit-scrollbar {width: 0px;}::-webkit-scrollbar-thumb {background-color: transparent;}`;document.head.appendChild(style);window.addEventListener("beforeunload", function() {document.head.removeChild(style);});});
</script> <style>
#myVideo {
object-fit: cover;
width: 100vw;
height: 100vh;
}
.toggleSound {
cursor: pointer;
z-index: 10;
transition: all 0.3s;
opacity: 0.5;
}
</style>
<video id="myVideo" autoplay loop muted playsinline>
<source src="ссылка на ваше видео" type="video/mp4">
</video>
<script>
document.addEventListener("DOMContentLoaded", function() {
const video = document.getElementById("myVideo");
const toggleSoundButton = document.querySelector(".toggleSound");
toggleSoundButton.addEventListener("click", function() {
video.muted = !video.muted;
toggleSoundButton.style.transition = "opacity 0.3s, transform 0.3s";
toggleSoundButton.style.opacity = video.muted ? 0.5 : 1;
toggleSoundButton.style.transform = video.muted ? "scale(0.8)" : "scale(1)";
});
});
</script> <style>
#myVideo {
object-fit: cover;
width: 100vw;
height: 100vh;
}
.toggleSound {
cursor: pointer;
z-index: 10;
transition: all 0.3s;
opacity: 0.5;
}
</style>
<video id="myVideo" autoplay loop muted playsinline>
<source src="ссылка на ваше видео" type="video/mp4">
</video>
<script>
document.addEventListener("DOMContentLoaded", function() {
const video = document.getElementById("myVideo");
const toggleSoundButton = document.querySelector(".toggleSound");
toggleSoundButton.addEventListener("click", function() {
video.muted = !video.muted;
toggleSoundButton.style.transition = "opacity 0.3s, transform 0.3s";
toggleSoundButton.style.opacity = video.muted ? 0.5 : 1;
toggleSoundButton.style.transform = video.muted ? "scale(0.8)" : "scale(1)";
});
});
</script>