index.html 3.4 KB

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