Fonctionnalite.client.vue 3.9 KB

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