News.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <LayoutContainer>
  3. <v-row>
  4. <v-col cols="6">
  5. <div class="container-title">
  6. <v-icon size="10" class="fa-solid fa-circle icon-title"></v-icon>
  7. <h6 class="small-title">Découvrez nos dernières actualités</h6>
  8. </div>
  9. <h2 class="title">Quoi de neuf ?</h2>
  10. </v-col>
  11. <v-col cols="6">
  12. <v-btn class="btn-news" text>VOIR TOUTES LES ACTUALITÉS</v-btn>
  13. </v-col>
  14. </v-row>
  15. <v-row>
  16. <v-col cols="2">
  17. <div class="d-flex justify-center align-center">
  18. <div class="carousel-button" @click="goPrevious">
  19. <i class="fas fa-chevron-left"></i>
  20. </div>
  21. <div class="carousel-button" @click="goNext">
  22. <i class="fas fa-chevron-right"></i>
  23. </div>
  24. </div>
  25. </v-col>
  26. <v-col cols="10">
  27. <Carousel :itemsToShow="3.5" :itemsToScroll="1" v-slot="{ carousel: _carousel }" ref="carousel">
  28. <Slide class="slide-card" v-for="(actu, index) in actus" :key="index">
  29. <div class="card ">
  30. <img class="card-img-top" :src="actu.img" alt="Card image cap">
  31. <div class="card-body">
  32. <h5 class="card-title">{{ actu.title }}</h5>
  33. <p class="card-text">{{ actu.content }}</p>
  34. </div>
  35. <div class="card-footer">
  36. <p class="card-date">{{ actu.date }}</p>
  37. <button class="card-button">+</button>
  38. </div>
  39. </div>
  40. </Slide>
  41. </Carousel>
  42. </v-col>
  43. </v-row>
  44. </LayoutContainer>
  45. </template>
  46. <script setup>
  47. import { ref } from 'vue';
  48. import { Carousel, Slide } from 'vue3-carousel';
  49. import 'vue3-carousel/dist/carousel.css';
  50. const actus = ref([
  51. { title: 'Suivi Pédagogique', content: 'Sed laeditur hic coetuum magnificus', date: '20/06/2023', img: '/images/actu/actu1.jpg' },
  52. { title: 'AMÉLIORATION DU RÉPERTOIRE', content: 'Sed laeditur hic coetuum magnificus', date: '21/06/2023', img: '/images/actu/actu2.jpg' },
  53. { title: 'fOIRE AUX QUESTIONS', content: 'Sed laeditur hic coetuum magnificus', date: '22/06/2023', img: '/images/actu/actu3.jpg' },
  54. { title: 'Suivi Pédagogique', content: 'Sed laeditur hic coetuum magnificus', date: '23/06/2023', img: '/images/actu/actu4.jpg' },
  55. { title: 'Actu 1', content: 'Sed laeditur hic coetuum magnificus gegr', date: '24/06/2023', img: '/images/actu/actu5.jpg' },
  56. { title: 'Actu 2', content: 'Sed laeditur hic coetuum magnificus', date: '25/06/2023', img: '/images/actu/actu6.jpg' },
  57. { title: 'Actu 3', content: 'Sed laeditur hic coetuum magnificus', date: '26/06/2023', img: '/images/actu/actu1.jpg' },
  58. { title: 'Suivi Pédagogique', content: 'Sed laeditur hic coetuum magnificus', date: '27/06/2023', img: '/images/actu/actu2.jpg' }
  59. ]);
  60. let carousel;
  61. const goPrevious = () => carousel.prev();
  62. const goNext = () => carousel.next();
  63. </script>
  64. <style scoped>
  65. .card {
  66. border: 0.5px solid #C4C4C4;
  67. border-radius: 15px 15px 0 0;
  68. margin-bottom: 2rem;
  69. }
  70. .icon-title{
  71. color: #64AFB7;
  72. margin-top: 4.5rem;
  73. }
  74. .container-title{
  75. display: flex;
  76. align-items: center;
  77. margin-left: 2rem;
  78. margin-top: 4.5rem;
  79. }
  80. .carousel-button {
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. width: 40px;
  85. height: 40px;
  86. background-color: transparent;
  87. border: 2px solid #000000;
  88. cursor: pointer;
  89. margin-right: 1rem;
  90. margin-top: 4rem;
  91. }
  92. .carousel-button i {
  93. color: #000000;
  94. }
  95. .card-text{
  96. font-family: 'Barlow';
  97. font-style: normal;
  98. font-weight: 500;
  99. font-size: 16px;
  100. line-height: 18px;
  101. margin-bottom: 1rem;
  102. color: #091D20;
  103. }
  104. .card-title{
  105. font-family: 'Barlow';
  106. font-style: normal;
  107. font-weight: 600;
  108. font-size: 12px;
  109. line-height: 16px;
  110. display: flex;
  111. align-items: center;
  112. letter-spacing: 0.18em;
  113. text-transform: uppercase;
  114. margin-top: 1rem;
  115. margin-bottom: 1rem;
  116. }
  117. .card-date {
  118. font-size: 0.8em;
  119. color: #888;
  120. margin-left: 1rem;
  121. }
  122. .card-footer {
  123. display: flex;
  124. justify-content: space-between;
  125. align-items: center;
  126. }
  127. .card-body {
  128. text-align: left;
  129. margin-bottom:1rem ;
  130. margin-left: 1rem;
  131. }
  132. .card-button {
  133. background-color: transparent;
  134. border: none;
  135. width: 2.5rem;
  136. font-size: 1.5em;
  137. text-align: right;
  138. color: #ffffff;
  139. background-color: #64AFB7;;
  140. border: none;
  141. text-align: center;
  142. }
  143. .slide-card{
  144. margin-left: 1rem;
  145. margin-right: 1rem;
  146. }
  147. .card-img-top {
  148. border-radius: 15px 15px 0 0;
  149. width: 100%;
  150. height: 90%;
  151. object-fit: cover;
  152. object-position: center;
  153. }
  154. .small-title {
  155. font-family: "Barlow";
  156. font-style: normal;
  157. font-weight: 600;
  158. width: 12rem;
  159. font-size: 12px;
  160. letter-spacing: 0.18em;
  161. text-transform: uppercase;
  162. margin-left: 2rem;
  163. color: #071b1f;
  164. margin-top: 4.5rem;
  165. }
  166. .title {
  167. margin-top: 2rem;
  168. font-family: "Barlow";
  169. font-style: normal;
  170. font-weight: 600;
  171. font-size: 42px;
  172. line-height: 42px;
  173. margin-left: 2rem;
  174. color: #071b1f;
  175. margin-bottom: 2rem;
  176. }
  177. .btn-news {
  178. color: #9edbdd;
  179. margin-left: 25rem;
  180. margin-top: 8rem;
  181. top: 6rem;
  182. border-radius: 2rem;
  183. font-family: "Barlow";
  184. background: transparent;
  185. border: 1px solid #9edbdd;
  186. border-radius: 6px;
  187. font-style: normal;
  188. font-weight: 600;
  189. text-transform: uppercase;
  190. display: flex;
  191. flex-direction: row;
  192. align-items: center;
  193. padding: 25px;
  194. font-size: 10px;
  195. line-height: 15px;
  196. }
  197. </style>