From 84899cdbdd28022cf70f26249aac3873c6d7cb98 Mon Sep 17 00:00:00 2001 From: Malted Date: Fri, 26 Jan 2024 17:26:17 +0100 Subject: [PATCH] Run prettier --- components/bio.js | 2 +- components/footer.js | 9 +- components/hackathons/features/money.js | 6 +- components/hackathons/recap.js | 3 +- components/hcb/apply/hcb-info.js | 5 +- components/hcb/everything.js | 16 +- components/hcb/stats.js | 8 +- components/index/cards/hackathons.js | 4 +- components/index/cards/haunted.js | 51 +- components/index/cards/haxidraw.js | 4 +- components/index/cards/mailing-list.js | 133 +-- components/index/cards/onboard.js | 50 +- components/index/cards/pizza.js | 117 ++- components/index/cards/sprig-console.js | 2 +- components/index/github.js | 4 +- components/mail-card.js | 30 +- components/nav.js | 8 +- lib/use-form.js | 8 +- middleware.js | 5 +- pages/api/hcb/apply.js | 2 +- pages/api/steve.js | 106 +- pages/clubs.js | 11 +- pages/events.js | 5 +- pages/hackathons/grant.js | 4 +- pages/hackathons/index.js | 20 +- pages/hcb/climate/index.js | 5 +- pages/index.js | 10 +- pages/night.js | 3 +- pages/onboard/first.js | 53 +- pages/onboard/index.js | 45 +- pages/philanthropy/index.js | 31 +- pages/pizza.js | 1246 ++++++++++++++--------- pages/santa.js | 17 +- pages/steve.js | 739 ++++++++------ pages/team.js | 8 +- 35 files changed, 1658 insertions(+), 1112 deletions(-) diff --git a/components/bio.js b/components/bio.js index 00e822f7..7daa1f9d 100644 --- a/components/bio.js +++ b/components/bio.js @@ -25,7 +25,7 @@ export default function Bio({ popup = true, spanTwo = false, ...props }) { overflowY: 'hidden', overscrollBehavior: 'contain', gridColumn: !spanTwo ? null : [null, null, `1 / span 2`], - position: 'relative', + position: 'relative' }} as={href && !text ? 'a' : 'div'} href={href} diff --git a/components/footer.js b/components/footer.js index 3807db0b..76afb92a 100644 --- a/components/footer.js +++ b/components/footer.js @@ -19,8 +19,6 @@ const Base = styled(Box)` } ` - - const Logo = props => ( ( ) -const Footer = ({ dark = false, email = "team@hackclub.com", children, ...props }) => ( +const Footer = ({ + dark = false, + email = 'team@hackclub.com', + children, + ...props +}) => ( ( - $500 grants. - - } + leadText={<>$500 grants.} body={ <> Running on HCB? Get a $500 grant once you have a venue, provided diff --git a/components/hackathons/recap.js b/components/hackathons/recap.js index a924c381..19a559b0 100644 --- a/components/hackathons/recap.js +++ b/components/hackathons/recap.js @@ -81,7 +81,8 @@ export default function Recap() { name="$500 grants" desc={ <> - Join HCB to receive a $500 grant for your hackathon and a suite of financial tools. + Join HCB to receive a $500 grant for your hackathon and a suite + of financial tools. } /> diff --git a/components/hcb/apply/hcb-info.js b/components/hcb/apply/hcb-info.js index ed34e993..fcae4646 100644 --- a/components/hcb/apply/hcb-info.js +++ b/components/hcb/apply/hcb-info.js @@ -63,7 +63,10 @@ export default function HCBInfo() { Rather than setting up a standard bank account, you'll get a restricted fund within Hack Club accounts. -
  • You can't deposit or withdraw cash. But you can receive any kind of electronic payment!
  • +
  • + You can't deposit or withdraw cash. But you can receive any + kind of electronic payment! +
  • diff --git a/components/hcb/everything.js b/components/hcb/everything.js index 1474a82f..83f74fbf 100644 --- a/components/hcb/everything.js +++ b/components/hcb/everything.js @@ -52,12 +52,12 @@ export default function Everything({ fee, partner = false }) { item.includes('signup') ? 'bolt' : item.includes('card') - ? 'card' - : item.includes('Transparency') - ? 'explore' - : item.includes('Physical') - ? 'email' - : 'enter' + ? 'card' + : item.includes('Transparency') + ? 'explore' + : item.includes('Physical') + ? 'email' + : 'enter' } > {item} @@ -73,8 +73,8 @@ export default function Everything({ fee, partner = false }) { item.startsWith('Instant') ? 'bolt' : item.includes('form') - ? 'link' - : 'enter' + ? 'link' + : 'enter' } > {item} diff --git a/components/hcb/stats.js b/components/hcb/stats.js index 4b2524a2..163e1119 100644 --- a/components/hcb/stats.js +++ b/components/hcb/stats.js @@ -5,10 +5,10 @@ const easeInOutExpo = x => x === 0 ? 0 : x === 1 - ? 1 - : x < 0.5 - ? Math.pow(2, 20 * x - 10) / 2 - : (2 - Math.pow(2, -20 * x + 10)) / 2 + ? 1 + : x < 0.5 + ? Math.pow(2, 20 * x - 10) / 2 + : (2 - Math.pow(2, -20 * x + 10)) / 2 function startMoneyAnimation( setBalance, diff --git a/components/index/cards/hackathons.js b/components/index/cards/hackathons.js index 6c00be83..2e94da24 100644 --- a/components/index/cards/hackathons.js +++ b/components/index/cards/hackathons.js @@ -1,8 +1,8 @@ import CardModel from './card-model' -import {Box, Flex, Grid, Image, Link, Text} from 'theme-ui' +import { Box, Flex, Grid, Image, Link, Text } from 'theme-ui' import Buttons from './button' import Dot from '../../dot' -import {formatDate} from '../../../lib/dates' +import { formatDate } from '../../../lib/dates' /** @jsxImportSource theme-ui */ const Cover = () => ( diff --git a/components/index/cards/haunted.js b/components/index/cards/haunted.js index a4eecd24..3379646b 100644 --- a/components/index/cards/haunted.js +++ b/components/index/cards/haunted.js @@ -1,6 +1,6 @@ -import CardModel from "./card-model"; -import { Box, Flex, Grid, Image, Text, Link } from "theme-ui"; -import Buttons from "./button"; +import CardModel from './card-model' +import { Box, Flex, Grid, Image, Text, Link } from 'theme-ui' +import Buttons from './button' /** @jsxImportSource theme-ui */ @@ -10,47 +10,52 @@ export default function Haunted() { github_link="https://github.com/hackclub/www-hauntedhouse" color="white" sx={{ - backgroundSize: "cover", - backgroundColor: "#95C9E5", - border: "2px solid #EB6424", + backgroundSize: 'cover', + backgroundColor: '#95C9E5', + border: '2px solid #EB6424' }} - position={[null, "bottom", "bottom"]} + position={[null, 'bottom', 'bottom']} highlight="#cc5600" image="/haunted/bg.webp" filter="brightness(0.7)" > - + Haunted - - Haunted House is a Chicago-based event full of sites and frights! Join us from October 28-29 - for a weekend of coding pushing the bounds of creativity, where fright meets byte! + Haunted House is a Chicago-based event full of sites and frights! Join + us from October 28-29 for a weekend of coding pushing the bounds of + creativity, where fright meets byte! - - Sign Up - + + Sign Up + - ); + ) } diff --git a/components/index/cards/haxidraw.js b/components/index/cards/haxidraw.js index be372328..5af1d22d 100644 --- a/components/index/cards/haxidraw.js +++ b/components/index/cards/haxidraw.js @@ -29,8 +29,8 @@ export default function Haxidraw({ stars }) { variant="subtitle" sx={{ zIndex: 2, position: 'relative' }} > - Blot is an open source drawing machine and online editor, - designed to be a fun and beginner friendly introduction to digital + Blot is an open source drawing machine and online editor, designed + to be a fun and beginner friendly introduction to digital fabrication and generative art. diff --git a/components/index/cards/mailing-list.js b/components/index/cards/mailing-list.js index ddbe5166..a81d9bff 100644 --- a/components/index/cards/mailing-list.js +++ b/components/index/cards/mailing-list.js @@ -23,8 +23,8 @@ const Loading = () => ( mr: '5px', '@keyframes spin': { '0%': { transform: 'rotate(0deg)' }, - '100%': { transform: 'rotate(360deg)' }, - }, + '100%': { transform: 'rotate(360deg)' } + } }} > ) @@ -35,19 +35,19 @@ const MailingList = () => { const [data, setData] = useState({ finalHtml: [], names: [] }) const formRef = useRef(null) - const handleSubmit = async (e) => { + const handleSubmit = async e => { e.preventDefault() setSubmitting(true) let res = await fetch('/api/mailing-list', { method: 'POST', headers: { - 'Content-Type': 'application/json', + 'Content-Type': 'application/json' }, body: JSON.stringify({ name: e.target.name.value, - email: e.target.email.value, - }), + email: e.target.email.value + }) }) formRef.current.reset() @@ -66,22 +66,33 @@ const MailingList = () => { useEffect(() => { Promise.all([ - fetch('https://api.github.com/repos/hackclub/leaders-newsletter/contents/updates') + fetch( + 'https://api.github.com/repos/hackclub/leaders-newsletter/contents/updates' + ) .then(response => response.json()) .then(data => data.sort((a, b) => b.name.localeCompare(a.name))) // Makes sure we only get the latest two newsletters .then(data => data.slice(0, 2)) .then(data => Promise.all(data.map(item => fetch(item.download_url)))) // Makes a separate fetch request for the content of each newsletter - .then(responses => Promise.all(responses.map(response => response.text()))) - .then(markdown => Promise.all(markdown.map(markdown => markdownToHtml(markdown)))) - .then(html => html.map(html => html.replace(/<[^>]*>/g, '').replace(/The Hackening/g, ''))), // Chucks out all html tags + 'The Hackening' - - fetch('https://api.github.com/repos/hackclub/leaders-newsletter/contents/updates') + .then(responses => + Promise.all(responses.map(response => response.text())) + ) + .then(markdown => + Promise.all(markdown.map(markdown => markdownToHtml(markdown))) + ) + .then(html => + html.map(html => + html.replace(/<[^>]*>/g, '').replace(/The Hackening/g, '') + ) + ), // Chucks out all html tags + 'The Hackening' + + fetch( + 'https://api.github.com/repos/hackclub/leaders-newsletter/contents/updates' + ) .then(response => response.json()) .then(data => data.sort((a, b) => b.name.localeCompare(a.name))) .then(data => data.map(item => item.name.split('.')[0])) // Grabs the name and gets rid of the file extension - ]) - .then(([finalHtml, names]) => setData({ finalHtml, names })) - }, []) + ]).then(([finalHtml, names]) => setData({ finalHtml, names })) + }, []) return ( @@ -93,10 +104,12 @@ const MailingList = () => { background: 'rgb(255,255,255, 0.45)', position: 'relative', zIndex: 2, - backdropFilter: 'blur(8px)', + backdropFilter: 'blur(8px)' }} > - + { alignItems: ['left', 'left', 'center'], flexDirection: 'column', gap: '10px', - width: ['100%', '100%', '75%'], + width: ['100%', '100%', '75%'] }} > Join the newsletter @@ -123,23 +136,24 @@ const MailingList = () => { color: 'darkless', mt: 2, fontSize: 3, - textAlign: 'left', + textAlign: 'left' }} - as='p' + as="p" > - We'll send you an email no more than once a month, when we work - on something cool for you. Check out our{' '} + We'll send you an email no more than once a month, when we + work on something cool for you. Check out our{' '} previous issues - . + + . { textAlign: 'center', alignItems: 'end', input: { bg: 'sunken' }, - width: '100%', + width: '100%' }} >
    - -
    diff --git a/pages/index.js b/pages/index.js index 0cfac116..1be572c8 100644 --- a/pages/index.js +++ b/pages/index.js @@ -410,15 +410,15 @@ function Page({ count === images.length - 2 ? images[0].src : images.length - 1 - ? images[1].src - : images[count + 2].src + ? images[1].src + : images[count + 2].src } alt={ count === images.length - 2 ? images[0].alt : images.length - 1 - ? images[1].alt - : images[count + 2].alt + ? images[1].alt + : images[count + 2].alt } width={3000} height={2550} @@ -778,7 +778,7 @@ function Page({ url={data.url} message={data.message} key={key} - opacity={1 / (key/2 + 1)} + opacity={1 / (key / 2 + 1)} /> ) })} diff --git a/pages/night.js b/pages/night.js index eac1473b..eea57dcf 100644 --- a/pages/night.js +++ b/pages/night.js @@ -99,7 +99,8 @@ const Page = () => ( hang out on a chill call. - Hack nights are hosted regularly by Hack Clubbers. Come join or start an impromptu Hack session on{' '} + Hack nights are hosted regularly by Hack Clubbers. Come join or start + an impromptu Hack session on{' '} #hack-night diff --git a/pages/onboard/first.js b/pages/onboard/first.js index 4c49cad6..fcdd8dc3 100644 --- a/pages/onboard/first.js +++ b/pages/onboard/first.js @@ -1,14 +1,14 @@ -import { Box, Button, Flex, Grid, Heading, Image, Link, Text } from "theme-ui"; -import Balancer from "react-wrap-balancer"; -import Head from "next/head"; -import Meta from "@hackclub/meta"; -import Nav from "../../components/nav"; -import Footer from "../../components/footer"; -import FadeIn from "../../components/fade-in"; -import Sparkles from "../../components/sparkles"; -import Tilt from "../../components/tilt"; -import usePrefersReducedMotion from "../../lib/use-prefers-reduced-motion"; -import { useEffect, useRef, useState } from "react"; +import { Box, Button, Flex, Grid, Heading, Image, Link, Text } from 'theme-ui' +import Balancer from 'react-wrap-balancer' +import Head from 'next/head' +import Meta from '@hackclub/meta' +import Nav from '../../components/nav' +import Footer from '../../components/footer' +import FadeIn from '../../components/fade-in' +import Sparkles from '../../components/sparkles' +import Tilt from '../../components/tilt' +import usePrefersReducedMotion from '../../lib/use-prefers-reduced-motion' +import { useEffect, useRef, useState } from 'react' /** * @type {import('theme-ui').ThemeUIStyleObject} @@ -443,7 +443,9 @@ const ShipPage = () => { color: '#87ffa1' }} > - OnBoard with FIRST® + + OnBoard with FIRST® + { magical . You design one, we'll print it! -

    - Plus! FIRST team members get a limited edition PCB badge designed with Dean Kamen. +
    +
    + Plus! FIRST team members get a limited edition PCB badge + designed with Dean Kamen.
    - + diff --git a/pages/onboard/index.js b/pages/onboard/index.js index dc288889..1b8c1c14 100644 --- a/pages/onboard/index.js +++ b/pages/onboard/index.js @@ -1,14 +1,14 @@ -import { Box, Button, Flex, Grid, Heading, Image, Link, Text } from "theme-ui"; -import Balancer from "react-wrap-balancer"; -import Head from "next/head"; -import Meta from "@hackclub/meta"; -import Nav from "../../components/nav"; -import Footer from "../../components/footer"; -import FadeIn from "../../components/fade-in"; -import Sparkles from "../../components/sparkles"; -import Tilt from "../../components/tilt"; -import usePrefersReducedMotion from "../../lib/use-prefers-reduced-motion"; -import { useEffect, useRef, useState } from "react"; +import { Box, Button, Flex, Grid, Heading, Image, Link, Text } from 'theme-ui' +import Balancer from 'react-wrap-balancer' +import Head from 'next/head' +import Meta from '@hackclub/meta' +import Nav from '../../components/nav' +import Footer from '../../components/footer' +import FadeIn from '../../components/fade-in' +import Sparkles from '../../components/sparkles' +import Tilt from '../../components/tilt' +import usePrefersReducedMotion from '../../lib/use-prefers-reduced-motion' +import { useEffect, useRef, useState } from 'react' /** * @type {import('theme-ui').ThemeUIStyleObject} @@ -459,7 +459,7 @@ const ShipPage = () => { - + diff --git a/pages/philanthropy/index.js b/pages/philanthropy/index.js index d49049dc..24f3505d 100644 --- a/pages/philanthropy/index.js +++ b/pages/philanthropy/index.js @@ -631,7 +631,7 @@ const Philanthropy = ({ posts = [] }) => { 2023 Form will be shared when ready. - - + + + - - - {/* + + {/* @@ -172,361 +255,562 @@ pointerEvents: 'none' */} - - - mushroom - - - - + + mushroom + + + + + pineapple + + + + + tomato + + + + + pizza - pineapple - - - - + + + - tomato - - - - - pizza - - - - - - - Create A Space for Makers - - - Hack Club is a place for technical teens to get together and build projects together. Create a club at your high school and help others discover the joy of coding through building projects. - - - - teens collaborating on tech products - - -
    -
    - - - - + + Hack Club is a place for technical teens to get together and build + projects together. Create a club at your high school and help + others discover the joy of coding through building projects. + + + + teens collaborating on tech products + + +
    +
    + + - Join A Community of Teen Hackers - - - - In our Slack community of over 25,000 hackers, you'll be invited to a space for Hack Club leaders to ask questions & chat, share projects, & attend events. - - - - - - -Tools & Perks To Lead Your Club - - - - As a club leader, you'll get to use community projects like Sprig & Jams in your Hack Club! Your Club will also get free access to Zoom Pro & Figma Pro. - - - - - - - Lead Weekly - Club Meetings - - - - Every week you can craft club meetings to help makers at your school discover the joy of coding. Get inspired by some Jams we built to help you lead your club. - - - - - - - - - - - - Pizzas & Clubs by Leaders - - - - - - {() => ( - - {pizzasByClubs.map((pizzaByClub, idx) => ( - - - pizza drawn by club - - {pizzaByClub.author} ({pizzaByClub.age}) from {pizzaByClub.from} -
    - {pizzaByClub.response} -
    - ))} -
    - )} -
    - -
    - - - -

    - Above -

    - - Get Your Pizza + + + Join A Community of Teen Hackers - - - - - - 1. - Start Your Club - - - Every Hack Club starts with a teenager like you who wants to bring an amazing community to their high school. - - teen club of coders - - - - - - - - - 2. - Draw A Pizza - - - Join #pizza-party on the Hack Club Slack & draw a Pixel Pizza - - pixel editor gif - - + + + + + Tools & Perks To Lead Your Club + + + + As a club leader, you'll get to use community projects like Sprig + & Jams in your Hack Club! Your Club will also get free access to + Zoom Pro & Figma Pro. + + + + + + + Lead Weekly Club Meetings + + + + Every week you can craft club meetings to help makers at your + school discover the joy of coding. Get inspired by some Jams we + built to help you lead your club.{' '} + + + + + +
    + + + + Pizzas & Clubs by Leaders + {' '} + + + + {() => ( + + {pizzasByClubs.map((pizzaByClub, idx) => ( + + + pizza drawn by club + + + {pizzaByClub.author} ({pizzaByClub.age}) from{' '} + {pizzaByClub.from} + +
    + + {pizzaByClub.response} + +
    + ))} +
    + )} +
    +
    + + + +

    + Above +

    + + Get Your Pizza + + + + + + 1. + + Start Your Club + + + + Every Hack Club starts with a teenager like you who wants to + bring an amazing community to their high school. + + teen club of coders + + + -
    - - - - 3. - Order Pizza + + + 2. + + Draw A Pizza + - - Receive a Pizza Grant through HCB & use your HCB Virtual Card to order pizzas + + Join{' '} + + #pizza-party + {' '} + on the Hack Club Slack & draw a Pixel Pizza + + pixel editor gif + + + + + + + + 3. + + Order Pizza + + + + Receive a Pizza Grant through HCB & use your HCB Virtual Card to + order pizzas - HCB Card + sx={{ + boxShadow: '0px 3.17143px 3.17143px 0px rgba(0, 0, 0, 0.25)' + }} + > + HCB Card - + - - - -
    - - - - p.s. if you already lead a club, you can still get pizza! draw a pizza in#pizza-party - - - - Need help getting your Pizza Grant? Email thomas@hackclub.com - - -