Caroussel.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <template>
  2. <LayoutContainer>
  3. <v-carousel
  4. v-if="lgAndUp"
  5. ref="carousel"
  6. v-model="activeIndex"
  7. :show-arrows="false"
  8. class="carousel"
  9. :hide-delimiter-background="true"
  10. :show-delimiters="false"
  11. :touch="true"
  12. >
  13. <v-carousel-item v-for="(item, index) in carouselItems" :key="index">
  14. <v-row>
  15. <v-col cols="6">
  16. <v-row class="align-start">
  17. <v-img class="logo-school" :src="item.logo"></v-img>
  18. </v-row>
  19. <v-row class="align-start">
  20. <p class="description">{{ item.description }}</p>
  21. </v-row>
  22. <v-row class="align-start">
  23. <v-btn :class="item.buttonClass">En savoir plus</v-btn>
  24. </v-row>
  25. </v-col>
  26. <v-col cols="6">
  27. <v-row class="justify-end">
  28. <div
  29. class="background-rectangle"
  30. :style="{ backgroundColor: item.color }"
  31. ></div>
  32. <v-card class="card" elevation="5">
  33. <v-img
  34. class="profile-image"
  35. src="/images/carousel/school/avatar.png"
  36. alt="Profile Image"
  37. contain
  38. rounded
  39. ></v-img>
  40. <v-card-text>
  41. <v-card-title class="name">Cindy Blanchard</v-card-title>
  42. <p class="school">Conservatoire d'Anemasse</p>
  43. <p class="status">Eleve</p>
  44. </v-card-text>
  45. </v-card>
  46. <v-img :src="item.image" class="image"></v-img>
  47. </v-row>
  48. </v-col>
  49. </v-row>
  50. </v-carousel-item>
  51. <div class="custom-controls">
  52. <div
  53. v-for="(item, index) in carouselItems"
  54. :key="index"
  55. :class="{ 'active-control': index === activeIndex }"
  56. @click="changeSlide(index)"
  57. ></div>
  58. </div>
  59. </v-carousel>
  60. </LayoutContainer>
  61. </template>
  62. <script setup>
  63. import { useDisplay } from "vuetify";
  64. const {lgAndUp } = useDisplay();
  65. let activeIndex = ref(0);
  66. const changeSlide = (index) => {
  67. activeIndex.value = index;
  68. };
  69. const carouselItems = ref([
  70. {
  71. logo: "/images/carousel/school/school.png",
  72. description:
  73. "Pour les petits comme pour les grans établissements d’enseignement artistique.Il permet la gestion au quotidien et en temps réel de votre établissement, de gérer vos élèves et vos professeurs, vos emplois du temps, le suivi pédagogique, vos salles, la facturation et les encaissements...",
  74. buttonClass: "btn-school",
  75. image: "/images/carousel/school/Fille_School.png",
  76. color: "rgba(32, 147, 190, 0.4)",
  77. },
  78. {
  79. logo: "/images/carousel/artist/artist.png",
  80. description:
  81. "Pour les structures culturelles pratiquantes telles que les orchestres, les chorales, les compagnies de cirque, théâtre et danse.Gérez votre activité avec un logiciel de gestion et communication au service de votre passion.",
  82. buttonClass: "btn-artist",
  83. image: "/images/carousel/artist/musician.png",
  84. color: "rgba(250, 194, 10, 0.4)",
  85. },
  86. {
  87. logo: "/images/carousel/manager/manager.png",
  88. description:
  89. "La solution de mise en réseau des organisations culturelles. Fédérations, confédérations et collectivités, utilisez une solution collaborative innovante et unique spécialement développée pour les réseaux culturels.",
  90. buttonClass: "btn-manager",
  91. image: "/images/carousel/manager/fédération.png",
  92. color: "rgba(216, 5, 11, 0.4)",
  93. },
  94. ]);
  95. </script>
  96. <style scoped>
  97. ::v-deep .v-carousel__controls {
  98. display: none;
  99. }
  100. .carousel,
  101. .v-carousel__item {
  102. height: 900% !important;
  103. }
  104. .card {
  105. height: 20%;
  106. width: 27%;
  107. border-radius: 1rem;
  108. margin-top: 1rem;
  109. }
  110. .profile-image {
  111. width: 40%;
  112. margin: auto;
  113. height: 12vh;
  114. }
  115. .name {
  116. text-align: center;
  117. font-size: 100%;
  118. font-weight: bold;
  119. margin-bottom: 1vh;
  120. font-family: "Barlow";
  121. font-style: normal;
  122. }
  123. .school,
  124. .status {
  125. text-align: center;
  126. font-size: 80%;
  127. color: #888888;
  128. margin-bottom: 1vh;
  129. }
  130. .background-rectangle {
  131. position: absolute;
  132. width: 60%;
  133. height: 20rem;
  134. left: 72%;
  135. top: 50%;
  136. transform: translate(-50%, -50%);
  137. border-radius: 200px 0px 0px 15rem;
  138. z-index: -1;
  139. }
  140. .align-start {
  141. align-items: flex-start;
  142. }
  143. .carousel {
  144. height: 100%;
  145. margin-top: 10vh;
  146. }
  147. .description {
  148. text-align: left;
  149. width: 30%;
  150. margin-bottom: 1rem;
  151. }
  152. .logo-school {
  153. max-width: 35vw;
  154. height: 25vh;
  155. margin-top: 10px;
  156. margin-bottom: 2vh;
  157. }
  158. .image {
  159. height: 35rem;
  160. margin-top: 6rem;
  161. right: 20%;
  162. }
  163. .description {
  164. text-align: left;
  165. margin-right: 9vw;
  166. margin-left: 7vw;
  167. width: 25vw;
  168. }
  169. .custom-controls {
  170. position: absolute;
  171. top: 50%;
  172. right: 1vw;
  173. transform: translateY(-50%);
  174. display: flex;
  175. flex-direction: column;
  176. gap: 1vh;
  177. }
  178. .custom-controls div {
  179. width: 1vh;
  180. height: 1vh;
  181. border-radius: 50%;
  182. background-color: grey;
  183. cursor: pointer;
  184. }
  185. .custom-controls .active-control {
  186. background-color: #000;
  187. margin-right: 2rem;
  188. }
  189. .btn-school {
  190. background: rgba(32, 147, 190, 0.4);
  191. border-radius: 0.5rem;
  192. margin-left: 7vw;
  193. padding: 25px;
  194. gap: 9px;
  195. font-weight: 700;
  196. font-size: 10px;
  197. line-height: 15px;
  198. width: 10rem;
  199. height: 4rem;
  200. font-family: "Barlow";
  201. font-style: normal;
  202. }
  203. .btn-artist {
  204. background: rgba(250, 194, 10, 0.4);
  205. border-radius: 0.5rem;
  206. margin-left: 7vw;
  207. padding: 25px;
  208. gap: 9px;
  209. font-weight: 700;
  210. font-size: 10px;
  211. line-height: 15px;
  212. width: 10rem;
  213. height: 4rem;
  214. font-family: "Barlow";
  215. font-style: normal;
  216. }
  217. .btn-manager {
  218. background: rgba(216, 5, 11, 0.4);
  219. border-radius: 0.5rem;
  220. margin-left: 7vw;
  221. padding: 25px;
  222. gap: 9px;
  223. font-weight: 700;
  224. font-size: 10px;
  225. line-height: 15px;
  226. width: 10rem;
  227. height: 4rem;
  228. font-family: "Barlow";
  229. font-style: normal;
  230. }
  231. </style>