| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <!-- Carrousel des logos clients -->
- <template>
- <LayoutContainer>
- <!-- Titre -->
- <v-row justify="center">
- <h3 class="text-center">
- <slot name="title">
- Plus de <span class="alt-color">5000 structures</span> nous font confiance
- </slot>
- </h3>
- </v-row>
- <v-container>
- <v-row>
- <!-- Fléche de gauche -->
- <v-btn
- v-if="mdAndUp"
- icon="fas fa-chevron-left"
- @click="goToPrevious"
- />
- <!-- Carrousel -->
- <Carousel
- ref="carousel"
- class="elevation-4 mb-12"
- :items-to-show="lgAndUp ? 4 : 1"
- :items-to-scroll="lgAndUp ? 2 : 1"
- >
- <Slide v-for="(item, index) in items" :key="index">
- <div>
- <v-img :src="item.src" alt="Card image cap" />
- </div>
- </Slide>
- </Carousel>
- <!-- Fléche de droite -->
- <v-btn
- v-if="mdAndUp"
- icon="fas fa-chevron-right"
- @click="goToNext"
- />
- </v-row>
- <v-row v-if="mdAndDown">
- <v-btn
- icon="fas fa-chevron-left"
- @click="goToPrevious"
- />
- <v-btn
- icon="fas fa-chevron-right"
- @click="goToNext"
- />
- </v-row>
- </v-container>
- </LayoutContainer>
- </template>
- <script setup lang="ts">
- import { Carousel, Slide } from "vue3-carousel";
- import type { PropType } from "@vue/runtime-core";
- import { useDisplay } from "vuetify";
- const { mdAndUp, lgAndUp, mdAndDown } = useDisplay()
- const carousel: Ref<typeof Carousel | null> = ref(null);
- const props = defineProps({
- items: {
- type: Array as PropType<Array<{ src: string }>>,
- required: true
- }
- });
- const goToPrevious = () => {
- carousel.value!.prev();
- };
- const goToNext = () => {
- carousel.value!.next();
- };
- </script>
- <style scoped lang="scss">
- .v-row {
- display: flex;
- align-items: center;
- justify-content: center;
- max-width: 1300px;
- margin-right: auto;
- margin-left: auto;
- }
- h3 {
- margin-bottom: 2rem;
- text-align: center;
- font-weight: 600;
- font-size: 42px;
- line-height: 42px;
- color: var(--on-primary-color);
- width: 50%;
- }
- .alt-color {
- color: var(--on-primary-color-alt) !important;
- }
- .v-btn {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 60px;
- height: 60px;
- background-color: transparent;
- color: var(--on-primary-color);
- border: 2px solid;
- border-color: var(--on-primary-color);
- cursor: pointer;
- margin-right: 1rem;
- margin-top: 1rem;
- border-radius: 0;
- }
- .carousel {
- background-color: var(--neutral-color);
- margin-top: 2rem;
- border-radius: 20px;
- margin-left: auto;
- margin-right: auto;
- box-shadow: var(--primary-color);
- @media (max-width: 1240px) {
- width: 50%;
- min-width: 600px;
- }
- @media (max-width: 1240px) {
- width: 90%;
- min-width: 90%;
- }
- }
- .v-img {
- height: 10rem;
- width: 10rem;
- margin: 2rem auto;
- }
- </style>
|