index.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <template>
  2. <PageMeta
  3. title="La Sauvagerie - Location de vacances"
  4. description="Maison de vacances pour 6 personnes à proximité de la mer en Normandie"
  5. />
  6. <div class="rental-container">
  7. <!-- Main Image Section -->
  8. <div class="main-image-container">
  9. <v-img
  10. src="/images/photos/IMG_2216.min.JPG"
  11. alt="La Sauvagerie - Vue principale"
  12. cover
  13. eager
  14. height="500"
  15. class="main-image rounded-lg"
  16. :loading="loading"
  17. @click="selectImage('/images/photos/IMG_2216.min.png')"
  18. @load="onImageLoad"
  19. @error="onImageError"
  20. style="cursor: pointer;"
  21. ></v-img>
  22. </div>
  23. <!-- Thumbnails Section -->
  24. <div class="thumbnails-container mt-4">
  25. <v-row>
  26. <v-col v-for="(image, index) in thumbnailImages" :key="index" cols="12" sm="6" md="3">
  27. <v-img
  28. :src="image.src"
  29. :alt="image.alt"
  30. height="150"
  31. cover
  32. eager
  33. class="thumbnail rounded-lg"
  34. @click="selectImage(image.src)"
  35. @load="onImageLoad"
  36. @error="onImageError"
  37. ></v-img>
  38. </v-col>
  39. </v-row>
  40. </div>
  41. <!-- Description Section -->
  42. <div class="description-container mt-8">
  43. <h2>Bienvenue à La Sauvagerie</h2>
  44. <v-card class="pa-4">
  45. <p class="text-body-1">
  46. Bienvenue à la Sauvagerie, maison de vacances de 95m², idéale pour des séjours en famille ou entre amis.
  47. Située dans un cadre verdoyant et paisible, cette maison offre trois chambres pouvant accueillir jusqu'à six personnes.
  48. Profitez de la tranquillité ambiante, et de la proximité d'une voie pédestre et cyclable qui vous mènera facilement
  49. aux commerces du bourg à 1,5 km, ou à la plage et la mer à seulement 3 km.
  50. </p>
  51. </v-card>
  52. </div>
  53. <!-- Features Summary Section -->
  54. <div class="features-container mt-8">
  55. <h2>Caractéristiques</h2>
  56. <v-row>
  57. <v-col cols="12" md="6">
  58. <v-card class="pa-4 h-100">
  59. <h3 class="text-h6 mb-4">Informations générales</h3>
  60. <ul class="feature-list">
  61. <li>Maison de vacances pour 6 personnes</li>
  62. <li>Location semaine du samedi au samedi, 700€ la semaine</li>
  63. <li>Arrivée entre 17h et 19h, départ avant midi</li>
  64. <li>Surface: 95m²</li>
  65. <li>2 places de parking</li>
  66. </ul>
  67. </v-card>
  68. </v-col>
  69. <v-col cols="12" md="6">
  70. <v-card class="pa-4 h-100">
  71. <h3 class="text-h6 mb-4">Équipements</h3>
  72. <ul class="feature-list">
  73. <li>3 chambres (capacité 6 personnes)</li>
  74. <li>1 salle de bain avec douche</li>
  75. <li>2 WC</li>
  76. <li>Salon / cuisine équipée</li>
  77. <li>Terrasse en bois fermée de 30m²</li>
  78. <li>Électroménager complet (lave-linge, lave-vaisselle, etc.)</li>
  79. </ul>
  80. </v-card>
  81. </v-col>
  82. </v-row>
  83. </div>
  84. <!-- Location Section -->
  85. <div class="location-container mt-8">
  86. <h2>Situation</h2>
  87. <v-card class="pa-4">
  88. <ul class="feature-list">
  89. <li>Accès à la mer à 3 km</li>
  90. <li>Commerces du bourg à 1,5 km</li>
  91. <li>Voie pédestre et cyclable à proximité</li>
  92. <li>Cadre verdoyant et paisible</li>
  93. </ul>
  94. </v-card>
  95. </div>
  96. <!-- Contact Section -->
  97. <div class="contact-container mt-8">
  98. <h2>Contact</h2>
  99. <v-card class="pa-4">
  100. <Contact />
  101. </v-card>
  102. </div>
  103. <!-- Image Modal -->
  104. <v-dialog v-model="showImageModal" max-width="90vw" content-class="image-modal-dialog">
  105. <v-card class="image-modal-card">
  106. <v-btn icon class="close-btn" @click="showImageModal = false">
  107. <v-icon>fas fa-times</v-icon>
  108. </v-btn>
  109. <v-card-text class="text-center pa-0">
  110. <v-img
  111. :src="selectedImageSrc"
  112. class="enlarged-image"
  113. :loading="loading"
  114. cover
  115. >
  116. <template v-slot:placeholder>
  117. <div class="d-flex align-center justify-center" style="height: 300px;">
  118. <v-progress-circular indeterminate color="primary"></v-progress-circular>
  119. </div>
  120. </template>
  121. </v-img>
  122. </v-card-text>
  123. </v-card>
  124. </v-dialog>
  125. </div>
  126. </template>
  127. <script setup lang="ts">
  128. import { useDisplay, useTheme } from 'vuetify'
  129. import type { Ref } from '@vue/reactivity'
  130. import { ref } from 'vue'
  131. const i18n = useI18n()
  132. const theme = useTheme()
  133. // Variables de débogage
  134. const showDebug = ref(true)
  135. const loading = ref(true)
  136. const imageErrors = ref<string[]>([])
  137. const imagesLoaded = ref<string[]>([])
  138. // Variables for image modal
  139. const showImageModal = ref(false)
  140. const selectedImageSrc = ref('')
  141. // List of thumbnail images
  142. const thumbnailImages = ref([
  143. { src: '/images/photos/IMG_2216.min.JPG', alt: 'Vue principale' },
  144. { src: '/images/photos/IMG_2217.min.JPG', alt: 'Vue extérieure' },
  145. { src: '/images/photos/IMG_2219.min.JPG', alt: 'Intérieur' },
  146. { src: '/images/photos/IMG_2220.min.JPG', alt: 'Intérieur' },
  147. { src: '/images/photos/IMG_2222.min.JPG', alt: 'Intérieur' },
  148. { src: '/images/photos/IMG_2223.min.JPG', alt: 'Intérieur' },
  149. { src: '/images/photos/IMG_2224.min.JPG', alt: 'Intérieur' },
  150. { src: '/images/photos/IMG_2225.min.JPG', alt: 'Intérieur' },
  151. ])
  152. // Function to select an image and show it in the modal
  153. const selectImage = (src: string) => {
  154. console.log('Selected image:', src)
  155. selectedImageSrc.value = src
  156. showImageModal.value = true
  157. }
  158. // Fonctions de débogage
  159. const onImageLoad = (event: Event) => {
  160. const target = event.target as HTMLImageElement
  161. console.log('✅ Image chargée:', target.src)
  162. imagesLoaded.value.push(target.src)
  163. loading.value = false
  164. }
  165. const onImageError = (event: Event) => {
  166. const target = event.target as HTMLImageElement
  167. console.error('❌ Erreur image:', target.src)
  168. imageErrors.value.push(target.src)
  169. loading.value = false
  170. }
  171. // Masquer le debug après 10 secondes
  172. setTimeout(() => {
  173. showDebug.value = false
  174. }, 10000)
  175. </script>
  176. <style scoped lang="scss">
  177. .rental-container {
  178. max-width: 1200px;
  179. margin: 0 auto;
  180. }
  181. .main-image {
  182. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  183. transition: transform 0.3s ease;
  184. &:hover {
  185. transform: scale(1.01);
  186. }
  187. }
  188. .thumbnail {
  189. cursor: pointer;
  190. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  191. transition: transform 0.2s ease;
  192. &:hover {
  193. transform: scale(1.05);
  194. }
  195. }
  196. .feature-list {
  197. list-style-type: none;
  198. padding-left: 0;
  199. li {
  200. padding: 8px 0;
  201. position: relative;
  202. padding-left: 24px;
  203. &:before {
  204. content: "•";
  205. color: rgb(var(--v-theme-primary));
  206. position: absolute;
  207. left: 0;
  208. }
  209. }
  210. }
  211. h2 {
  212. color: rgb(var(--v-theme-primary));
  213. font-weight: 600;
  214. }
  215. h3 {
  216. color: rgb(var(--v-theme-primary));
  217. }
  218. .enlarged-image {
  219. border-radius: 0;
  220. margin: 0 auto;
  221. max-height: 90vh;
  222. width: auto;
  223. }
  224. .image-modal-dialog {
  225. background: rgba(0, 0, 0, 0.2);
  226. }
  227. .image-modal-card {
  228. background: transparent;
  229. box-shadow: none;
  230. position: relative;
  231. overflow: visible;
  232. }
  233. .close-btn {
  234. position: absolute;
  235. top: 10px;
  236. right: 10px;
  237. z-index: 10;
  238. background-color: rgba(0, 0, 0, 0.3);
  239. color: white;
  240. transition: background-color 0.2s;
  241. &:hover {
  242. background-color: rgba(0, 0, 0, 0.5);
  243. }
  244. }
  245. </style>