Fonctionnalite.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <template>
  2. <div id="Fonctionnalites">
  3. <LayoutContainer>
  4. <div class="container-green" v-if="!mdAndDown">
  5. <v-row>
  6. <v-col cols="12">
  7. <div class="d-flex justify-center align-center">
  8. <div class="carousel-button" @click="previousAction">
  9. <i class="fas fa-chevron-left" />
  10. </div>
  11. <div class="carousel-button" @click="nextAction">
  12. <i class="fas fa-chevron-right" />
  13. </div>
  14. </div>
  15. </v-col>
  16. </v-row>
  17. <v-row>
  18. <v-col cols="12">
  19. <Carousel
  20. ref="functionCarousel"
  21. class="carousel"
  22. items-to-show="5"
  23. items-to-scroll="1"
  24. >
  25. <Slide
  26. v-for="(card, index) in cards"
  27. :key="index"
  28. :class="{
  29. card: true,
  30. 'active-card': index === activeCardIndex,
  31. }"
  32. >
  33. <v-card>
  34. <v-row>
  35. <v-img
  36. :src="card.logo"
  37. alt=""
  38. class="justify-center logo-fonctionnalite mt-4 mb-4"
  39. />
  40. </v-row>
  41. <v-card-title>
  42. <h4 class="card-title">{{ card.title }}</h4>
  43. </v-card-title>
  44. <v-card-item>
  45. <v-card-text class="review-description">
  46. <ul>
  47. <li class="list-detail" v-for="item in card.list" :key="item">
  48. {{ item }}
  49. </li>
  50. </ul>
  51. </v-card-text>
  52. <div class="card-footer">
  53. <p class="reviewer-structure">
  54. {{ card.option }}
  55. </p>
  56. </div>
  57. </v-card-item>
  58. </v-card>
  59. </Slide>
  60. </Carousel>
  61. </v-col>
  62. </v-row>
  63. </div>
  64. </LayoutContainer>
  65. </div>
  66. </template>
  67. <script setup>
  68. import { ref, computed } from 'vue';
  69. import { Carousel, Slide } from 'vue3-carousel';
  70. import 'vue3-carousel/dist/carousel.css';
  71. import { useDisplay } from 'vuetify/lib/framework.mjs';
  72. const props = defineProps({
  73. cards: Array,
  74. itemsToScroll: {
  75. type: Number,
  76. default: 1,
  77. },
  78. itemsToShow: {
  79. type: Number,
  80. default: 5,
  81. },
  82. });
  83. const { width, mdAndDown } = useDisplay();
  84. const functionCarousel = ref(null);
  85. const activeCardIndex = ref(0);
  86. const itemsToShow = computed(() => {
  87. if (width.value >= 1280 && width.value <= 1920) {
  88. return 3;
  89. } else if (width.value > 1920) {
  90. return 6;
  91. }
  92. return props.itemsToShow;
  93. });
  94. const nextAction = () => {
  95. functionCarousel.value.next();
  96. };
  97. const previousAction = () => {
  98. functionCarousel.value.prev();
  99. };
  100. </script>
  101. <style scoped>
  102. .v-card-title-container {
  103. display: flex;
  104. flex-direction: row;
  105. }
  106. .logo-fonctionnalite {
  107. width: 5rem;
  108. height: 5rem;
  109. }
  110. .list-detail {
  111. font-weight: 300;
  112. font-size: 1.2rem;
  113. line-height: 1.2rem;
  114. margin-bottom: 1rem;
  115. color: #000000;
  116. width: 100%;
  117. }
  118. .card-title {
  119. white-space: pre-wrap;
  120. font-size: 1.1rem;
  121. }
  122. .carousel {
  123. margin-left: 2rem;
  124. margin-right: 2rem;
  125. }
  126. .card.active-card {
  127. }
  128. .title-container {
  129. display: flex;
  130. align-items: center;
  131. }
  132. .subtitle-avantage {
  133. font-weight: 600;
  134. font-size: 3rem;
  135. line-height: 18px;
  136. color: white;
  137. }
  138. .subtitle {
  139. color: white;
  140. font-size: 1rem;
  141. font-weight: 600;
  142. line-height: 15px;
  143. letter-spacing: 1.8px;
  144. text-transform: uppercase;
  145. }
  146. .icon-title {
  147. color: rgba(32, 147, 190, 0.6);
  148. margin-right: 0.5rem;
  149. }
  150. .card {
  151. font-weight: 300;
  152. transition: transform 0.3s;
  153. min-width: 30%;
  154. max-width: 30%;
  155. }
  156. .card.active-card {
  157. transform: scale(1.05);
  158. }
  159. .carousel-button {
  160. display: flex;
  161. justify-content: center;
  162. align-items: center;
  163. width: 4rem;
  164. height: 4rem;
  165. background-color: transparent;
  166. border: 2px solid #fff;
  167. cursor: pointer;
  168. margin-right: 1rem;
  169. margin-top: 1rem;
  170. }
  171. .carousel-button i {
  172. color: #fff;
  173. cursor: pointer;
  174. }
  175. .reviewer-name {
  176. font-weight: 500;
  177. font-size: 20px;
  178. line-height: 24px;
  179. color: rgba(32, 147, 190);
  180. }
  181. .reviewer-status {
  182. font-weight: 600;
  183. font-size: 12px;
  184. line-height: 16px;
  185. display: flex;
  186. align-items: center;
  187. letter-spacing: 0.18em;
  188. text-transform: uppercase;
  189. }
  190. .reviewer-structure {
  191. font-weight: 300;
  192. font-size: 0.8rem;
  193. line-height: 14px;
  194. display: flex;
  195. align-items: center;
  196. margin-bottom: 1rem;
  197. color: #071b1f;
  198. }
  199. .review-description {
  200. text-align: left;
  201. }
  202. .card-footer {
  203. position: absolute;
  204. right: 0;
  205. margin-right: 2rem;
  206. }
  207. .card-text {
  208. font-weight: 300;
  209. font-size: 1rem;
  210. line-height: 1rem;
  211. height: 12rem;
  212. }
  213. .reviews-title {
  214. color: #fff;
  215. font-size: 1rem;
  216. font-weight: 600;
  217. line-height: 15px;
  218. letter-spacing: 1.8px;
  219. text-transform: uppercase;
  220. margin-left: 1rem;
  221. width: 10rem;
  222. }
  223. .card {
  224. min-height: 35rem;
  225. max-height: 35rem;
  226. border-radius: 1rem;
  227. }
  228. .v-card {
  229. border-radius: 1rem;
  230. min-height: 25rem;
  231. max-width: 20rem;
  232. min-width: 20rem;
  233. }
  234. .card-container {
  235. display: flex;
  236. justify-content: center;
  237. align-items: center;
  238. margin-bottom: 3rem;
  239. margin-right: 2rem;
  240. }
  241. .container-green {
  242. background-color: #0e2d32;
  243. }
  244. </style>