1 line
34 KiB
JavaScript
1 line
34 KiB
JavaScript
|
function t_animate__init(){t_animate__checkAnimationAvailability()&&(t_animate__generateStyles(),t_animate__wrapTextWithOpacity(),t_animate__addNoHoverClassToBtns(),t_animate__preventHorizontalScroll(),1200<=window.innerWidth&&t_animate__parseNumberText(),setTimeout(function(){t_animate__startAnimation()},1500))}function t_animate__checkMobile(t){return Array.prototype.filter.call(t,function(t){var e=t.closest(".t396__elem"),a=e?e.getAttribute("data-animate-mobile"):null;if(t.classList.contains("r")){e=t.querySelectorAll(".t-animate");return Array.prototype.forEach.call(e,function(t){t.classList.remove("t-animate")}),!1}return!!a||(t.classList.remove("t-animate"),!1)})}function t_animate__preventHorizontalScroll(){var t=document.querySelector(".t-records"),e=document.querySelectorAll("[data-animate-style=fadeinleft]"),e=Array.prototype.filter.call(e,function(t){return!t.classList.contains("t396__elem")});t&&e.length&&(t.style.overflowX="hidden")}function t_animate__checkAnimationAvailability(){var t=document.querySelector(".t-records"),e=t?t.getAttribute("data-blocks-animationoff"):null,t=t?t.getAttribute("data-tilda-mode"):null;if(/Bot/i.test(navigator.userAgent)||"yes"===e||t_animate__checkIE()||"edit"===t){t=document.querySelectorAll(".t-animate");return Array.prototype.forEach.call(t,function(t){t.classList.remove("t-animate")}),!1}return!0}function t_animate__generateStyles(){if(!!document.querySelector(".t396")){for(var t=t_animate__getBreakpointsArr(),e='.t396 .t-animate[data-animate-style="fadein"],.t396 .t-animate[data-animate-style="fadeinup"],.t396 .t-animate[data-animate-style="fadeindown"],.t396 .t-animate[data-animate-style="fadeinleft"],.t396 .t-animate[data-animate-style="fadeinright"],.t396 .t-animate[data-animate-style="zoomin"],.t396 .t-animate[data-animate-style="zoomout"] {opacity: 0;-webkit-transition-property: opacity, transform;transition-property: opacity, transform;-webkit-transition-duration: 1s;transition-duration: 1s;-webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);-webkit-backface-visibility: hidden;backface-visibility: hidden;}',a=0;a<t.length;a++)(n=t_animate__getMediaQuery(t,a)).isContinue||(e+=n.text+".t396 .t-animate[data-animate-style-res-"+n.minRes+'="fadein"],.t396 .t-animate[data-animate-style-res-'+n.minRes+'="fadeinup"],.t396 .t-animate[data-animate-style-res-'+n.minRes+'="fadeindown"],.t396 .t-animate[data-animate-style-res-'+n.minRes+'="fadeinleft"],.t396 .t-animate[data-animate-style-res-'+n.minRes+'="fadeinright"],.t396 .t-animate[data-animate-style-res-'+n.minRes+'="zoomin"],.t396 .t-animate[data-animate-style-res-'+n.minRes+'="zoomout"] {opacity: 0;-webkit-transition-property: opacity, transform;transition-property: opacity, transform;-webkit-transition-duration: 1s;transition-duration: 1s;-webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);-webkit-backface-visibility: hidden;backface-visibility: hidden;}}');e+='.t396 .t-title.t-animate {-webkit-transition-duration: 1.2s;transition-duration: 1.2s;}.t396 .t-descr.t-animate,.t396 .t-uptitle.t-animate,.t396 .t-subtitle.t-animate,.t396 .t-text.t-animate {-webkit-transition-duration: 0.7s;transition-duration: 0.7s;}.t396 .t-item.t-animate {-webkit-transition-duration: 0.5s;transition-duration: 0.5s;}.t396 .t-animate[data-animate-style="fadein"] {opacity: 0;transform: none;}';for(a=0;a<t.length;a++)(n=t_animate__getMediaQuery(t,a)).isContinue||(e+=n.text+"#allrecords .t396 .t-animate[data-animate-style-res-"+n.minRes+'="fadein"] {opacity: 0;transform: none;}}');e+='.t396 .t-animate_started[data-animate-style="fadein"] {opacity: 1;}';for(a=0;a<t.length;a++)(n=t_animate__getMediaQuery(t,a)).isContinue||(e+=n.text+"#allrecords .t396 .t-animate_started[data-animate-style-res-"+n.minRes+'="fadein"] {opacity: 1;}}');e+='.t396 .t-animate[data-animate-style="fadeinup"] {-webkit-transform: translate(0, 100px);transform: translate(0, 100px);}';for(a=0;a<t.length;a++)(n=t_animate__getMediaQue
|