fix&feat: homepage responsive + swiper effect

This commit is contained in:
Florian Sylvain
2024-03-28 19:32:34 +01:00
parent 3db5f9f4a7
commit e55f8a5863
4 changed files with 22 additions and 11 deletions
+1 -3
View File
@@ -2,7 +2,7 @@
<ion-app class="main"> <ion-app class="main">
<PagesHeader /> <PagesHeader />
<ion-content> <ion-content>
<ion-router-outlet class="main" id="main-content" /> <ion-router-outlet id="main-content" />
</ion-content> </ion-content>
</ion-app> </ion-app>
</template> </template>
@@ -16,7 +16,5 @@ import PagesHeader from "@/components/PagesHeader.vue";
<style> <style>
.main { .main {
background-color: var(--ion-color-light); background-color: var(--ion-color-light);
height: 100%;
min-height: 0;
} }
</style> </style>
+14 -3
View File
@@ -1,9 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import { Pagination } from "swiper/modules"; import { ref } from "vue";
import { Pagination, EffectCoverflow } from "swiper/modules";
import { Swiper, SwiperSlide } from "swiper/vue"; import { Swiper, SwiperSlide } from "swiper/vue";
import AudioGuide from "@/components/AudioGuide.vue"; import AudioGuide from "@/components/AudioGuide.vue";
import { ref } from "vue";
import "swiper/css";
import "swiper/css/effect-coverflow";
const props = defineProps<{ const props = defineProps<{
data: any; data: any;
@@ -22,13 +25,21 @@ defineEmits(["onSlideIndexChange"]);
bulletClass: 'pagination-bullet', bulletClass: 'pagination-bullet',
bulletActiveClass: 'pagination-bullet-active', bulletActiveClass: 'pagination-bullet-active',
}" }"
:modules="[Pagination]" :modules="[Pagination, EffectCoverflow]"
:space-between="250" :space-between="250"
:auto-height="false" :auto-height="false"
@slide-change-transition-end=" @slide-change-transition-end="
(e) => $emit('onSlideIndexChange', e.activeIndex) (e) => $emit('onSlideIndexChange', e.activeIndex)
" "
class="swiper-horizontal" class="swiper-horizontal"
effect="coverflow"
:coverflowEffect="{
rotate: 50,
stretch: 0,
depth: 100,
modifier: 1,
slideShadows: false,
}"
> >
<swiper-slide v-for="element in props.data" :key="element.titre"> <swiper-slide v-for="element in props.data" :key="element.titre">
<section> <section>
+7 -2
View File
@@ -22,10 +22,15 @@ import { IonButton, IonPage } from "@ionic/vue";
<style scoped> <style scoped>
.main { .main {
height: 100vh; height: 100%;
min-height: 0;
padding: 32px; padding: 32px;
background-image: linear-gradient(-45deg, #7e33ac 0, #282828 60%); background-image: linear-gradient(
-45deg,
#7e33ac 0,
var(--ion-color-light) 60%
);
} }
.top-content { .top-content {
-3
View File
@@ -6,9 +6,6 @@ import { CapacitorHttp } from "@capacitor/core";
import IllusionSwiper from "@/components/IllusionSwiper.vue"; import IllusionSwiper from "@/components/IllusionSwiper.vue";
import "swiper/css";
import "swiper/css/pagination";
const data = ref(); const data = ref();
const currentRoomIndex = ref(0); const currentRoomIndex = ref(0);