ReviewCard.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <template>
  2. <LayoutContainer>
  3. <div class="container-green">
  4. <v-row class="custom-row">
  5. <v-col cols="3">
  6. <div
  7. style="
  8. display: flex;
  9. flex-direction: column;
  10. justify-content: space-between;
  11. height: 100%;
  12. "
  13. >
  14. <h3 class="reviews-title">Ce sont eux qui en parlent le mieux</h3>
  15. <div class="d-flex justify-center align-center">
  16. <div class="carousel-button" @click="goPrevious">
  17. <i class="fas fa-chevron-left" />
  18. </div>
  19. <div class="carousel-button" @click="goNext">
  20. <i class="fas fa-chevron-right" />
  21. </div>
  22. </div>
  23. </div>
  24. </v-col>
  25. <v-col cols="9">
  26. <Carousel ref="carousel" :items-to-show="3" :items-to-scroll="1" :wrap-around="true">
  27. <Slide v-for="(card, index) in cards" :key="index" class="card">
  28. <v-container>
  29. <v-card>
  30. <v-card-item class="card-container">
  31. <v-card-text class="review-description">
  32. {{ card.description }}
  33. </v-card-text>
  34. <div class="card-footer">
  35. <v-card-actions class="reviewer-name">
  36. {{ card.name }}
  37. </v-card-actions>
  38. <p class="reviewer-status">
  39. {{ card.status }}
  40. </p>
  41. <p class="reviewer-structure">
  42. {{ card.structure }}
  43. </p>
  44. </div>
  45. </v-card-item>
  46. </v-card>
  47. </v-container>
  48. </Slide>
  49. </Carousel>
  50. </v-col>
  51. </v-row>
  52. </div>
  53. </LayoutContainer>
  54. </template>
  55. <script setup>
  56. import { Carousel, Slide } from "vue3-carousel";
  57. import "vue3-carousel/dist/carousel.css";
  58. const carousel = ref(null);
  59. const goPrevious = () => {
  60. carousel.value.prev();
  61. };
  62. const goNext = () => {
  63. carousel.value.next();
  64. };
  65. const props = defineProps({
  66. cards: {
  67. type: Array,
  68. required: true,
  69. },
  70. });
  71. </script>
  72. <style scoped>
  73. .custom-row {
  74. width: 90%;
  75. margin-left: auto;
  76. margin-right: auto;
  77. }
  78. .v-container {
  79. padding: 0 !important;
  80. }
  81. .carousel-button {
  82. display: flex;
  83. justify-content: center;
  84. align-items: center;
  85. width: 60px;
  86. height: 60px;
  87. background-color: transparent;
  88. border: 2px solid #fff;
  89. cursor: pointer;
  90. margin-right: 1rem;
  91. margin-bottom: 2rem;
  92. }
  93. .carousel-button i {
  94. color: #fff;
  95. }
  96. .reviewer-name {
  97. font-weight: 500;
  98. font-size: 20px;
  99. line-height: 24px;
  100. color: rgba(32, 147, 190);
  101. margin-top: 5rem;
  102. text-align: justify !important;
  103. }
  104. .reviewer-status {
  105. font-weight: 600;
  106. font-size: 12px;
  107. line-height: 16px;
  108. display: flex;
  109. align-items: center;
  110. letter-spacing: 0.18em;
  111. text-transform: uppercase;
  112. text-align: justify !important;
  113. }
  114. .reviewer-structure {
  115. font-weight: 300;
  116. font-size: 0.8rem;
  117. line-height: 14px;
  118. display: flex;
  119. align-items: center;
  120. margin-bottom: 1rem;
  121. }
  122. .card-footer {
  123. min-height: 100px;
  124. display: flex;
  125. flex-direction: column;
  126. justify-content: center;
  127. align-items: center;
  128. margin-top: 1rem;
  129. }
  130. .reviews-title {
  131. font-size: 2rem;
  132. font-weight: 700;
  133. color: #fff;
  134. font-weight: 600;
  135. font-size: 42px;
  136. line-height: 42px;
  137. margin-left: 1rem;
  138. margin-right: 1rem;
  139. margin-top: 3rem;
  140. text-align: center;
  141. }
  142. @media (min-width:2100px) {
  143. .review-description {
  144. min-height: 150px !important;
  145. max-height: 150px !important;
  146. }
  147. .v-card {
  148. min-height: 360px !important;
  149. max-height: 360px !important;
  150. }
  151. }
  152. .card {
  153. margin-left: 0.5rem;
  154. border-radius: 1rem;
  155. }
  156. .review-description {
  157. text-align: justify;
  158. min-height: 200px;
  159. max-height: 200px;
  160. overflow: auto;
  161. font-size: 0.9rem;
  162. }
  163. .v-card {
  164. border-radius: 1rem;
  165. min-height: 450px;
  166. max-height: 450px;
  167. margin-top: 2rem;
  168. margin-bottom: 0.6rem;
  169. }
  170. .card-container {
  171. display: flex;
  172. flex-direction: column;
  173. justify-content: space-between;
  174. height: 100%;
  175. }
  176. .container-green {
  177. background-color: #0e2d32;
  178. }
  179. </style>