Fonctionnalite.vue 4.4 KB

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