Clients.client.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <!-- Carrousel des logos clients -->
  2. <template>
  3. <LayoutContainer>
  4. <!-- Titre -->
  5. <v-row justify="center">
  6. <h3 class="text-center">
  7. <slot name="title">
  8. Plus de <span class="alt-color">5000 structures</span> nous font
  9. confiance
  10. </slot>
  11. </h3>
  12. </v-row>
  13. <v-container>
  14. <v-row>
  15. <!-- Fléche de gauche -->
  16. <v-btn
  17. v-if="lgAndUp"
  18. icon="fas fa-chevron-left"
  19. aria-label="Précédent"
  20. @click="goToPrevious"
  21. />
  22. <!-- Carrousel -->
  23. <Carousel
  24. ref="carousel"
  25. class="elevation-4 mb-12"
  26. :items-to-show="smAndUp ? 4 : 1"
  27. :items-to-scroll="smAndUp ? 2 : 1"
  28. :wrap-around="true"
  29. >
  30. <Slide v-for="item in items" :key="item.src">
  31. <div>
  32. <v-img :src="item.src" :alt="item.alt" />
  33. </div>
  34. </Slide>
  35. </Carousel>
  36. <!-- Fléche de droite -->
  37. <v-btn
  38. v-if="lgAndUp"
  39. icon="fas fa-chevron-right"
  40. aria-label="Suivant"
  41. @click="goToNext"
  42. />
  43. </v-row>
  44. <v-row v-if="mdAndDown">
  45. <v-btn
  46. icon="fas fa-chevron-left"
  47. aria-label="Précédent"
  48. @click="goToPrevious"
  49. />
  50. <v-btn
  51. icon="fas fa-chevron-right"
  52. aria-label="Suivant"
  53. @click="goToNext"
  54. />
  55. </v-row>
  56. </v-container>
  57. </LayoutContainer>
  58. </template>
  59. <script setup lang="ts">
  60. import { Carousel, Slide } from 'vue3-carousel'
  61. import type { PropType, Ref } from 'vue'
  62. import { useDisplay } from 'vuetify'
  63. const { smAndUp, lgAndUp, mdAndDown } = useDisplay()
  64. const carousel: Ref<typeof Carousel | null> = ref(null)
  65. defineProps({
  66. items: {
  67. type: Array as PropType<Array<{ src: string; alt: string }>>,
  68. required: true,
  69. },
  70. })
  71. const goToPrevious = () => {
  72. carousel.value!.prev()
  73. }
  74. const goToNext = () => {
  75. carousel.value!.next()
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .v-row {
  80. display: flex;
  81. align-items: center;
  82. justify-content: center;
  83. max-width: 1300px;
  84. margin-right: auto;
  85. margin-left: auto;
  86. }
  87. h3 {
  88. margin-bottom: 2rem;
  89. text-align: center;
  90. font-weight: 600;
  91. font-size: 42px;
  92. line-height: 42px;
  93. color: var(--on-primary-color);
  94. width: 50%;
  95. @media (max-width: 1240px) {
  96. width: 70%;
  97. }
  98. }
  99. .alt-color {
  100. color: var(--on-primary-color-alt) !important;
  101. }
  102. .v-btn {
  103. display: flex;
  104. justify-content: center;
  105. align-items: center;
  106. width: 60px;
  107. height: 60px;
  108. background-color: transparent;
  109. color: var(--on-primary-color);
  110. border: 2px solid;
  111. border-color: var(--on-primary-color);
  112. cursor: pointer;
  113. margin-right: 1rem;
  114. margin-top: 1rem;
  115. border-radius: 0;
  116. }
  117. .carousel {
  118. width: 960px;
  119. height: 240px;
  120. background-color: var(--neutral-color);
  121. margin-top: 2rem;
  122. border-radius: 20px;
  123. margin-left: auto;
  124. margin-right: auto;
  125. box-shadow: var(--primary-color);
  126. @media (max-width: 1240px) {
  127. width: 50%;
  128. min-width: 600px;
  129. }
  130. @media (max-width: 1240px) {
  131. width: 90%;
  132. min-width: 90%;
  133. }
  134. }
  135. .v-img {
  136. height: 10rem;
  137. width: 10rem;
  138. margin: 2rem auto;
  139. }
  140. </style>