index.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!DOCTYPE html>
  2. <html lang="{{ .Site.LanguageCode }}">
  3. {{ partial "components/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: hidden;">
  9. {{ partial "components/nav.html" . }}
  10. <div id="home">
  11. {{ partial "components/carousel.html" . }}
  12. {{ partial "components/main.html" . }}
  13. {{ partial "components/serve.html" . }}
  14. {{ partial "components/progress.html" . }}
  15. {{ partial "LP_components/blogs_tab.html" . }}
  16. {{ partial "footer.html" . }}
  17. </div>
  18. <!-- {{ partial "nav.html" . }}
  19. {{ partial "LP_components/hero.html" . }}
  20. {{ partial "LP_components/video.html" . }}
  21. {{ partial "LP_components/use_cases.html" . }}
  22. {{ partial "LP_components/steps.html" . }}
  23. {{ partial "LP_components/features.html" . }}
  24. {{ partial "LP_components/blogs_tab.html" . }}
  25. {{ partial "LP_components/action.html" . }}
  26. {{ partial "LP_components/Footer.html" . }}
  27. {{ partial "LP_components/news.html" . }} -->
  28. </div>
  29. <!-- /#all -->
  30. {{ partial "components/scripts.html" . }}
  31. <script>
  32. function tabLP() {
  33. if (('.m-tabs').length) {
  34. // Show the first tab by default
  35. $('.blog-tabs-stage>div').hide();
  36. $('.blog-tabs-stage>div:first').show();
  37. $('.blog-tabs-nav li:first').addClass('blog-tab-active');
  38. // Change tab class and display content
  39. $('.blog-tabs-nav a').on('click', function (event) {
  40. event.preventDefault();
  41. $('.blog-tabs-nav li').removeClass('blog-tab-active');
  42. $(this).parent().addClass('blog-tab-active');
  43. $('.blog-tabs-stage>div').hide();
  44. $($(this).attr('href')).show();
  45. });
  46. }
  47. }
  48. tabLP();
  49. function debounce(func, wait = 20, immediate = true) {
  50. var timeout;
  51. return function () {
  52. var context = this, args = arguments;
  53. var later = function () {
  54. timeout = null;
  55. if (!immediate) func.apply(context, args);
  56. };
  57. var callNow = immediate && !timeout;
  58. clearTimeout(timeout);
  59. timeout = setTimeout(later, wait);
  60. if (callNow) func.apply(context, args);
  61. };
  62. };
  63. const featuresBlock = document.querySelectorAll('.features-block');
  64. const featuresRow = document.querySelectorAll('.sec-features .row');
  65. function checkSlide() {
  66. featuresRow.forEach((block, i) => {
  67. // half way through the image
  68. const slideInAt = (window.scrollY + window.innerHeight) - block.offsetHeight / 2;
  69. // bottom of the image
  70. const isHalfShown = slideInAt > block.offsetTop;
  71. if (isHalfShown) {
  72. console.log('active');
  73. featuresBlock[i].classList.add('active');
  74. }
  75. });
  76. }
  77. window.addEventListener('scroll', debounce(checkSlide));
  78. $('.navbar-nav .dropdown:nth-of-type(2)').click(function () {
  79. $('html, body').animate({
  80. scrollTop: $("#sec-features").offset().top
  81. }, 1000);
  82. })
  83. var swiper = new Swiper(".carousel", {
  84. pagination: {
  85. el: ".swiper-pagination",
  86. clickable: true,
  87. },
  88. });
  89. </script>
  90. <!-- 進度條 -->
  91. <script src="../js/progress.js"></script>
  92. </body>
  93. </html>