test.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <div id="L'agenda opentalent">
  3. <LayoutContainer>
  4. <v-row class="custom-row align-center">
  5. <v-col cols="4">
  6. <h2 class="title">L'agenda Opentalent</h2>
  7. </v-col>
  8. <v-col cols="4">
  9. <div class="d-flex justify-center align-center">
  10. <div class="carousel-button" @click="goPrevious">
  11. <i class="fas fa-chevron-left" />
  12. </div>
  13. <div class="carousel-button" @click="goNext">
  14. <i class="fas fa-chevron-right" />
  15. </div>
  16. </div>
  17. </v-col>
  18. <v-col cols="4">
  19. <v-btn class="btn-news" text> VOIR TOUS LES EVENEMENTS </v-btn>
  20. </v-col>
  21. </v-row>
  22. <v-row class="custom-row">
  23. <p class="agenda-details">
  24. Retrouvez tous les évènements culturels autour de chez vous.
  25. </p>
  26. </v-row>
  27. <v-row class="custom-row">
  28. <v-col cols="12" lg="12" md="12">
  29. <Carousel ref="carousel" :items-to-show="3.2" :items-to-scroll="2">
  30. <Slide
  31. v-for="(event, eventIndex) in events"
  32. :key="eventIndex"
  33. class="slide-card"
  34. >
  35. <v-card>
  36. <div
  37. class="card-img"
  38. :style="{ backgroundImage: 'url(' + event.img + ')' }"
  39. ></div>
  40. <v-card-title>
  41. {{ event.title }}
  42. </v-card-title>
  43. <v-card-text>
  44. {{ event.localisation }}
  45. </v-card-text>
  46. <div class="card-footer">
  47. <v-chip-group active-class="primary--text" column>
  48. <v-chip
  49. v-for="(tag, tagIndex) in event.tags"
  50. :key="tagIndex"
  51. class="ma-2 chip-custom"
  52. :color="tagColor(tag)"
  53. label
  54. >
  55. <span :class="tagTextColor(tag)">{{ tag }}</span>
  56. </v-chip>
  57. </v-chip-group>
  58. </div>
  59. </v-card>
  60. </Slide>
  61. </Carousel>
  62. </v-col>
  63. </v-row>
  64. </LayoutContainer>
  65. </div>
  66. </template>
  67. <script setup>
  68. import { ref } from "vue";
  69. import { Carousel, Slide } from "vue3-carousel";
  70. import "vue3-carousel/dist/carousel.css";
  71. const tagColor = (tag) => {
  72. switch (tag) {
  73. case "Payant":
  74. return "red";
  75. case "Gratuit":
  76. return "green";
  77. default:
  78. return "primary";
  79. }
  80. };
  81. const tagTextColor = (tag) => {
  82. switch (tag) {
  83. case "Payant":
  84. return "red--text";
  85. case "Gratuit":
  86. return "green--text";
  87. default:
  88. return "black--text";
  89. }
  90. };
  91. const events = ref([
  92. {
  93. rdv: "20h00",
  94. title: "LA NUIT DES RÊVES ",
  95. localisation: "FESTIVALDE musique - LONGCHAMP",
  96. date: "21/06/2023",
  97. img: "/images/agenda/agenda2.jpg",
  98. tags: ["Festival", "Musique", "Tout public", "Payant"],
  99. },
  100. {
  101. rdv: "20h00",
  102. title: "LE LAC DES CYGNES",
  103. localisation: "SPECTACLE DE DANSE - PARIS 1",
  104. date: "22/06/2023",
  105. img: "/images/agenda/agenda3.jpg",
  106. tags: ["Festival", "Musique", "Tout public", "Gratuit"],
  107. },
  108. {
  109. rdv: "20h00",
  110. title: "SOLIDAYS 2023 : 23 > 25 juin",
  111. localisation: "ORCHESTRE DE PARIS - PARIS 12",
  112. date: "23/06/2023",
  113. img: "/images/agenda/agenda4.jpg",
  114. tags: ["Festival", "Musique", "Tout public", "Payant"],
  115. },
  116. {
  117. rdv: "20h00",
  118. title: "LE LAC DES CYGNES",
  119. localisation: "FESTIVALDE musique - LONGCHAMP",
  120. date: "24/06/2023",
  121. img: "/images/agenda/agenda5.jpg",
  122. tags: ["Festival", "Musique", "Tout public", "Payant"],
  123. },
  124. {
  125. rdv: "20h00",
  126. title: "SOLIDAYS 2023 : 23 > 25 juin ",
  127. localisation: "SPECTACLE DE DANSE - PARIS 1",
  128. date: "20/06/2023",
  129. img: "/images/agenda/agenda1.jpg",
  130. tags: ["Festival", "Musique", "Tout public", "Payant"],
  131. },
  132. ]);
  133. let carousel;
  134. const goPrevious = () => carousel.prev();
  135. const goNext = () => carousel.next();
  136. </script>
  137. <style scoped>
  138. .card-img {
  139. width: 100%;
  140. height: 200px;
  141. background-size: cover;
  142. background-position: center;
  143. }
  144. .green--text {
  145. color: green;
  146. }
  147. .custom-row {
  148. width: 90%;
  149. margin-left: auto;
  150. margin-right: auto;
  151. }
  152. .red--text {
  153. color: red;
  154. }
  155. .black--text {
  156. color: black;
  157. }
  158. .btn-news {
  159. color: #9edbdd;
  160. border-radius: 2rem;
  161. font-family: "Barlow";
  162. background: transparent;
  163. border: 1px solid #9edbdd;
  164. border-radius: 6px;
  165. font-style: normal;
  166. font-weight: 600;
  167. text-transform: uppercase;
  168. display: flex;
  169. flex-direction: row;
  170. align-items: center;
  171. padding: 25px;
  172. font-size: 10px;
  173. line-height: 15px;
  174. }
  175. .chip-custom {
  176. color: white;
  177. border: 1px solid #0e2d32;
  178. border-radius: 3rem;
  179. text-transform: uppercase;
  180. display: flex;
  181. align-items: center;
  182. text-align: center;
  183. }
  184. .carousel-button i {
  185. color: #000000;
  186. }
  187. .card-date {
  188. font-size: 0.8em;
  189. color: #888;
  190. margin-left: 1rem;
  191. }
  192. .card-footer {
  193. display: flex;
  194. justify-content: space-between;
  195. align-items: center;
  196. margin-left: 4rem;
  197. }
  198. .title,
  199. .carousel-button,
  200. .btn-news {
  201. margin-top: 2rem;
  202. margin-bottom: 2rem;
  203. }
  204. .agenda-details {
  205. font-family: "Barlow";
  206. font-style: normal;
  207. font-weight: 300;
  208. font-size: 16px;
  209. line-height: 20px;
  210. margin-left: 2rem;
  211. color: #091d20;
  212. margin-bottom: 3rem;
  213. width: 15rem;
  214. }
  215. .title {
  216. font-family: "Barlow";
  217. font-style: normal;
  218. font-weight: 600;
  219. font-size: 42px;
  220. line-height: 42px;
  221. margin-left: 2rem;
  222. color: #071b1f;
  223. }
  224. .carousel-button {
  225. display: flex;
  226. justify-content: center;
  227. align-items: center;
  228. width: 40px;
  229. height: 40px;
  230. background-color: transparent;
  231. border: 2px solid #000000;
  232. cursor: pointer;
  233. margin-right: 1rem;
  234. }
  235. </style>