Agenda.vue 6.0 KB

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