|
241 | 241 | </div>
|
242 | 242 | </div>
|
243 | 243 | </section>
|
244 |
| - <section |
| 244 | + <section id="int" |
245 | 245 | class="my-box-shadow min-h-svh w-full flex flex-col bg-neutral-950 justify-center items-center px-4 py-4 relative">
|
246 | 246 | <div class="min-h-svh w-full flex flex-col justify-center items-center">
|
247 | 247 | <h3 class="text-2xl sm:text-3xl uppercase text-center border-gradientb pb-2">Interests</h3>
|
248 | 248 | <ul class="grid grid-cols-1 sm:grid-cols-2 justify-items-center items-center gap-4 mt-2">
|
249 | 249 | <li
|
250 | 250 | class="bg-gradient-to-r rounded-md from-[#00ffd52c] to-[#3aff4a2c] px-4 py-1 relative overflow-hidden">
|
251 | 251 | <div class="flex justify-between items-center gap-6 cursor-pointer select-none"
|
252 |
| - @click="itemsToggle('anime')"> |
| 252 | + @click="itemsToggle('anime')" id="goint"> |
253 | 253 | My Favorite Anime
|
254 | 254 | <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
255 | 255 | class="bi bi-caret-down-fill" viewBox="0 0 16 16">
|
|
273 | 273 | <li
|
274 | 274 | class="bg-gradient-to-r rounded-md from-[#00ffd52c] to-[#3aff4a2c] px-4 py-1 relative overflow-hidden">
|
275 | 275 | <div class="flex justify-between items-center gap-6 cursor-pointer select-none"
|
276 |
| - @click="itemsToggle('music')"> |
| 276 | + @click="itemsToggle('music')" id="goint"> |
277 | 277 | My Favorite Musics
|
278 | 278 | <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
279 | 279 | class="bi bi-caret-down-fill" viewBox="0 0 16 16">
|
|
299 | 299 | <li
|
300 | 300 | class="bg-gradient-to-r rounded-md from-[#00ffd52c] to-[#3aff4a2c] px-4 py-1 relative overflow-hidden">
|
301 | 301 | <div class="flex justify-between items-center gap-6 cursor-pointer select-none"
|
302 |
| - @click="itemsToggle('game')"> |
| 302 | + @click="itemsToggle('game')" id="goint"> |
303 | 303 | My Favorite Games
|
304 | 304 | <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
305 | 305 | class="bi bi-caret-down-fill" viewBox="0 0 16 16">
|
|
319 | 319 | </ul>
|
320 | 320 | </Transition>
|
321 | 321 | </li>
|
322 |
| - <li |
| 322 | + <li |
323 | 323 | class="bg-gradient-to-r rounded-md from-[#00ffd52c] to-[#3aff4a2c] px-4 py-1 relative overflow-hidden">
|
324 | 324 | <div class="flex justify-between items-center gap-6 cursor-pointer select-none"
|
325 |
| - @click="itemsToggle('books')"> |
| 325 | + @click="itemsToggle('books')" id="goint"> |
326 | 326 | My Favorite Books
|
327 | 327 | <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
328 | 328 | class="bi bi-caret-down-fill" viewBox="0 0 16 16">
|
@@ -361,6 +361,11 @@ let itemsShow = ref({
|
361 | 361 | });
|
362 | 362 | const itemsToggle = (key) => {
|
363 | 363 | itemsShow.value[key] = !itemsShow.value[key];
|
| 364 | + for (let skey in itemsShow.value) { |
| 365 | + if (skey !== key) { |
| 366 | + itemsShow.value[skey] = false; |
| 367 | + } |
| 368 | + } |
364 | 369 | }
|
365 | 370 | onMounted(() => {
|
366 | 371 | let smoother = ScrollSmoother.create({
|
@@ -397,8 +402,17 @@ onMounted(() => {
|
397 | 402 | });
|
398 | 403 | });
|
399 | 404 | });
|
| 405 | + document.querySelectorAll("#goint").forEach((item) => { |
| 406 | + item.addEventListener("click", (event) => { |
| 407 | + event.preventDefault(); |
| 408 | + gsap.to(window, { |
| 409 | + duration: 1, |
| 410 | + scrollTo: document.querySelector("#int"), |
| 411 | + ease: "power2.inOut" |
| 412 | + }); |
| 413 | + }); |
| 414 | + }); |
400 | 415 | });
|
401 |
| -
|
402 | 416 | </script>
|
403 | 417 | <style scoped>
|
404 | 418 | .v-enter-active,
|
|
0 commit comments