-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSitesDePratique.vue
120 lines (119 loc) · 3.89 KB
/
SitesDePratique.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!--
=========================================================
* © 2018-2022 Ronan LE MEILLAT for Association Highcanfly
=========================================================
This website use:
- Vite, Vue3, FontAwesome 6, TailwindCss 3
- Vue Notus theme from Creative Tim (MIT License)
- And many others
-->
<template>
<div>
<navbar-default color="text-white" colorhover="text-slate-200" iconscolor="text-slate-200"
buttoncolor="bg-white text-slate-700 active:bg-slate-50" />
<main class="profile-page">
<section class="relative block h-500-px">
<div class="absolute top-0 w-full h-full bg-center bg-cover" v-bind:style="{
backgroundImage: 'url(' + reactiveBackground + ')',
}">
<span id="blackOverlay" class="w-full h-full absolute opacity-50 bg-grey"></span>
</div>
<div class="
top-auto
bottom-0
left-0
right-0
w-full
absolute
pointer-events-none
overflow-hidden
h-70-px
" style="transform: translateZ(0)">
<svg class="absolute bottom-0 overflow-hidden" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"
version="1.1" viewBox="0 0 2560 100" x="0" y="0">
<polygon class="text-slate-200 fill-current" points="2560 0 2560 100 0 100" />
</svg>
</div>
</section>
<section class="relative py-16 bg-slate-200">
<div class="container mx-auto px-4">
<div class="
relative
flex flex-col
min-w-0
break-words
bg-white
w-full
mb-6
shadow-xl
rounded-lg
-mt-64
">
<div class="h-screen-2/3 w-full overflow-hidden">
<suspense>
<template #default>
<mapsites-de-pratique class="rounded" />
</template>
<template #fallback>
<p>Chargement de l'API de cartographie… </p>
</template>
</suspense>
</div>
</div>
</div>
</section>
</main>
<main-footer />
</div>
</template>
<script>
import NavbarDefault from "@/components/Navbars/NavbarDefault.vue";
import MainFooter from "@/components/Footers/MainFooter.vue";
import { getCloudinaryResponsiveBackground } from "@/plugins/highcanfly";
const backgroundImage = "static-web-highcanfly/blancnezhugues-101";
import { ref,defineAsyncComponent } from "vue";
export default {
title: "High Can Fly | Club de parapente du Nord | Nos sites de pratique",
descritpion:
"Les parapentistes volents. Les quelques endroits où vous nous trouverez dans les Hauts-de-France…",
canonical: new URL(window.location),
reactiveBackground: ref(""),
resizeId: 0,
previousWindowSize: 0,
data() {
return {
reactiveBackground: this.reactiveBackground,
};
},
created() {
window.addEventListener("resize", this.handleResize);
this.previousWindowSize = window.innerWidth;
this.reactiveBackground = getCloudinaryResponsiveBackground(backgroundImage)
.format("auto")
.toURL();
},
components: {
NavbarDefault,
MainFooter,
MapsitesDePratique:defineAsyncComponent(() =>
import("@/components/Maps/LeafletCard.vue")
),
},
methods: {
handleResize: function () {
clearTimeout(this.resizeId);
this.resizeId = setTimeout(() => {
if (window.innerWidth > this.previousWindowSize) {
this.previousWindowSize = window.innerWidth;
const newUrl = getCloudinaryResponsiveBackground(backgroundImage)
.format("auto")
.toURL();
if (newUrl != this.reactiveBackground) {
this.reactiveBackground = newUrl;
}
}
}, 500);
},
},
};
</script>