|
@@ -2,101 +2,104 @@
|
|
|
Carrousel de la page d'accueil
|
|
Carrousel de la page d'accueil
|
|
|
-->
|
|
-->
|
|
|
<template>
|
|
<template>
|
|
|
- <v-carousel
|
|
|
|
|
- ref="carousel"
|
|
|
|
|
- v-model="activeIndex"
|
|
|
|
|
- :show-arrows="false"
|
|
|
|
|
- :hide-delimiter-background="true"
|
|
|
|
|
- :show-delimiters="false"
|
|
|
|
|
- :touch="true"
|
|
|
|
|
- :height="lgAndUp ? 500 : 800"
|
|
|
|
|
- :interval="10000"
|
|
|
|
|
- :cycle="true"
|
|
|
|
|
- >
|
|
|
|
|
- <v-carousel-item
|
|
|
|
|
- v-for="(item, index) in carouselItems"
|
|
|
|
|
- :key="index"
|
|
|
|
|
|
|
+ <div v-intersect="onIntersect">
|
|
|
|
|
+ <v-carousel
|
|
|
|
|
+ ref="carousel"
|
|
|
|
|
+ v-model="activeIndex"
|
|
|
|
|
+ :show-arrows="false"
|
|
|
|
|
+ :hide-delimiter-background="true"
|
|
|
|
|
+ :show-delimiters="false"
|
|
|
|
|
+ :touch="true"
|
|
|
|
|
+ :height="lgAndUp ? 500 : 800"
|
|
|
|
|
+ :interval="6000"
|
|
|
|
|
+ :cycle="true"
|
|
|
>
|
|
>
|
|
|
- <v-row>
|
|
|
|
|
- <!-- Partie description (logo, description, bouton 'en savoir plus') -->
|
|
|
|
|
- <v-col cols="12" lg="6" class="col presentation">
|
|
|
|
|
- <nuxt-link :to="item.link">
|
|
|
|
|
- <v-img
|
|
|
|
|
- :src="item.logo"
|
|
|
|
|
- :alt="item.logoAlt"
|
|
|
|
|
- class="logo"
|
|
|
|
|
- />
|
|
|
|
|
- </nuxt-link>
|
|
|
|
|
-
|
|
|
|
|
- <p class="description" v-html="mdAndUp ? item.description : item.descriptionSm" />
|
|
|
|
|
-
|
|
|
|
|
- <v-btn
|
|
|
|
|
- :to="item.link"
|
|
|
|
|
- append-icon="fas fa-arrow-right"
|
|
|
|
|
- :class="['mt-3 learn-more-btn', item.buttonClass]"
|
|
|
|
|
- >
|
|
|
|
|
- En savoir plus
|
|
|
|
|
- </v-btn>
|
|
|
|
|
- </v-col>
|
|
|
|
|
-
|
|
|
|
|
- <!-- Partie Illustration -->
|
|
|
|
|
- <v-col cols="12" lg="6" class="col illustration">
|
|
|
|
|
- <v-row>
|
|
|
|
|
- <div
|
|
|
|
|
- class="background-rectangle"
|
|
|
|
|
- :style="{ backgroundColor: item.color }"
|
|
|
|
|
- />
|
|
|
|
|
-
|
|
|
|
|
- <v-card class="card" elevation="5">
|
|
|
|
|
|
|
+ <v-carousel-item
|
|
|
|
|
+ v-for="(item, index) in carouselItems"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ >
|
|
|
|
|
+ <v-row>
|
|
|
|
|
+ <!-- Partie description (logo, description, bouton 'en savoir plus') -->
|
|
|
|
|
+ <v-col cols="12" lg="6" class="col presentation">
|
|
|
|
|
+ <nuxt-link :to="item.link">
|
|
|
<v-img
|
|
<v-img
|
|
|
- class="profile-image"
|
|
|
|
|
- :src="item.avatar"
|
|
|
|
|
- :alt="item.avatarAlt"
|
|
|
|
|
- contain
|
|
|
|
|
- rounded
|
|
|
|
|
|
|
+ :src="item.logo"
|
|
|
|
|
+ :alt="item.logoAlt"
|
|
|
|
|
+ class="logo"
|
|
|
|
|
+ />
|
|
|
|
|
+ </nuxt-link>
|
|
|
|
|
+
|
|
|
|
|
+ <p class="description" v-html="mdAndUp ? item.description : item.descriptionSm" />
|
|
|
|
|
+
|
|
|
|
|
+ <v-btn
|
|
|
|
|
+ :to="item.link"
|
|
|
|
|
+ append-icon="fas fa-arrow-right"
|
|
|
|
|
+ :class="['mt-3 learn-more-btn', item.buttonClass]"
|
|
|
|
|
+ >
|
|
|
|
|
+ En savoir plus
|
|
|
|
|
+ </v-btn>
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Partie Illustration -->
|
|
|
|
|
+ <v-col cols="12" lg="6" class="col illustration">
|
|
|
|
|
+ <v-row>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="background-rectangle"
|
|
|
|
|
+ :style="{ backgroundColor: item.color }"
|
|
|
/>
|
|
/>
|
|
|
- <v-card-text>
|
|
|
|
|
- <v-card-title class="name">
|
|
|
|
|
- {{ item.name }}
|
|
|
|
|
|
|
|
|
|
- <p class="school">
|
|
|
|
|
- {{ item.school }}
|
|
|
|
|
|
|
+ <v-card class="card" elevation="5">
|
|
|
|
|
+ <v-img
|
|
|
|
|
+ class="profile-image"
|
|
|
|
|
+ :src="item.avatar"
|
|
|
|
|
+ :alt="item.avatarAlt"
|
|
|
|
|
+ contain
|
|
|
|
|
+ rounded
|
|
|
|
|
+ />
|
|
|
|
|
+ <v-card-text>
|
|
|
|
|
+ <v-card-title class="name">
|
|
|
|
|
+ {{ item.name }}
|
|
|
|
|
+
|
|
|
|
|
+ <p class="school">
|
|
|
|
|
+ {{ item.school }}
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </v-card-title>
|
|
|
|
|
+
|
|
|
|
|
+ <p class="status">
|
|
|
|
|
+ {{ item.status }}
|
|
|
</p>
|
|
</p>
|
|
|
- </v-card-title>
|
|
|
|
|
-
|
|
|
|
|
- <p class="status">
|
|
|
|
|
- {{ item.status }}
|
|
|
|
|
- </p>
|
|
|
|
|
- </v-card-text>
|
|
|
|
|
- </v-card>
|
|
|
|
|
-
|
|
|
|
|
- <v-img
|
|
|
|
|
- :src="item.image"
|
|
|
|
|
- :alt="item.imageAlt"
|
|
|
|
|
- class="image"
|
|
|
|
|
- />
|
|
|
|
|
- </v-row>
|
|
|
|
|
- </v-col>
|
|
|
|
|
- </v-row>
|
|
|
|
|
- </v-carousel-item>
|
|
|
|
|
-
|
|
|
|
|
- <div class="custom-controls">
|
|
|
|
|
- <!--suppress JSUnusedLocalSymbols -->
|
|
|
|
|
- <div
|
|
|
|
|
- v-for="(_, index) in carouselItems"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- :class="{ 'active-control': index === activeIndex }"
|
|
|
|
|
- @click="setActiveIndex(index)"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </v-carousel>
|
|
|
|
|
|
|
+ </v-card-text>
|
|
|
|
|
+ </v-card>
|
|
|
|
|
+
|
|
|
|
|
+ <v-img
|
|
|
|
|
+ :src="item.image"
|
|
|
|
|
+ :alt="item.imageAlt"
|
|
|
|
|
+ class="image"
|
|
|
|
|
+ />
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ </v-col>
|
|
|
|
|
+ </v-row>
|
|
|
|
|
+ </v-carousel-item>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="custom-controls">
|
|
|
|
|
+ <!--suppress JSUnusedLocalSymbols -->
|
|
|
|
|
+ <div
|
|
|
|
|
+ v-for="(_, index) in carouselItems"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :class="{ 'active-control': index === activeIndex }"
|
|
|
|
|
+ @click="setActiveIndex(index)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </v-carousel>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-
|
|
|
|
|
import { useDisplay } from "vuetify";
|
|
import { useDisplay } from "vuetify";
|
|
|
import type { CarouselItem } from "~/types/interface";
|
|
import type { CarouselItem } from "~/types/interface";
|
|
|
-const { smAndDown, mdAndDown, mdAndUp, lgAndUp } = useDisplay();
|
|
|
|
|
|
|
+import { useLayoutStore } from "~/stores/layoutStore";
|
|
|
|
|
+
|
|
|
|
|
+const { mdAndUp, lgAndUp } = useDisplay();
|
|
|
|
|
|
|
|
// Index de la slide active
|
|
// Index de la slide active
|
|
|
let activeIndex: Ref<number> = ref(0);
|
|
let activeIndex: Ref<number> = ref(0);
|
|
@@ -164,6 +167,11 @@ const carouselItems: Ref<Array<CarouselItem>> = ref([
|
|
|
avatarAlt: "Photo de profil d’une femme en tailleur",
|
|
avatarAlt: "Photo de profil d’une femme en tailleur",
|
|
|
},
|
|
},
|
|
|
]);
|
|
]);
|
|
|
|
|
+
|
|
|
|
|
+const layoutStore = useLayoutStore()
|
|
|
|
|
+const onIntersect = (isIntersecting: boolean) => {
|
|
|
|
|
+ layoutStore.setIsBannerVisible(isIntersecting)
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|