index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <script setup>
  2. const { t, locale, setLocale } = useI18n()
  3. const { $$t } = useStoreI18n()
  4. const dataList = ref([
  5. {
  6. bg: '',
  7. abg: '',
  8. id: 'teacher0',
  9. wowDelay: '0.3s',
  10. img: '/picture/01.jpg',
  11. name: $$t('ariaLan'),
  12. tType: $$t('englishTeacher'),
  13. tType: $$t('chineseTeacher'),
  14. introduce: $$t('ariaLanIntroduce')
  15. },
  16. {
  17. bg: 'bg-2',
  18. abg: 'style-2',
  19. id: 'teacher1',
  20. wowDelay: '0.5s',
  21. img: '/picture/02.jpg',
  22. name: $$t('wendyChen'),
  23. tType: $$t('chineseTeacher'),
  24. subSchool: '',
  25. introduce: $$t('wendyChenIntroduce')
  26. },
  27. {
  28. bg: 'bg-3',
  29. abg: 'style-3',
  30. id: 'teacher2',
  31. wowDelay: '0.7s',
  32. img: '/picture/03.jpg',
  33. name: $$t('aspenChou'),
  34. tType: $$t('chineseTeacher'),
  35. subSchool: '',
  36. introduce: $$t('aspenChouIntroduce')
  37. },
  38. {
  39. bg: 'bg-3',
  40. abg: 'style-3',
  41. id: 'teacher3',
  42. wowDelay: '0.7s',
  43. img: '/picture/04.jpg',
  44. name: $$t('oliviaHuang'),
  45. tType: $$t('englishTeacher'),
  46. subSchool: '',
  47. introduce: $$t('oliviaHuangIntroduce')
  48. }
  49. ])
  50. </script>
  51. <style lang="css" scoped>
  52. .multi-line {
  53. overflow: hidden;
  54. display: -webkit-box;
  55. -webkit-box-orient: vertical;
  56. }
  57. .h-color {
  58. color: white;
  59. }
  60. .clamp-1 {
  61. -webkit-line-clamp: 1;
  62. }
  63. .clamp-2 {
  64. -webkit-line-clamp: 2;
  65. }
  66. .clamp-3 {
  67. -webkit-line-clamp: 3;
  68. }
  69. .left-social-profile {
  70. position: absolute;
  71. left: 20px;
  72. top: 20px;
  73. z-index: 20;
  74. width: 40px;
  75. height: 40px;
  76. border: 1px solid white;
  77. border-radius: 50%;
  78. display: flex;
  79. justify-content: center;
  80. align-items: center;
  81. cursor: pointer;
  82. }
  83. .left-social-profile div {
  84. width: 24px;
  85. height: 24px;
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. cursor: pointer;
  90. }
  91. .left-social-profile div img {
  92. object-fit: cover;
  93. cursor: pointer;
  94. }
  95. .introduce {
  96. position: absolute;
  97. width: 100%;
  98. height: 100%;
  99. left: 0;
  100. top: 0;
  101. z-index: 20;
  102. box-sizing: border-box;
  103. padding: 1rem 1.25rem;
  104. overflow-y: auto;
  105. color: white;
  106. background: rgba(0, 0, 0, 0.4);
  107. border-radius: 12px;
  108. -ms-overflow-style: none; /* IE 和 Edge */
  109. scrollbar-width: none;
  110. transition: all 0.1s ease-in-out;
  111. display: none;
  112. cursor: pointer;
  113. }
  114. .introduce::-webkit-scrollbar {
  115. width: 0px; /* Chrome, Safari 和 Opera */
  116. }
  117. .team-image:hover > .introduce {
  118. display: block;
  119. }
  120. .introduce:hover {
  121. display: block;
  122. }
  123. .bgCover {
  124. width: 100%;
  125. height: auto;
  126. object-fit: contain;
  127. }
  128. </style>
  129. <template>
  130. <section class="team-section fix section-bg section-padding">
  131. <div class="top-shape">
  132. <img class="bgCover" src="/picture/section-top-shape.svg" alt="shape-img" />
  133. </div>
  134. <div class="love-shape float-bob-x"><img src="/picture/love.png" alt="shape-img" /></div>
  135. <div class="frame-shape"><img src="/picture/frame.png" alt="shape-img" /></div>
  136. <div class="container">
  137. <div class="section-title-area">
  138. <div class="section-title mt-60">
  139. <span class="wow fadeInUp">{{ t('ourExperts') }}</span>
  140. <h2 class="wow fadeInUp" data-wow-delay=".3s">{{ t('ourExpertInstructors') }}</h2>
  141. </div>
  142. </div>
  143. <div class="row">
  144. <template v-for="(item, index) in dataList" :key="item?.id">
  145. <div class="col-xl-3 col-lg-6 col-md-6 wow fadeInUp" :data-wow-delay="item?.wowDelay">
  146. <div class="swiper-slide">
  147. <div class="team-items">
  148. <div style="overflow: hidden" class="team-image">
  149. <div class="shape-img">
  150. <img src="/picture/team-shape.png" alt="img" />
  151. </div>
  152. <img :src="item?.img" alt="team-img" />
  153. <div class="introduce">
  154. <p class="fs-5 text-white text-center pb-2">{{ item?.name }}</p>
  155. <p v-html="item?.introduce"></p>
  156. </div>
  157. </div>
  158. <div class="team-content">
  159. <h3>
  160. <a href="team-details.html">{{ item?.name }}</a>
  161. </h3>
  162. <p>{{ item?.tType }}</p>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. </template>
  168. </div>
  169. </div>
  170. </section>
  171. </template>