From 20f8d984756d222a63e8bf7fee9c500912c12f34 Mon Sep 17 00:00:00 2001 From: Max Wofford Date: Thu, 4 Apr 2024 12:33:34 -0400 Subject: [PATCH] A few more bin improvements --- pages/bin.js | 111 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 38 deletions(-) diff --git a/pages/bin.js b/pages/bin.js index 6b6e7f22..a7ff5918 100644 --- a/pages/bin.js +++ b/pages/bin.js @@ -16,9 +16,10 @@ import { useEffect, useState } from 'react' import Footer from '../components/footer' import { keyframes } from '@emotion/react' import RsvpForm from '../components/bin/rsvp-form' -import { Slide } from 'react-reveal' +import { Fade } from 'react-reveal' import ForceTheme from '../components/force-theme' import JSConfetti from 'js-confetti' +import Sparkles from '../components/sparkles' function fireConfetti() { const jsConfetti = new JSConfetti() @@ -36,7 +37,7 @@ const RsvpCount = () => { setRsvpCount(results) }, []) - return {100 - rsvpCount} RSVPs until the start of... + return {200 - rsvpCount} RSVPs until the start of... } const stickerImages = [ @@ -73,6 +74,10 @@ const Electronic = ({ imageUrl, name, description }) => { ) } +const spin = keyframes({ + from: { transform: 'rotate(0deg)' }, + to: { transform: 'rotate(360deg)' } +}) const wobble = keyframes({ from: { transform: 'rotate(15deg)' }, to: { transform: 'rotate(20deg)' } @@ -84,6 +89,19 @@ const bounce = keyframes({ '100%': { transform: 'scaleX(100%) scaleY(100%)' } }) +function crunch() { + const crunchAudioUrls = [ + 'https://cloud-fwf97jf44-hack-club-bot.vercel.app/0crunch_4_audio.mp4', + 'https://cloud-fwf97jf44-hack-club-bot.vercel.app/1crunch_3_audio.mp4', + 'https://cloud-fwf97jf44-hack-club-bot.vercel.app/2crunch_2_audio.mp4', + 'https://cloud-fwf97jf44-hack-club-bot.vercel.app/3crunch_1_audio.mp4', + ] + const randomCrunch = crunchAudioUrls[Math.floor(Math.random() * crunchAudioUrls.length)] + + const audio = new Audio(randomCrunch) + audio.play() +} + export default function Bin() { return ( <> @@ -93,14 +111,25 @@ export default function Bin() { - + - { fireConfetti(); crunch() }} + sx={{ + cursor: 'pointer', + ':active': { + animation: `${bounce} 0.125s` + }, + }} + /> + {/* 🗑️ - + */}
- - The Bin - + + + + + + {/* + + The Bin + + */} An electronics starter kit, customized for your project
- - - High schoolers can get a kit of electronics parts for free to - build their first project. - - - RSVP to get notified when applications open. - - - + + + + High schoolers can get a kit of electronics parts for free to + build their first project. + + + RSVP to get notified when applications open. + + + +
@@ -194,19 +232,18 @@ export default function Bin() {
- Ideas + Think! - With your parts picked out, what will you make? A - voice activated laser? A portable disco party? A flashlight + With your parts picked out, what will you make? A portable disco party? A flashlight that only turns on in the daytime? - - 3. Prototype + + Prototype Turn your idea into something almost real: simulate your @@ -214,20 +251,18 @@ export default function Bin() { - + + - - - - - 4. Show off & ship it! + + Build it! - Show off your circuit! If it works in simulation,{' '} - we’ll send you the parts to build it in real life. + If it works in simulation, we’ll send you the parts to + build it in real life. @@ -253,9 +288,9 @@ export default function Bin() { Hack Club is a registered 501(c)3 nonprofit organization that supports a network of 20k+ technical high schoolers. We believe you learn best by building so we're removing barriers to hardware access - so any teenager can explore. In the past few years, we've{' '} - - partnered with GitHub to give away $50k of hardware + so any teenager can explore. In the past few years, we{' '} + + fabricated custom PCBs designed by teenagers ,{' '} , and{' '} - - fabricated custom PCBs designed by teenagers + + gave away $75k of hardware .