index.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html>
  2. <html lang="{{ .Site.LanguageCode }}">
  3. {{ partial "head.html" . }}
  4. <!-- Start of HubSpot Embed Code -->
  5. <script type="text/javascript" id="hs-script-loader" async defer src="//js-na1.hs-scripts.com/20485755.js"></script>
  6. <!-- End of HubSpot Embed Code -->
  7. <body>
  8. <div id="all" style="overflow-x:hidden;">
  9. {{ partial "nav.html" . }}
  10. {{ partial "LP_components/hero.html" . }}
  11. {{ partial "LP_components/use_cases.html" . }}
  12. {{ partial "LP_components/steps.html" . }}
  13. {{ partial "LP_components/features.html" . }}
  14. {{ partial "LP_components/blogs_tab.html" . }}
  15. {{ partial "LP_components/action.html" . }}
  16. {{ partial "LP_components/Footer.html" . }}
  17. {{ partial "LP_components/news.html" . }}
  18. </div>
  19. <!-- /#all -->
  20. {{ partial "scripts.html" . }}
  21. <script>
  22. function tabLP () {
  23. console.log('pass');
  24. if(('.m-tabs').length){
  25. // Show the first tab by default
  26. $('.blog-tabs-stage>div').hide();
  27. $('.blog-tabs-stage>div:first').show();
  28. $('.blog-tabs-nav li:first').addClass('blog-tab-active');
  29. // Change tab class and display content
  30. $('.blog-tabs-nav a').on('click', function(event){
  31. event.preventDefault();
  32. $('.blog-tabs-nav li').removeClass('blog-tab-active');
  33. $(this).parent().addClass('blog-tab-active');
  34. $('.blog-tabs-stage>div').hide();
  35. $($(this).attr('href')).show();
  36. });
  37. }
  38. }
  39. tabLP();
  40. function debounce(func, wait = 20, immediate = true) {
  41. var timeout;
  42. return function() {
  43. var context = this, args = arguments;
  44. var later = function() {
  45. timeout = null;
  46. if (!immediate) func.apply(context, args);
  47. };
  48. var callNow = immediate && !timeout;
  49. clearTimeout(timeout);
  50. timeout = setTimeout(later, wait);
  51. if (callNow) func.apply(context, args);
  52. };
  53. };
  54. const featuresBlock = document.querySelectorAll('.features-block');
  55. const featuresRow = document.querySelectorAll('.sec-features .row');
  56. function checkSlide() {
  57. console.log('pass');
  58. featuresRow.forEach((block, i) => {
  59. // half way through the image
  60. const slideInAt = (window.scrollY + window.innerHeight) - block.offsetHeight / 2;
  61. console.log(slideInAt);
  62. console.log(block.offsetTop);
  63. // bottom of the image
  64. const isHalfShown = slideInAt > block.offsetTop;
  65. if (isHalfShown) {
  66. console.log('active');
  67. featuresBlock[i].classList.add('active');
  68. }
  69. });
  70. }
  71. window.addEventListener('scroll', debounce(checkSlide));
  72. $('.navbar-nav .dropdown:nth-of-type(2)').click(function() {
  73. $('html, body').animate({
  74. scrollTop: $("#sec-features").offset().top
  75. }, 1000);
  76. })
  77. </script>
  78. </body>
  79. </html>