|
2 | 2 | import { goto } from '$app/navigation'; |
3 | 3 | import MidnightHeader from '$lib/MidnightHeader.svelte'; |
4 | 4 | import { env } from '$env/dynamic/public'; |
| 5 | + import { onMount } from 'svelte'; |
5 | 6 | |
6 | 7 | let email = ''; |
7 | 8 | let errorMessage = ''; |
|
12 | 13 | return emailRegex.test(email); |
13 | 14 | } |
14 | 15 |
|
| 16 | +
|
| 17 | +/* Added the clicking sound to buttons */ |
| 18 | +let clickSound: HTMLAudioElement | undefined; |
| 19 | +
|
| 20 | +onMount(() => { |
| 21 | + clickSound = new Audio('/sounds/click.mp3'); |
| 22 | + clickSound.preload = 'auto'; |
| 23 | +}); |
| 24 | +
|
| 25 | +function playClick() { |
| 26 | + if (!clickSound) return; |
| 27 | + try { |
| 28 | + clickSound.currentTime = 0; |
| 29 | + clickSound.play().catch(() => {}); |
| 30 | + } catch (e) { |
| 31 | + clickSound.play().catch(() => {}); |
| 32 | + } |
| 33 | +} |
| 34 | +
|
| 35 | + /* Created a helper to add sound to faq button */ |
| 36 | + function navigateToFaq() { |
| 37 | + playClick(); |
| 38 | + goto('/faq'); |
| 39 | + } |
| 40 | +
|
15 | 41 | async function handleNavigateToRsvp(event: Event) { |
16 | 42 | event.preventDefault(); |
| 43 | + playClick(); |
17 | 44 | errorMessage = ''; |
18 | 45 | |
19 | 46 | if (!email.trim()) { |
|
363 | 390 | </div> |
364 | 391 |
|
365 | 392 | <button |
366 | | - on:click={openModal} |
| 393 | + on:click={() => { playClick(); openModal(); }} |
367 | 394 | type="button" |
368 | 395 | class="pushable-blue" |
369 | 396 | > |
|
389 | 416 | </div> |
390 | 417 | </section> |
391 | 418 |
|
| 419 | + <!-- Read More Section Start --> |
| 420 | + <section |
| 421 | + class="relative flex flex-col md:flex-row justify-center items-center bg-[#443B61] text-white py-16 px-4 sm:px-8" |
| 422 | + > |
| 423 | + <div class="flex flex-col gap-y-[1vw]"> |
| 424 | + |
| 425 | + <div class="flex flex-col md:flex-row items-center justify-center w-[95vw] md:w-[80vw] gap-x-[1vw]"> |
| 426 | + |
| 427 | + <div class="flex flex-col w-full gap-y-[1vw] pb-[2vh]"> |
| 428 | + <div class="bg-[#fee1c0]/0 rounded-xl w-full px-[2vw] py-[1vh]"> |
| 429 | + <p class="font-['Moga',_serif] font-bold text-[#fee1c0] text-center text-[8vh] tracking-[3.84px]">How it works</p> |
| 430 | + </div> |
| 431 | + <div class="bg-[#fee1c0] rounded-xl w-full px-[2vw] py-[1.5vh]"> |
| 432 | + <p class="font-['PT_Serif',_serif] font-bold text-[#443B61] text-[3.5vh]">1. Work on projects</p> |
| 433 | + </div> |
| 434 | + <div class="bg-[#fee1c0] rounded-xl w-full px-[2vw] py-[1.5vh]"> |
| 435 | + <p class="font-['PT_Serif',_serif] font-bold text-[#443B61] text-[3.5vh]">2. Collect your hours</p> |
| 436 | + </div> |
| 437 | + <div class="bg-[#fee1c0] rounded-xl w-full px-[2vw] py-[1.5vh]"> |
| 438 | + <p class="font-['PT_Serif',_serif] font-bold text-[#443B61] text-[3.5vh]">3. Fly to Vienna, Austria</p> |
| 439 | + </div> |
| 440 | + <button |
| 441 | + on:click={() => { playClick(); openModal(); }} |
| 442 | + type="button" |
| 443 | + class="pushable-blue" |
| 444 | + > |
| 445 | + <span class="front-blue font-['Moga',_sans-serif] text-[#fee1c0] text-[6vh] text-center text-nowrap tracking-[3.84px] whitespace-pre"> |
| 446 | + Read More |
| 447 | + </span> |
| 448 | + </button> |
| 449 | + |
| 450 | + </div> |
| 451 | + |
| 452 | + <img |
| 453 | + alt="The Hack Club Midnight Team" |
| 454 | + src="https://hc-cdn.hel1.your-objectstorage.com/s/v3/7ada8a0621f0f84c5059b856cdea1bc1ab3e4bf0_group_photo.png" |
| 455 | + class="rounded-xl mt-[1vh] md:mt-6 w-[90vw] md:w-[37.5vw] object-cover" |
| 456 | + /> |
| 457 | + |
| 458 | + </div> |
| 459 | + |
| 460 | + <div class="bg-[#fee1c0] rounded-xl w-full px-[2vw] py-[1.5vh]"> |
| 461 | + <p class="font-['PT_Serif',_serif] font-bold text-[#443B61] text-[3.5vh] text-center">Build new projects, and learn with other highschoolers</p> |
| 462 | + </div> |
| 463 | + |
| 464 | + <div class="w-[95vw] md:w-[80vw] flex gap-[1vw]"> |
| 465 | + <div class="w-2/10 bg-[#fee1c0] rounded-xl items-center justify-center p-[2vw] hidden md:flex"> |
| 466 | + <img alt="The Crow" class="w-full h-auto block" style="object-fit: contain; background-repeat: no-repeat; background-size: contain;" src="/sad.png" /> |
| 467 | + </div> |
| 468 | + |
| 469 | + <div class="bg-[#f24b4b] w-full md:w-8/10 rounded-xl px-[2vw] py-[2.5vh] flex items-center justify-center text-left"> |
| 470 | + <p class="text-[#fee1c0] font-['PT_Serif',_serif] font-bold text-[2.75vh]"> Hack Club Midnight is a two-month online-to-in-person hackathon in Vienna, bringing hackers together to build creative projects, connect through events, and experience a unique murder-mystery themed adventure. |
| 471 | + </p> |
| 472 | + </div> |
| 473 | + </div> |
| 474 | + |
| 475 | + |
| 476 | + </div> |
| 477 | + </section> |
| 478 | + <!-- Read More Section End --> |
| 479 | + |
392 | 480 | <section class="w-full flex flex-col items-center overflow-x-hidden pt-12 md:pt-16"> |
393 | 481 | <div class="bg-[#2A2746] aspect-video w-[110%] sm:w-[95%] md:w-[85%] lg:w-4/5 p-4 flex items-center justify-center mb-8 relative z-10"> |
394 | 482 | <iframe width="560" height="315" src="https://www.youtube.com/embed/oKHU66Ar6Gk?si=9kKLARVPPCcyygt-" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" class="w-full h-full" allowfullscreen></iframe> |
|
399 | 487 |
|
400 | 488 | <div class="absolute top-[10%] left-1/2 transform -translate-x-1/2 flex flex-col md:flex-row items-center justify-center gap-4 md:gap-6 rotate-[-4.25deg]"> |
401 | 489 | <button |
402 | | - on:click={() => goto('/faq')} |
| 490 | + on:click={navigateToFaq} |
403 | 491 | class="pushable-blue" |
404 | 492 | > |
405 | 493 | <span class="front-blue font-['Moga',_sans-serif] text-[#fee1c0] text-3xl md:text-4xl lg:text-5xl xl:text-[64px] 2xl:text-[64px] text-center text-nowrap tracking-[3.84px] whitespace-pre"> |
|
0 commit comments