Skip to content

Commit 3c8f7c5

Browse files
authored
Merge pull request #4 from jane-does-coding/janesbranch
Added Read More, and Sound to Clicking
2 parents b6a8094 + 99df402 commit 3c8f7c5

File tree

4 files changed

+123
-2
lines changed

4 files changed

+123
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# midnight
2+
3+
checking if branch is set up right

lark-ui/src/routes/+page.svelte

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { goto } from '$app/navigation';
33
import MidnightHeader from '$lib/MidnightHeader.svelte';
44
import { env } from '$env/dynamic/public';
5+
import { onMount } from 'svelte';
56
67
let email = '';
78
let errorMessage = '';
@@ -12,8 +13,34 @@
1213
return emailRegex.test(email);
1314
}
1415
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+
1541
async function handleNavigateToRsvp(event: Event) {
1642
event.preventDefault();
43+
playClick();
1744
errorMessage = '';
1845
1946
if (!email.trim()) {
@@ -363,7 +390,7 @@
363390
</div>
364391

365392
<button
366-
on:click={openModal}
393+
on:click={() => { playClick(); openModal(); }}
367394
type="button"
368395
class="pushable-blue"
369396
>
@@ -389,6 +416,67 @@
389416
</div>
390417
</section>
391418

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+
392480
<section class="w-full flex flex-col items-center overflow-x-hidden pt-12 md:pt-16">
393481
<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">
394482
<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,7 +487,7 @@
399487

400488
<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]">
401489
<button
402-
on:click={() => goto('/faq')}
490+
on:click={navigateToFaq}
403491
class="pushable-blue"
404492
>
405493
<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">

lark-ui/static/sounds/click.mp3

4.9 KB
Binary file not shown.

pnpm-lock.yaml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)