index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <script setup>
  2. const { t } = useI18n()
  3. const { $$t } = useStoreI18n()
  4. const dataList = ref([
  5. {
  6. bg: '',
  7. abg: 'abg1',
  8. id: 'Beginning',
  9. wowDelay: '0.3s',
  10. img: '/picture/012.png',
  11. title: $$t('beginning'),
  12. ageBracket: $$t('ageBracket', ['6-9']),
  13. subTitle: $$t('beginningSubTitle')
  14. },
  15. {
  16. bg: 'bg-2',
  17. abg: '',
  18. id: 'Growing',
  19. wowDelay: '0.5s',
  20. img: '/picture/021.png',
  21. title: $$t('growing'),
  22. ageBracket: $$t('ageBracket', ['6-12']),
  23. subTitle: $$t('growingSubTitle')
  24. },
  25. {
  26. bg: 'bg-5',
  27. abg: 'abg3',
  28. id: 'DrawingClass',
  29. wowDelay: '0.7s',
  30. img: '/picture/082.png',
  31. title: $$t('breaking'),
  32. ageBracket: $$t('ageBracket', ['9-15']),
  33. subTitle: $$t('drawingClassSubTitle')
  34. },
  35. {
  36. bg: 'bg-6',
  37. abg: 'abg4',
  38. id: 'Expanding',
  39. wowDelay: '0.9s',
  40. img: '/picture/083.png',
  41. title: $$t('expanding'),
  42. ageBracket: $$t('ageBracket', ['12-18']),
  43. subTitle: $$t('expandingSubTitle')
  44. }
  45. ])
  46. </script>
  47. <style lang="css" scoped>
  48. .multi-line {
  49. overflow: hidden;
  50. display: -webkit-box;
  51. -webkit-box-orient: vertical;
  52. }
  53. .h-color {
  54. color: white;
  55. }
  56. .clamp-1 {
  57. -webkit-line-clamp: 1;
  58. }
  59. .clamp-2 {
  60. -webkit-line-clamp: 2;
  61. }
  62. ::v-deep .abg1 {
  63. background-color: #70a6b1 !important;
  64. }
  65. ::v-deep .abg3 {
  66. background: #5866eb !important;
  67. }
  68. ::v-deep .abg4 {
  69. background: #f25334 !important;
  70. }
  71. ::v-deep .abg1:hover {
  72. background-color: #385469 !important;
  73. }
  74. ::v-deep .abg3:hover {
  75. background-color: #385469 !important;
  76. }
  77. ::v-deep .abg4:hover {
  78. background-color: #385469 !important;
  79. }
  80. </style>
  81. <template>
  82. <div class="row">
  83. <template v-for="(item, index) in dataList" :key="item?.id">
  84. <div class="col-xl-3 col-lg-6 col-md-6 wow fadeInUp" :data-wow-delay="item?.wowDelay">
  85. <div class="program-box-items">
  86. <div :class="`program-bg ${item?.bg}`"></div>
  87. <div class="program-image">
  88. <img :src="item?.img" alt="img" />
  89. </div>
  90. <div class="program-content text-center">
  91. <h4 class="multi-line clamp-1 h-color">
  92. {{ item?.title }}
  93. </h4>
  94. <span>({{ item?.ageBracket }})</span>
  95. <p :title="item?.subTitle" class="multi-line clamp-2">
  96. {{ item?.subTitle }}
  97. </p>
  98. <!-- program-details.html -->
  99. <a href="javascript:(0)" :class="`arrow-icon ${item?.abg}`">
  100. <i class="fa-solid fa-arrow-right"></i>
  101. </a>
  102. </div>
  103. </div>
  104. </div>
  105. </template>
  106. </div>
  107. </template>