Clients.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!-- Carrousel des logos clients -->
  2. <template>
  3. <LayoutContainer>
  4. <!-- Titre -->
  5. <v-row justify="center">
  6. <h2 class="text-center">
  7. <slot name="title">
  8. Plus de <span class="alt-color">5000 structures</span> nous font confiance
  9. </slot>
  10. </h2>
  11. </v-row>
  12. <v-container>
  13. <v-row>
  14. <!-- Fléche de gauche -->
  15. <v-btn
  16. icon="fas fa-chevron-left"
  17. @click="goToPrevious"
  18. />
  19. <!-- Carrousel -->
  20. <Carousel
  21. ref="carousel"
  22. class="elevation-4 mb-12"
  23. :items-to-show="4"
  24. :items-to-scroll="2"
  25. >
  26. <Slide v-for="(item, index) in items" :key="index">
  27. <div>
  28. <v-img :src="item.src" alt="Card image cap" />
  29. </div>
  30. </Slide>
  31. </Carousel>
  32. <!-- Fléche de droite -->
  33. <v-btn
  34. icon="fas fa-chevron-right"
  35. @click="goToNext"
  36. />
  37. </v-row>
  38. </v-container>
  39. </LayoutContainer>
  40. </template>
  41. <script setup lang="ts">
  42. import { Carousel, Slide } from "vue3-carousel";
  43. import { PropType } from "@vue/runtime-core";
  44. const carousel: Ref<typeof Carousel | null> = ref(null);
  45. const props = defineProps({
  46. items: {
  47. type: Array as PropType<Array<{ src: string }>>,
  48. required: true
  49. }
  50. });
  51. const goToPrevious = () => {
  52. carousel.value!.prev();
  53. };
  54. const goToNext = () => {
  55. carousel.value!.next();
  56. };
  57. </script>
  58. <style scoped lang="scss">
  59. .v-row {
  60. display: flex;
  61. align-items: center;
  62. justify-content: center;
  63. max-width: 1300px;
  64. margin-right: auto;
  65. margin-left: auto;
  66. }
  67. h2 {
  68. margin-bottom: 2rem;
  69. font-style: normal;
  70. text-align: center;
  71. font-weight: 600;
  72. font-size: 42px;
  73. line-height: 42px;
  74. color: var(--on-primary-color);
  75. width: 50%;
  76. }
  77. .alt-color {
  78. color: var(--on-primary-color-alt);
  79. }
  80. .v-btn {
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. width: 60px;
  85. height: 60px;
  86. background-color: transparent;
  87. color: var(--on-primary-color);
  88. border: 2px solid var(--on-primary-color);
  89. cursor: pointer;
  90. margin-right: 1rem;
  91. margin-top: 1rem;
  92. border-radius: 0;
  93. }
  94. .carousel {
  95. background-color: white;
  96. margin-top: 2rem;
  97. border-radius: 20px;
  98. margin-left: auto;
  99. margin-right: auto;
  100. box-shadow: #071b1f;
  101. }
  102. .v-img {
  103. height: 10rem;
  104. width: 10rem;
  105. margin: 2rem auto;
  106. }
  107. </style>