| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <template>
- <LayoutContainer>
- <v-row justify="center">
- <h2 class="title text-center" :style="{ color: titleColor }">
- Plus de
- <span style="color: #c3e5e7">{{ structureCount }}</span
- > {{ trustMessage }}
- </h2>
- </v-row>
- <v-row justify="center"> </v-row>
- <v-container>
- <v-row>
- <div
- class="carousel-button"
- @click="goPrevious"
- :style="{
- 'border-color': carouselBorderColor,
- color: carouselButtonColor,
- }"
- >
- <i class="fas fa-chevron-left" :style="{ color: iconColor }" />
- </div>
- <Carousel
- ref="carousel"
- class="carrousel elevation-4 mb-12"
- :items-to-show="4"
- :items-to-scroll="2"
- >
- <Slide v-for="(item, index) in items" :key="index">
- <div class="card">
- <v-img class="card-img" :src="item.src" alt="Card image cap" />
- </div>
- </Slide>
- </Carousel>
- <div
- class="carousel-button"
- @click="goNext"
- :style="{
- 'border-color': carouselBorderColor,
- color: carouselButtonColor,
- }"
- >
- <i class="fas fa-chevron-right" :style="{ color: iconColor }" />
- </div>
- </v-row>
- </v-container>
- </LayoutContainer>
- </template>
- <script setup>
- import { ref } from "vue";
- import { Carousel, Slide } from "vue3-carousel";
- const carousel = ref(null);
- const props = defineProps({
- titleColor: String,
- carouselButtonColor: String,
- carouselBorderColor: String,
- items: Array,
- iconColor: String,
- trustMessage: {
- type: String,
- default: "nous font confiance",
- },
- structureCount: {
- type: String,
- default: "5000 structures",
- },
- });
- const goPrevious = () => {
- carousel.value.prev();
- };
- const goNext = () => {
- carousel.value.next();
- };
- </script>
- <style scoped>
- .v-row {
- display: flex;
- align-items: center;
- justify-content: center;
- max-width: 1300px;
- margin-right: auto;
- margin-left: auto;
- }
- .carousel-button i {
- color: black;
- }
- .carousel-button {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 60px;
- height: 60px;
- background-color: transparent;
- border: 2px solid black;
- cursor: pointer;
- margin-right: 1rem;
- margin-top: 1rem;
- }
- .card-img {
- height: 10rem;
- width: 10rem;
- margin-left: auto;
- margin-right: auto;
- margin-top: 2rem;
- margin-bottom: 2rem;
- }
- .carousel {
- background-color: white;
- margin-top: 2rem;
- border-radius: 20px;
- margin-left: auto;
- margin-right: auto;
- box-shadow: #071b1f;
- }
- .title {
- margin-bottom: 2rem;
- font-style: normal;
- text-align: center;
- color: black;
- font-weight: 600;
- font-size: 42px;
- line-height: 42px;
- text-align: center;
- color: #0e2d32;
- width: 50%;
- }
- </style>
|