| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <template>
- <LayoutContainer>
- <v-row class="custom-row">
- <v-col cols="3">
- <div class="controls-section">
- <h3>
- Ce sont eux qui en parlent le mieux
- </h3>
- <div class="carousel-controls">
- <v-btn
- icon="fas fa-chevron-left"
- @click="goPrevious"
- />
- <v-btn
- icon="fas fa-chevron-right"
- @click="goNext"
- />
- </div>
- </div>
- </v-col>
- <v-col cols="9">
- <Carousel
- ref="carousel"
- :items-to-show="3"
- :items-to-scroll="1"
- :wrap-around="true"
- >
- <Slide
- v-for="(card, index) in cards"
- :key="index"
- class="card"
- >
- <v-container>
- <v-card class="inv-theme">
- <v-card-item>
- <v-card-text>
- {{ card.review }}
- </v-card-text>
- <footer>
- <v-card-actions>
- {{ card.name }}
- </v-card-actions>
- <p class="reviewer-status">
- {{ card.status }}
- </p>
- <p class="reviewer-structure">
- {{ card.structure }}
- </p>
- </footer>
- </v-card-item>
- </v-card>
- </v-container>
- </Slide>
- </Carousel>
- </v-col>
- </v-row>
- </LayoutContainer>
- </template>
- <script setup lang="ts">
- import { Carousel, Slide } from "vue3-carousel";
- import "vue3-carousel/dist/carousel.css";
- import type { PropType } from "@vue/runtime-core";
- import type { Review } from "~/types/interface";
- const props = defineProps({
- cards: {
- type: Array as PropType<Array<Review>>,
- required: true,
- },
- });
- const carousel: Ref<typeof Carousel | null> = ref(null);
- const goPrevious = () => {
- carousel.value!.prev();
- };
- const goNext = () => {
- carousel.value!.next();
- };
- </script>
- <style scoped lang="scss">
- .v-row {
- width: 90%;
- margin-left: auto;
- margin-right: auto;
- }
- .v-container {
- padding: 0 !important;
- }
- .controls-section {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- height: 100%;
- h3 {
- font-weight: 600;
- font-size: 42px;
- line-height: 42px;
- margin-left: 1rem;
- margin-right: 1rem;
- margin-top: 3rem;
- text-align: center;
- }
- .carousel-controls {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- }
- .v-btn {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 60px;
- height: 60px;
- background-color: transparent;
- border: 2px solid var(--on-standard-theme);
- cursor: pointer;
- margin-right: 1rem;
- margin-bottom: 2rem;
- border-radius: 0;
- }
- }
- .carousel {
- .v-card-item {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- height: 100%;
- }
- .v-card-text {
- text-align: justify;
- min-height: 200px;
- max-height: 200px;
- overflow: auto;
- font-size: 0.9rem;
- }
- footer {
- min-height: 100px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin-top: 1rem;
- }
- .v-card-actions {
- font-weight: 500;
- font-size: 20px;
- line-height: 24px;
- color: var(--on-primary-color) !important;
- margin-top: 5rem;
- text-align: justify !important;
- }
- .reviewer-status {
- font-weight: 600;
- font-size: 12px;
- line-height: 16px;
- display: flex;
- align-items: center;
- letter-spacing: 0.18em;
- text-transform: uppercase;
- text-align: justify !important;
- }
- .reviewer-structure {
- font-weight: 300;
- font-size: 0.8rem;
- line-height: 14px;
- display: flex;
- align-items: center;
- margin-bottom: 1rem;
- }
- @media (min-width:2100px) {
- .v-card-text {
- min-height: 150px !important;
- max-height: 150px !important;
- }
- }
- }
- .card {
- margin-left: 0.5rem;
- border-radius: 1rem;
- }
- .v-card {
- padding: 0 0.5rem;
- border-radius: 1rem;
- min-height: 450px;
- max-height: 450px;
- margin-top: 2rem;
- margin-bottom: 0.6rem;
- }
- @media (min-width:2100px) {
- .v-card {
- min-height: 360px !important;
- max-height: 360px !important;
- }
- }
- </style>
|