TrustCompanie.vue 2.6 KB

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