Fonctionnalite.client.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <LayoutContainer>
  3. <v-row class="center-90">
  4. <v-col cols="12" md="12">
  5. <LayoutUISubTitle>
  6. Découvrez toutes les fonctionnalités de notre solution
  7. </LayoutUISubTitle>
  8. <LayoutUITitle>
  9. Des fonctionnalités adaptées à vos besoins
  10. </LayoutUITitle>
  11. </v-col>
  12. <v-col cols="12" md="12" class="arrows">
  13. <v-btn icon="fas fa-chevron-left" aria-label="Précédent" @click="previousAction" />
  14. <v-btn icon="fas fa-chevron-right" aria-label="Suivant" @click="nextAction" />
  15. </v-col>
  16. </v-row>
  17. <v-row>
  18. <v-col cols="12">
  19. <Carousel
  20. ref="carousel"
  21. :items-to-show="itemsToShow"
  22. :items-to-scroll="1"
  23. :wrap-around="true"
  24. >
  25. <Slide v-for="(card, index) in cards" :key="index">
  26. <div class="card-container">
  27. <v-card class="inv-theme">
  28. <v-img :src="card.logo" :alt="card.title" class="mx-auto" />
  29. <v-card-title>
  30. <h5>
  31. {{ card.title }}
  32. </h5>
  33. </v-card-title>
  34. <v-card-item>
  35. <v-card-text>
  36. <ul>
  37. <li v-for="item in card.list" :key="item">
  38. <p>{{ item }}</p>
  39. </li>
  40. </ul>
  41. </v-card-text>
  42. </v-card-item>
  43. <div class="footer">
  44. <p v-for="option in card.options" :key="option">
  45. {{ option }}
  46. </p>
  47. </div>
  48. </v-card>
  49. </div>
  50. </Slide>
  51. </Carousel>
  52. </v-col>
  53. </v-row>
  54. </LayoutContainer>
  55. </template>
  56. <script setup lang="ts">
  57. import { useDisplay } from 'vuetify'
  58. import { Carousel, Slide } from 'vue3-carousel'
  59. import 'vue3-carousel/dist/carousel.css'
  60. import type { PropType, Ref } from 'vue'
  61. import type { Functionality } from '~/types/interface'
  62. const { lgAndUp, mdAndUp, smAndUp } = useDisplay()
  63. defineProps({
  64. cards: {
  65. type: Array as PropType<Array<Functionality>>,
  66. required: true,
  67. },
  68. })
  69. const carousel: Ref<typeof Carousel | null> = ref(null)
  70. const itemsToShow = computed(() =>
  71. lgAndUp.value ? 5 : mdAndUp.value ? 3 : smAndUp.value ? 2 : 1
  72. )
  73. const nextAction = () => {
  74. carousel.value!.next()
  75. }
  76. const previousAction = () => {
  77. carousel.value!.prev()
  78. }
  79. </script>
  80. <style scoped lang="scss">
  81. h5 {
  82. text-align: center;
  83. }
  84. .v-row {
  85. width: 95%;
  86. margin-left: auto;
  87. margin-right: auto;
  88. }
  89. .v-btn {
  90. width: 60px;
  91. height: 60px;
  92. background-color: transparent;
  93. color: var(--on-primary-color);
  94. border: 2px solid;
  95. border-color: var(--on-primary-color);
  96. cursor: pointer;
  97. border-radius: 0;
  98. margin: 6px;
  99. }
  100. .carousel {
  101. margin-left: 2rem;
  102. margin-right: 2rem;
  103. margin-bottom: 2rem;
  104. }
  105. .card-container {
  106. display: flex;
  107. justify-content: center;
  108. align-items: center;
  109. margin-right: 2rem;
  110. width: 100%;
  111. height: 100%;
  112. }
  113. .v-card {
  114. border-radius: 1rem;
  115. transition: transform 0.3s;
  116. font-weight: 300;
  117. width: 100%;
  118. height: 100%;
  119. padding: 0 10% 14px 10%;
  120. .v-img {
  121. width: 5rem;
  122. height: 3rem;
  123. margin-top: 1rem;
  124. margin-bottom: 12px;
  125. fill: #fac20a !important;
  126. }
  127. .v-card-title {
  128. white-space: pre-wrap;
  129. }
  130. .v-card-item {
  131. text-align: left;
  132. }
  133. li {
  134. font-weight: 300;
  135. font-size: 0.9rem;
  136. line-height: 1.2rem;
  137. margin-bottom: 1rem;
  138. color: var(--on-neutral-color);
  139. }
  140. .footer {
  141. position: absolute;
  142. left: 0;
  143. bottom: 1rem;
  144. margin-left: 1.3rem;
  145. font-size: 0.9rem;
  146. p {
  147. text-align: left;
  148. }
  149. }
  150. }
  151. .arrows {
  152. display: flex;
  153. align-content: center;
  154. justify-content: center;
  155. @media (max-width: 600px) {
  156. justify-content: center;
  157. }
  158. }
  159. </style>