ReviewSection.vue 4.3 KB

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