TrustCompanie.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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: #c3e5e7">{{ 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. });
  68. const goPrevious = () => {
  69. carousel.value.prev();
  70. };
  71. const goNext = () => {
  72. carousel.value.next();
  73. };
  74. </script>
  75. <style scoped>
  76. .v-row {
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. max-width: 1300px;
  81. margin-right: auto;
  82. margin-left: auto;
  83. }
  84. .carousel-button i {
  85. color: black;
  86. }
  87. .carousel-button {
  88. display: flex;
  89. justify-content: center;
  90. align-items: center;
  91. width: 60px;
  92. height: 60px;
  93. background-color: transparent;
  94. border: 2px solid black;
  95. cursor: pointer;
  96. margin-right: 1rem;
  97. margin-top: 1rem;
  98. }
  99. .card-img {
  100. height: 10rem;
  101. width: 10rem;
  102. margin-left: auto;
  103. margin-right: auto;
  104. margin-top: 2rem;
  105. margin-bottom: 2rem;
  106. }
  107. .carousel {
  108. background-color: white;
  109. margin-top: 2rem;
  110. border-radius: 20px;
  111. margin-left: auto;
  112. margin-right: auto;
  113. box-shadow: #071b1f;
  114. }
  115. .title {
  116. margin-bottom: 2rem;
  117. font-style: normal;
  118. text-align: center;
  119. color: black;
  120. font-weight: 600;
  121. font-size: 42px;
  122. line-height: 42px;
  123. text-align: center;
  124. color: #0e2d32;
  125. width: 50%;
  126. }
  127. </style>