index.html 6.3 KB

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