forked from stravo1/xavotsav-2024
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
271 lines (271 loc) · 8.99 KB
/
index.html
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#7B4125" />
<title>Xavotsav - 2024</title>
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="tailwindClasses.css" />
<link rel="stylesheet" href="globalStyles.css" />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,0,0"
/>
<link
rel="stylesheet"
href="./assets/locomotive-scroll/locomotive-scroll.min.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"
/>
<link rel="stylesheet" href="./custom-tags/mobile-menu/style.css" />
<script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>
<script src="./custom-tags/mobile-menu/component.js"></script>
</head>
<body>
<custom-mobile-menu />
<div class="mobile" data-scroll-container>
<div
class="top-bar w-full fixed top-0 p-1rem flex justify-between box-border z-4"
>
<img height="35px" src="./assets/logo/logo.png" />
<span
class="material-symbols-rounded cursor-pointer"
onclick="openMenu()"
>
menu
</span>
</div>
<div
data-scroll-section
id="first"
class="screen relative content flex flex-col justify-center items-start w-full p-3rem box-border"
>
<div
data-scroll-speed="1"
class="background absolute inset-0 w-full h-full"
>
<img
class="w-full h-full object-cover z-0"
src="./assets/images/landing/background-3.jpg"
/>
<div
class="absolute inset-0 black-bg w-full h-full opacity-40 z-1"
></div>
</div>
<span
class="display text-2xl mt-2rem z-5"
data-scroll
data-scroll-speed="3"
>Xavotsav '24</span
>
<span
class="about text-lg font-light z-5"
data-scroll
data-scroll-speed="3"
>
Lorem ipsum dolor sit amet consectetur. Odio enim commodo dignissim
diam eget. Vel velit mauris nisi pharetra id. In fusce feugiat nunc
mauris enim ipsum dictumst pretium convallis.
</span>
<button class="z-5" data-scroll="" data-scroll-speed="2.5">
Call To Action
</button>
<div
class="absolute infinite-anim bottom-0 z-5 mb-15p flex justify-center animate__animated animate__bounce animate__infinite animate__slower"
>
<span class="material-symbols-rounded">
keyboard_double_arrow_down
</span>
</div>
</div>
<div
id="second"
class="screen relative content flex flex-col gap-1rem justify-center items-start w-full p-3rem box-border"
data-scroll-section=""
>
<div
data-scroll-speed="1"
class="background absolute inset-0 w-full h-full"
>
<img
class="w-full h-full object-cover z-0"
src="./assets/images/landing/star-night.jpg"
/>
<div
class="absolute inset-0 black-bg w-full h-full opacity-40 z-1"
></div>
</div>
<div
data-scroll
data-scroll-repeat
data-scroll-call="secondVisible"
class="z-5 w-full"
>
<!-- Slider main container -->
<div class="swiper w-full" data-scroll data-scroll-speed="3">
<!-- Additional required wrapper -->
<div class="swiper-wrapper w-full">
<!-- Slides -->
<div class="swiper-slide">
<div
class="flex p-1rem w-full flex flex-col justify-center items-start gap-1rem"
>
<div class="holder"></div>
<div class="display text-2xl">Star Night</div>
<div class="text-md">
Lorem ipsum dolor sit amet consectetur. Odio enim commodo
dignissim diam eget. Vel velit mauris nisi pharetra id. In
fusce feugiat nunc mauris enim ipsum dictumst pretium
convallis.
</div>
</div>
</div>
<div class="swiper-slide">
<div
class="flex p-1rem w-full flex flex-col justify-center items-start gap-1rem"
>
<div class="holder"></div>
<div class="display text-2xl">Star Night</div>
<div class="text-md">
Lorem ipsum dolor sit amet consectetur. Odio enim commodo
dignissim diam eget. Vel velit mauris nisi pharetra id. In
fusce feugiat nunc mauris enim ipsum dictumst pretium
convallis.
</div>
</div>
</div>
<div class="swiper-slide">
<div
class="flex p-1rem w-full flex flex-col justify-center items-start gap-1rem"
>
<div class="holder"></div>
<div class="display text-2xl">Star Night</div>
<div class="text-md">
Lorem ipsum dolor sit amet consectetur. Odio enim commodo
dignissim diam eget. Vel velit mauris nisi pharetra id. In
fusce feugiat nunc mauris enim ipsum dictumst pretium
convallis.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
data-scroll-section
id="third"
class="screen relative content flex flex-col gap-1rem justify-center items-start w-full p-3rem box-border"
>
<div
data-scroll-speed="1"
class="background absolute inset-0 w-full h-full"
>
<img
class="w-full h-full object-cover z-0"
src="./assets/images/landing/background.jpg"
/>
<div
class="absolute inset-0 black-bg w-full h-full opacity-40 z-1"
></div>
</div>
<span
class="display text-2xl mt-2rem z-5"
data-scroll
data-scroll-speed="3"
data-scroll-repeat
data-scroll-call="thirdVisible"
>Lorem Ipsum</span
>
<span
class="about text-lg font-light z-5"
data-scroll
data-scroll-speed="3"
>
Lorem ipsum dolor sit amet consectetur. Odio enim commodo dignissim
diam eget. Vel velit mauris nisi pharetra id. In fusce feugiat nunc
mauris enim ipsum dictumst pretium convallis.
</span>
</div>
</div>
</body>
<script src="./custom-tags/mobile-menu/script.js"></script>
<script src="./assets/locomotive-scroll/locomotive-scroll.min.js"></script>
<script>
let loaded = false;
let secondEntered = false;
let thirdEntered = false;
const locoScroll = new LocomotiveScroll({
el: document.querySelector("[data-scroll-container]"),
smooth: true,
lerp: "0.1",
smartphone: { smooth: true },
touchMultiplier: 2,
});
setTimeout(() => {
locoScroll.destroy();
}, 0);
setTimeout(() => {
locoScroll.init();
locoScroll.on("scroll", () => {
if (loaded) {
setTimeout(() => {
document.querySelector(".infinite-anim").classList.add("opacity-0");
}, 500);
} else {
loaded = true;
}
});
locoScroll.on("call", (event, state) => {
if (event == "secondVisible") {
if (state == "enter") {
secondEntered = true;
setTimeout(() => {
locoScroll.scrollTo(document.querySelector("#second"));
}, 1);
} else {
secondEntered = false;
setTimeout(() => {
if (!thirdEntered) {
locoScroll.scrollTo(document.querySelector("#first"));
}
}, 1);
}
}
if (event == "thirdVisible") {
if (state == "enter") {
thirdEntered = true;
setTimeout(() => {
locoScroll.scrollTo(document.querySelector("#third"));
}, 1);
} else {
thirdEntered = false;
setTimeout(() => {
locoScroll.scrollTo(document.querySelector("#second"));
}, 1);
}
}
});
}, 50);
setTimeout(() => {
locoScroll.update();
}, 1000);
window.scroll = locoScroll;
</script>
<script>
const swiper = new Swiper(".swiper", {
speed: 400,
spaceBetween: 100,
autoplay: {
delay: 2500,
},
});
</script>
</html>