ReviewCard.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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. import { ref } from "vue";
  59. const carousel = ref(null);
  60. const goPrevious = () => {
  61. carousel.value.prev();
  62. };
  63. const goNext = () => {
  64. carousel.value.next();
  65. };
  66. const props = defineProps({
  67. cards: {
  68. type: Array,
  69. required: true,
  70. },
  71. });
  72. </script>
  73. <style scoped>
  74. .custom-row {
  75. width: 90%;
  76. margin-left: auto;
  77. margin-right: auto;
  78. }
  79. .v-container {
  80. padding: 0 !important;
  81. }
  82. .carousel-button {
  83. display: flex;
  84. justify-content: center;
  85. align-items: center;
  86. width: 60px;
  87. height: 60px;
  88. background-color: transparent;
  89. border: 2px solid #fff;
  90. cursor: pointer;
  91. margin-right: 1rem;
  92. margin-bottom: 2rem;
  93. }
  94. .carousel-button i {
  95. color: #fff;
  96. }
  97. .reviewer-name {
  98. font-weight: 500;
  99. font-size: 20px;
  100. line-height: 24px;
  101. color: rgba(32, 147, 190);
  102. margin-top: 5rem;
  103. text-align: justify !important;
  104. }
  105. .reviewer-status {
  106. font-weight: 600;
  107. font-size: 12px;
  108. line-height: 16px;
  109. display: flex;
  110. align-items: center;
  111. letter-spacing: 0.18em;
  112. text-transform: uppercase;
  113. text-align: justify !important;
  114. }
  115. .reviewer-structure {
  116. font-weight: 300;
  117. font-size: 0.8rem;
  118. line-height: 14px;
  119. display: flex;
  120. align-items: center;
  121. margin-bottom: 1rem;
  122. }
  123. .card-footer {
  124. min-height: 100px;
  125. display: flex;
  126. flex-direction: column;
  127. justify-content: center;
  128. align-items: center;
  129. margin-top: 1rem;
  130. }
  131. .reviews-title {
  132. font-size: 2rem;
  133. font-weight: 700;
  134. color: #fff;
  135. font-weight: 600;
  136. font-size: 42px;
  137. line-height: 42px;
  138. margin-left: 1rem;
  139. margin-right: 1rem;
  140. margin-top: 3rem;
  141. text-align: center;
  142. }
  143. @media (min-width:2100px) {
  144. .review-description {
  145. min-height: 150px !important;
  146. max-height: 150px !important;
  147. }
  148. .v-card {
  149. min-height: 360px !important;
  150. max-height: 360px !important;
  151. }
  152. }
  153. .card {
  154. margin-left: 0.5rem;
  155. border-radius: 1rem;
  156. }
  157. .review-description {
  158. text-align: justify;
  159. min-height: 200px;
  160. max-height: 200px;
  161. overflow: auto;
  162. font-size: 0.9rem;
  163. }
  164. .v-card {
  165. border-radius: 1rem;
  166. min-height: 450px;
  167. max-height: 450px;
  168. margin-top: 2rem;
  169. margin-bottom: 0.6rem;
  170. }
  171. .card-container {
  172. display: flex;
  173. flex-direction: column;
  174. justify-content: space-between;
  175. height: 100%;
  176. }
  177. .container-green {
  178. background-color: #0e2d32;
  179. }
  180. </style>