Agenda.vue 5.7 KB

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