mirror of
https://github.com/Floriansylvain/musee-illusion-mobile.git
synced 2026-08-19 11:43:17 +02:00
feat: description
This commit is contained in:
+88
-27
@@ -12,6 +12,7 @@ import "swiper/css";
|
|||||||
import "swiper/css/pagination";
|
import "swiper/css/pagination";
|
||||||
|
|
||||||
const data = ref();
|
const data = ref();
|
||||||
|
const currentRoomIndex = ref(0);
|
||||||
|
|
||||||
const getRooms = async () => {
|
const getRooms = async () => {
|
||||||
const options = {
|
const options = {
|
||||||
@@ -32,33 +33,44 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ion-page class="page">
|
<ion-page class="page">
|
||||||
<PagesHeader />
|
<swiper direction="vertical" class="swiper-vertical">
|
||||||
<main>
|
<swiper-slide class="top-content">
|
||||||
<h2>Les salles</h2>
|
<PagesHeader />
|
||||||
<h3>Venez découvrir les salles mises en place !</h3>
|
<main>
|
||||||
|
<h2>Les salles</h2>
|
||||||
|
<h3>Venez découvrir les salles mises en place !</h3>
|
||||||
|
|
||||||
<swiper
|
<swiper
|
||||||
:pagination="{
|
:pagination="{
|
||||||
clickable: true,
|
clickable: true,
|
||||||
el: '.swiper-pagination',
|
el: '.swiper-pagination',
|
||||||
bulletClass: 'pagination-bullet',
|
bulletClass: 'pagination-bullet',
|
||||||
bulletActiveClass: 'pagination-bullet-active',
|
bulletActiveClass: 'pagination-bullet-active',
|
||||||
}"
|
}"
|
||||||
:modules="[Pagination]"
|
:modules="[Pagination]"
|
||||||
:space-between="250"
|
:space-between="250"
|
||||||
:auto-height="false"
|
:auto-height="false"
|
||||||
class="mySwiper"
|
@slide-change-transition-end="
|
||||||
>
|
(e) => (currentRoomIndex = e.activeIndex)
|
||||||
<swiper-slide v-for="element in data" :key="element.titre">
|
"
|
||||||
<section>
|
class="swiper-horizontal"
|
||||||
<h4>{{ element.fields.titre }}</h4>
|
>
|
||||||
<img :src="element.fields.image[0].url" alt="hallan" />
|
<swiper-slide v-for="element in data" :key="element.titre">
|
||||||
<AudioGuide :src="element.fields.audio[0].url" />
|
<section>
|
||||||
</section>
|
<h4>{{ element.fields.titre }}</h4>
|
||||||
</swiper-slide>
|
<img :src="element.fields.image[0].url" alt="hallan" />
|
||||||
</swiper>
|
<AudioGuide :src="element.fields.audio[0].url" />
|
||||||
<div slot="pagination" class="swiper-pagination"></div>
|
</section>
|
||||||
</main>
|
</swiper-slide>
|
||||||
|
</swiper>
|
||||||
|
<div slot="pagination" class="swiper-pagination"></div>
|
||||||
|
</main>
|
||||||
|
</swiper-slide>
|
||||||
|
<swiper-slide class="bottom-content">
|
||||||
|
<h2>{{ data && data[currentRoomIndex].fields.titre }}</h2>
|
||||||
|
<p>{{ data && data[currentRoomIndex].fields.description }}</p>
|
||||||
|
</swiper-slide>
|
||||||
|
</swiper>
|
||||||
</ion-page>
|
</ion-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -129,11 +141,50 @@ audio {
|
|||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mySwiper {
|
.swiper-horizontal {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.swiper-vertical {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
|
||||||
|
padding: 32px;
|
||||||
|
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
|
||||||
|
background-image: linear-gradient(-45deg, #7e33ac 0, #282828 60%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-content h2 {
|
||||||
|
font-size: 50px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-content p {
|
||||||
|
font-size: 27px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--ion-color-dark);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -148,4 +199,14 @@ audio {
|
|||||||
.pagination-bullet-active {
|
.pagination-bullet-active {
|
||||||
background-color: var(--ion-color-dark);
|
background-color: var(--ion-color-dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
.bottom-content {
|
||||||
|
background-image: linear-gradient(
|
||||||
|
-45deg,
|
||||||
|
#983dd1 0,
|
||||||
|
#ffffff 60%
|
||||||
|
) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user