TrustCompanie.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <template>
  2. <LayoutContainer>
  3. <v-row justify="center">
  4. <h2 class="title text-center" :style="{ color: titleColor }">
  5. Plus de&nbsp;
  6. <span :style="{ color: structureCountColor }">{{ structureCount }}</span
  7. >&nbsp; {{ trustMessage }}
  8. </h2>
  9. </v-row>
  10. <v-row justify="center"> </v-row>
  11. <v-container>
  12. <v-row>
  13. <div
  14. class="carousel-button"
  15. @click="goPrevious"
  16. :style="{
  17. 'border-color': carouselBorderColor,
  18. color: carouselButtonColor,
  19. }"
  20. >
  21. <i class="fas fa-chevron-left" :style="{ color: iconColor }" />
  22. </div>
  23. <Carousel
  24. ref="carousel"
  25. class="carrousel elevation-4 mb-12"
  26. :items-to-show="4"
  27. :items-to-scroll="2"
  28. >
  29. <Slide v-for="(item, index) in items" :key="index">
  30. <div class="card">
  31. <v-img class="card-img" :src="item.src" alt="Card image cap" />
  32. </div>
  33. </Slide>
  34. </Carousel>
  35. <div
  36. class="carousel-button"
  37. @click="goNext"
  38. :style="{
  39. 'border-color': carouselBorderColor,
  40. color: carouselButtonColor,
  41. }"
  42. >
  43. <i class="fas fa-chevron-right" :style="{ color: iconColor }" />
  44. </div>
  45. </v-row>
  46. </v-container>
  47. </LayoutContainer>
  48. </template>
  49. <script setup>
  50. import { ref } from "vue";
  51. import { Carousel, Slide } from "vue3-carousel";
  52. const carousel = ref(null);
  53. const props = defineProps({
  54. titleColor: String,
  55. carouselButtonColor: String,
  56. carouselBorderColor: String,
  57. items: Array,
  58. iconColor: String,
  59. trustMessage: {
  60. type: String,
  61. default: "nous font confiance",
  62. },
  63. structureCount: {
  64. type: String,
  65. default: "5000 structures",
  66. },
  67. structureCountColor: {
  68. type: String,
  69. default: "#c3e5e7",
  70. },
  71. });
  72. const goPrevious = () => {
  73. carousel.value.prev();
  74. };
  75. const goNext = () => {
  76. carousel.value.next();
  77. };
  78. </script>
  79. <style scoped>
  80. .v-row {
  81. display: flex;
  82. align-items: center;
  83. justify-content: center;
  84. max-width: 1300px;
  85. margin-right: auto;
  86. margin-left: auto;
  87. }
  88. .carousel-button i {
  89. color: black;
  90. }
  91. .carousel-button {
  92. display: flex;
  93. justify-content: center;
  94. align-items: center;
  95. width: 60px;
  96. height: 60px;
  97. background-color: transparent;
  98. border: 2px solid black;
  99. cursor: pointer;
  100. margin-right: 1rem;
  101. margin-top: 1rem;
  102. }
  103. .card-img {
  104. height: 10rem;
  105. width: 10rem;
  106. margin-left: auto;
  107. margin-right: auto;
  108. margin-top: 2rem;
  109. margin-bottom: 2rem;
  110. }
  111. .carousel {
  112. background-color: white;
  113. margin-top: 2rem;
  114. border-radius: 20px;
  115. margin-left: auto;
  116. margin-right: auto;
  117. box-shadow: #071b1f;
  118. }
  119. .title {
  120. margin-bottom: 2rem;
  121. font-style: normal;
  122. text-align: center;
  123. color: black;
  124. font-weight: 600;
  125. font-size: 42px;
  126. line-height: 42px;
  127. text-align: center;
  128. color: #0e2d32;
  129. width: 50%;
  130. }
  131. </style>