Fonctionnalite.client.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <LayoutContainer>
  3. <v-row class="center-90">
  4. <v-col cols="12">
  5. <LayoutUISubTitle class="title">
  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. .title {
  94. margin-left: -12px;
  95. }
  96. .v-row {
  97. width: 95%;
  98. margin-left: auto;
  99. margin-right: auto;
  100. }
  101. .v-btn {
  102. width: 60px;
  103. height: 60px;
  104. background-color: transparent;
  105. color: var(--on-primary-color);
  106. border: 2px solid;
  107. border-color: var(--on-primary-color);
  108. cursor: pointer;
  109. border-radius: 0;
  110. margin: 6px;
  111. }
  112. .carousel {
  113. margin-left: 2rem;
  114. margin-right: 2rem;
  115. margin-bottom: 2rem;
  116. }
  117. .card-container {
  118. display: flex;
  119. justify-content: center;
  120. align-items: center;
  121. margin-right: 2rem;
  122. width: 100%;
  123. height: 100%;
  124. }
  125. .v-card {
  126. border-radius: 1rem;
  127. transition: transform 0.3s;
  128. font-weight: 300;
  129. width: 100%;
  130. height: 100%;
  131. padding: 0 10% 14px 10%;
  132. .v-img {
  133. width: 5rem;
  134. height: 3rem;
  135. margin-top: 1rem;
  136. margin-bottom: 12px;
  137. fill: #fac20a !important;
  138. }
  139. .v-card-title {
  140. white-space: pre-wrap;
  141. }
  142. .v-card-item {
  143. text-align: left;
  144. }
  145. li {
  146. font-weight: 300;
  147. font-size: 0.9rem;
  148. line-height: 1.2rem;
  149. margin-bottom: 1rem;
  150. color: var(--on-neutral-color);
  151. }
  152. .footer {
  153. position: absolute;
  154. left: 0;
  155. bottom: 1rem;
  156. margin-left: 1.3rem;
  157. font-size: 0.9rem;
  158. p {
  159. text-align: left;
  160. }
  161. }
  162. }
  163. .arrows {
  164. display: flex;
  165. align-content: center;
  166. justify-content: center;
  167. @media (max-width: 600px) {
  168. justify-content: center;
  169. }
  170. }
  171. </style>