From 362f88c52240ebeea3655861905a8e267fdd7a9e Mon Sep 17 00:00:00 2001 From: Malted Date: Thu, 6 Apr 2023 22:32:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=9A=20Improve=20super=20secret=20easte?= =?UTF-8?q?r=20egg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pages/index.js b/pages/index.js index 633afe7c..f070501f 100644 --- a/pages/index.js +++ b/pages/index.js @@ -28,6 +28,7 @@ import Epoch from '../components/index/cards/epoch' import Hackathons from '../components/index/cards/hackathons' import AssembleImgFile from '../public/home/assemble.jpg' import Konami from 'react-konami-code' +import JSConfetti from 'js-confetti' import Secret from '../components/secret' import MailingList from '../components/index/cards/mailing-list' import Slack from '../components/index/cards/slack' @@ -61,13 +62,29 @@ function Page({ let [slackKey, setSlackKey] = useState(0) let [key, setKey] = useState(0) + let jsConfetti; + useEffect(() => { + jsConfetti = new JSConfetti() + window.kc = `In the days of old, when gaming was young \nA mysterious code was found among \nA sequence of buttons, pressed in a row \nIt unlocked something special, we all know \n\nUp, up, down, down, left, right, left, right \nB, A, Start, we all have heard it's plight \nIn the 8-bit days, it was all the rage \nAnd it still lives on, with time, it will never age \n\nKonami Code, it's a legend of days gone by \nIt's a reminder of the classics we still try \nNo matter the game, no matter the system \nThe code will live on, and still be with them \n\nSo the next time you play, take a moment to pause \nAnd remember the code, and the Konami cause \nIt's a part of gaming's history, and a part of our lives \nLet's keep it alive, and let the Konami Code thrive!\n` window.paper = `Welcome, intrepid hacker! We'd love to have you in our community. Get your invite at hack.af/slack. Under "Why do you want to join the Hack Club Slack?" add a 🦄 and we'll ship you some exclusive stickers! ` }, []) const easterEgg = () => { alert('Hey, you typed the Konami Code!') + + jsConfetti.addConfetti({ + confettiColors: [ // Hack Club colours! + '#ec3750', + '#ff8c37', + '#f1c40f', + '#33d6a6', + '#5bc0de', + '#338eda', + '#a633d6', + ], + }) } useEffect(() => { @@ -139,7 +156,7 @@ function Page({ console.log('hover:', hover) }} /> - + {"Hey, I'm an Easter Egg! Look at me!"}