index.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. <div class="home-cn">
  13. <!-- {{ partial "components/main.html" . }} -->
  14. <!-- {{ partial "components/serve.html" . }} -->
  15. <!-- {{ partial "components/ai-video.html" . }} -->
  16. {{ partial "components/ai-reporter.html" . }}
  17. <!-- <div class="reporter-img">
  18. <img src="imgs/home/ai-reporter.webp" alt="AI記者|語音專訪">
  19. </div> -->
  20. {{ partial "components/progress.html" . }}
  21. {{ partial "LP_components/blogs_tab.html" . }}
  22. {{ partial "LP_components/action.html" . }}
  23. {{ partial "footer.html" . }}
  24. </div>
  25. <div class="home-en">
  26. <!-- {{ partial "components/en/main.html" . }} -->
  27. <!-- {{ partial "components/en/serve.html" . }} -->
  28. <!-- {{ partial "components/en/ai-video.html" . }} -->
  29. {{ partial "components/progress.html" . }}
  30. {{ partial "components/en/action.html" . }}
  31. {{ partial "components/en/footer.html" . }}
  32. </div>
  33. </div>
  34. <!-- Modal 測試 -->
  35. <!-- <div class="modal fade" id="aiModal" tabindex="-1" aria-labelledby="aiModalLabel" aria-hidden="true">
  36. <div class="modal-dialog">
  37. <div class="modal-content">
  38. <div class="modal-header">
  39. <h5 class="modal-title" id="aiModalLabel">Modal title</h5>
  40. <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
  41. </div>
  42. <div class="modal-body">
  43. <div class="row row-cols-2 row-cols-lg-5 g-2 g-lg-3">
  44. <div class="col-6">
  45. <div class="p-3 border bg-light">Row column</div>
  46. </div>
  47. <div class="col-6">
  48. <div class="p-3 border bg-light">Row column</div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div> -->
  55. <!-- <div id="home">
  56. {{ partial "components/carousel.html" . }}
  57. {{ partial "components/main.html" . }}
  58. {{ partial "components/serve.html" . }}
  59. {{ partial "components/ai-video.html" . }}
  60. {{ partial "components/progress.html" . }}
  61. {{ partial "LP_components/blogs_tab.html" . }}
  62. {{ partial "LP_components/action.html" . }}
  63. {{ partial "footer.html" . }}
  64. </div> -->
  65. <!-- {{ partial "nav.html" . }}
  66. {{ partial "LP_components/hero.html" . }}
  67. {{ partial "LP_components/video.html" . }}
  68. {{ partial "LP_components/use_cases.html" . }}
  69. {{ partial "LP_components/steps.html" . }}
  70. {{ partial "LP_components/features.html" . }}
  71. {{ partial "LP_components/blogs_tab.html" . }}
  72. {{ partial "LP_components/action.html" . }}
  73. {{ partial "LP_components/Footer.html" . }}
  74. {{ partial "LP_components/news.html" . }} -->
  75. </div>
  76. <!-- /#all -->
  77. {{ partial "components/scripts.html" . }}
  78. <script>
  79. $('#home_en').hide();
  80. localStorage.setItem('lang', 'cn'); // 預設為中文
  81. // 切換首頁語言
  82. function toggleLang() {
  83. let currentLang = localStorage.getItem('lang');
  84. if (currentLang === 'en') {
  85. localStorage.setItem('lang', 'cn');
  86. } else if (currentLang === 'cn') {
  87. localStorage.setItem('lang', 'en');
  88. }
  89. let lang = localStorage.getItem('lang');
  90. toggleTemplate(lang);
  91. }
  92. function toggleTemplate(lang) {
  93. if (lang === 'en') {
  94. $('.home-en').show();
  95. $('.home-cn').hide();
  96. } else {
  97. $('.home-en').hide();
  98. $('.home-cn').show();
  99. }
  100. $('html, body').animate({
  101. scrollTop: $(`.home-${lang}`).offset().top
  102. }, 0);
  103. }
  104. function tabLP() {
  105. if (('.m-tabs').length) {
  106. // Show the first tab by default
  107. $('.blog-tabs-stage>div').hide();
  108. $('.blog-tabs-stage>div:first').show();
  109. $('.blog-tabs-nav li:first').addClass('blog-tab-active');
  110. // Change tab class and display content
  111. $('.blog-tabs-nav a').on('click', function (event) {
  112. event.preventDefault();
  113. $('.blog-tabs-nav li').removeClass('blog-tab-active');
  114. $(this).parent().addClass('blog-tab-active');
  115. $('.blog-tabs-stage>div').hide();
  116. $($(this).attr('href')).show();
  117. });
  118. }
  119. }
  120. tabLP();
  121. function debounce(func, wait = 20, immediate = true) {
  122. var timeout;
  123. return function () {
  124. var context = this, args = arguments;
  125. var later = function () {
  126. timeout = null;
  127. if (!immediate) func.apply(context, args);
  128. };
  129. var callNow = immediate && !timeout;
  130. clearTimeout(timeout);
  131. timeout = setTimeout(later, wait);
  132. if (callNow) func.apply(context, args);
  133. };
  134. };
  135. const featuresBlock = document.querySelectorAll('.features-block');
  136. const featuresRow = document.querySelectorAll('.sec-features .row');
  137. function checkSlide() {
  138. featuresRow.forEach((block, i) => {
  139. // half way through the image
  140. const slideInAt = (window.scrollY + window.innerHeight) - block.offsetHeight / 2;
  141. // bottom of the image
  142. const isHalfShown = slideInAt > block.offsetTop;
  143. if (isHalfShown) {
  144. console.log('active');
  145. featuresBlock[i].classList.add('active');
  146. }
  147. });
  148. }
  149. window.addEventListener('scroll', debounce(checkSlide));
  150. var swiper = new Swiper(".carousel", {
  151. pagination: {
  152. el: ".swiper-pagination",
  153. clickable: true,
  154. },
  155. navigation: {
  156. nextEl: '.swiper-button-next',
  157. prevEl: '.swiper-button-prev',
  158. },
  159. loop: true,
  160. observer: true,
  161. observeParents: true,
  162. parallax: true,
  163. slidesPerView: 1,
  164. slidesPerGroup: 1,
  165. });
  166. let aiModal = new bootstrap.Modal(document.getElementById('aiModal')); // relatedTarget
  167. aiModal.show();
  168. </script>
  169. <!-- 進度條 -->
  170. <script src="../js/progress.js"></script>
  171. </body>
  172. </html>