Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign of the newsletter section! #943

Closed
wants to merge 119 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
5ddff99
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
7c7be22
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
26eb507
Merge remote-tracking branch 'origin/toby-patch' into toby-patch
tobyab Sep 29, 2023
690b947
further fancifying of the mail card
tobyab Sep 29, 2023
daf9d54
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
f7ccb08
further fanciness
tobyab Sep 30, 2023
4627f29
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
96c8433
further fancifying of the mail card
tobyab Sep 29, 2023
805e82c
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
7c03198
further fanciness
tobyab Sep 30, 2023
6b80c89
Merge remote-tracking branch 'origin/toby-patch' into toby-patch
tobyab Sep 30, 2023
1b94301
biiiiiig commit — reversing formatting. + polishing cards
tobyab Oct 1, 2023
df35278
syncing pizza.js + fancy button
tobyab Oct 1, 2023
43f2415
mobile support!
tobyab Oct 3, 2023
2599d03
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
0d43260
further fanciness
tobyab Sep 30, 2023
26c2b87
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
6dde5d0
further fancifying of the mail card
tobyab Sep 29, 2023
fbfd3e0
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
bab735d
further fanciness
tobyab Sep 30, 2023
1f170ea
biiiiiig commit — reversing formatting. + polishing cards
tobyab Oct 1, 2023
ca4dcc7
syncing pizza.js + fancy button
tobyab Oct 1, 2023
efb88cd
mobile support!
tobyab Oct 3, 2023
81287fa
Merge remote-tracking branch 'origin/toby-patch' into toby-patch
tobyab Oct 4, 2023
48b04f2
bloody merge conflicts!
tobyab Oct 4, 2023
1cda84f
updating copy + fixing links
tobyab Oct 5, 2023
dd0905f
Update team.js
sampoder Oct 6, 2023
4625526
Update team.js
sampoder Oct 6, 2023
1f06865
Update team.js
sampoder Oct 6, 2023
acfd7bc
Update team.js
sampoder Oct 6, 2023
01274e8
Update team.js
sampoder Oct 6, 2023
0f2610f
changes
tobyab Oct 6, 2023
7358a48
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
e7264d4
further fanciness
tobyab Sep 30, 2023
e2ed099
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
a3e18ae
further fancifying of the mail card
tobyab Sep 29, 2023
a1ab3fc
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
f0a30b3
further fanciness
tobyab Sep 30, 2023
38feff3
biiiiiig commit — reversing formatting. + polishing cards
tobyab Oct 1, 2023
c905ce8
syncing pizza.js + fancy button
tobyab Oct 1, 2023
9f962b1
mobile support!
tobyab Oct 3, 2023
7d0c8bc
further fancifying of the mail card
tobyab Sep 29, 2023
d46af7c
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
5204187
further fanciness
tobyab Sep 30, 2023
517fa85
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
0f26822
further fancifying of the mail card
tobyab Sep 29, 2023
496c094
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
510146e
further fanciness
tobyab Sep 30, 2023
179ad57
biiiiiig commit — reversing formatting. + polishing cards
tobyab Oct 1, 2023
72b5746
syncing pizza.js + fancy button
tobyab Oct 1, 2023
bceb66d
mobile support!
tobyab Oct 3, 2023
ac3aec0
bloody merge conflicts!
tobyab Oct 4, 2023
bdf9479
updating copy + fixing links
tobyab Oct 5, 2023
f9b4866
changes
tobyab Oct 6, 2023
b749e81
Merge remote-tracking branch 'origin/toby-patch' into toby-patch
tobyab Oct 6, 2023
1b756c2
tweaking!
tobyab Oct 6, 2023
3d64381
updated
tobyab Oct 6, 2023
ec3fc22
changed padding up
tobyab Oct 6, 2023
23873dd
wrong newsletter...
tobyab Oct 7, 2023
11d7bad
Add outernet video to event
ShubhamPatilsd Oct 8, 2023
b430b13
Add haunted house
ShubhamPatilsd Oct 8, 2023
a146b3d
Merge pull request #947 from ShubhamPatilsd/hauntedhouse
sampoder Oct 8, 2023
0293f8a
Fix outernet and haunted house
ShubhamPatilsd Oct 8, 2023
1281dd4
Merge pull request #948 from ShubhamPatilsd/main
sampoder Oct 8, 2023
c13c7cc
haunted house card
ivoinestrachan Oct 9, 2023
0d96677
new card text
ivoinestrachan Oct 9, 2023
1521c2b
haunted house card
ivoinestrachan Oct 9, 2023
e34ea94
Merge pull request #950 from ivoinestrachan/main
sampoder Oct 9, 2023
103c1d5
updating haunted card link colour
tobyab Oct 9, 2023
693af8c
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
365186e
further fanciness
tobyab Sep 30, 2023
e1de054
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
2adfb97
further fancifying of the mail card
tobyab Sep 29, 2023
d16cd1b
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
55de0a4
further fanciness
tobyab Sep 30, 2023
e4a0d30
biiiiiig commit — reversing formatting. + polishing cards
tobyab Oct 1, 2023
d32a07a
syncing pizza.js + fancy button
tobyab Oct 1, 2023
7b903d7
mobile support!
tobyab Oct 3, 2023
71b3df1
further fancifying of the mail card
tobyab Sep 29, 2023
192719e
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
baf8d2c
further fanciness
tobyab Sep 30, 2023
6db36cc
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
ee97970
further fancifying of the mail card
tobyab Sep 29, 2023
98371c0
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
41f486d
further fanciness
tobyab Sep 30, 2023
1e762b1
biiiiiig commit — reversing formatting. + polishing cards
tobyab Oct 1, 2023
08e0adb
syncing pizza.js + fancy button
tobyab Oct 1, 2023
f227028
mobile support!
tobyab Oct 3, 2023
3dafead
bloody merge conflicts!
tobyab Oct 4, 2023
38f2440
updating copy + fixing links
tobyab Oct 5, 2023
4d41648
changes
tobyab Oct 6, 2023
ac6b08b
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
06dc036
further fanciness
tobyab Sep 30, 2023
2607c33
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
8d68727
further fancifying of the mail card
tobyab Sep 29, 2023
50113db
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
353e819
further fanciness
tobyab Sep 30, 2023
9087cf0
biiiiiig commit — reversing formatting. + polishing cards
tobyab Oct 1, 2023
cad2ab2
syncing pizza.js + fancy button
tobyab Oct 1, 2023
22c14dc
mobile support!
tobyab Oct 3, 2023
853ccad
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
c4aba9f
further fancifying of the mail card
tobyab Sep 29, 2023
f10540d
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
f320f6e
further fanciness
tobyab Sep 30, 2023
6270a93
started on redesign of the newsletter section + formatted things
tobyab Sep 27, 2023
0abcf8d
further fancifying of the mail card
tobyab Sep 29, 2023
25ac3e1
experimenting with different backgrounds + start of pattern!
tobyab Sep 29, 2023
f5de6a7
further fanciness
tobyab Sep 30, 2023
6843912
biiiiiig commit — reversing formatting. + polishing cards
tobyab Oct 1, 2023
7949e6a
syncing pizza.js + fancy button
tobyab Oct 1, 2023
8b1583e
mobile support!
tobyab Oct 3, 2023
cccaee5
bloody merge conflicts!
tobyab Oct 4, 2023
500a7a5
updating copy + fixing links
tobyab Oct 5, 2023
16cebc5
changes
tobyab Oct 6, 2023
acdce99
tweaking!
tobyab Oct 6, 2023
be49430
updated
tobyab Oct 6, 2023
e042d43
changed padding up
tobyab Oct 6, 2023
fb6f904
wrong newsletter...
tobyab Oct 7, 2023
02afbbf
Merge remote-tracking branch 'origin/toby-patch' into toby-patch
tobyab Oct 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions components/index/cards/haunted.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import CardModel from "./card-model";
import { Box, Flex, Grid, Image, Text, Link } from "theme-ui";
import Buttons from "./button";

/** @jsxImportSource theme-ui */

export default function Haunted() {
return (
<CardModel
github_link="https://github.com/hackclub/www-hauntedhouse"
color="white"
sx={{
backgroundSize: "cover",
backgroundColor: "#95C9E5",
border: "2px solid #EB6424",
}}
position={[null, "bottom", "bottom"]}
highlight="#cc5600"
image="/haunted/bg.webp"
filter="brightness(0.7)"
>
<Grid columns={[1, 2]} sx={{ position: "relative", zIndex: 2 }}>
<Image
src="/haunted/haunted-text.svg"
sx={{
width: ["200px", "250px", "300px"],
mt: ["-10px", "-20px", "-20px"],
position: "relative",
zIndex: 2,
fontSize: ["36px", 4, 5],
color: "white",
}}
alt="Haunted"
/>
<Box></Box>

<Text as="p" variant="subtitle" sx={{ color: "white" }}>
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, and check out the website at{" "}
<Link href="https://haunted.hackclub.com">haunted.hackclub.com</Link>!
</Text>
<Flex
sx={{
flexDirection: "column",
mt: [3, 3, 4],
alignItems: "end",
justifyContent: "flex-end",
}}
></Flex>
</Grid>
</CardModel>
);
}
2 changes: 1 addition & 1 deletion components/index/cards/hcb.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function Bank({ data }) {
textAlign: 'center',
'&:before': {
content: '""',
backgroundImage: 'url(/home/hcb-mobile.webp)', // image doesn't exist
backgroundImage: 'url(/home/hcb-mobile.webp)',
backgroundSize: '100%',
backgroundRepeat: 'no-repeat',
width: '100%',
Expand Down
287 changes: 160 additions & 127 deletions components/index/cards/mailing-list.js
Original file line number Diff line number Diff line change
@@ -1,166 +1,199 @@
import Icon from '@hackclub/icons'
import { useRef, useState } from 'react'
import {
Box,
Label,
Input,
Button,
Text,
Alert,
Card,
Flex,
Grid
} from 'theme-ui'
import CardModel from './card-model'
import BGImg from '../../background-image'
import FooterImgFile from '../../../public/home/footer.png'
import Icon from "@hackclub/icons";
import { useRef, useState } from "react";
import { Box, Input, Button, Text, Card, Flex, Grid, Link } from "theme-ui";
import MailCard from "../../mail-card";
import BGImg from "../../background-image";

import background from "../../../public/home/footer.png";

const Loading = () => (
<Box
sx={{
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
height: '100%',
width: '100%',
border: '2px solid #f3f3f3',
borderTop: '2px solid #ec3750',
borderRadius: '50%',
width: '10px',
height: '10px',
animation: 'spin 2s linear infinite',
'@keyframes spin': {
'0%': { transform: 'rotate(0deg)' },
'100%': { transform: 'rotate(360deg)' }
}
display: "flex",
justifyContent: "center",
alignItems: "center",
border: "2px solid #f3f3f3",
borderTop: "2px solid #ec3750",
borderRadius: "50%",
width: "16px",
height: "16px",
animation: "spin 2s linear infinite",
mr: "5px",
"@keyframes spin": {
"0%": { transform: "rotate(0deg)" },
"100%": { transform: "rotate(360deg)" },
},
}}
></Box>
)
);

const MailingList = () => {
const [submitting, setSubmitting] = useState(false)
const [submitted, setSubmitted] = useState(false)
const formRef = useRef(null)
const [submitting, setSubmitting] = useState(false);
const [submitted, setSubmitted] = useState(false);
const formRef = useRef(null);

const handleSubmit = async e => {
e.preventDefault()
setSubmitting(true)
const handleSubmit = async (e) => {
e.preventDefault();
setSubmitting(true);

let res = await fetch('/api/mailing-list', {
method: 'POST',
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()
formRef.current.reset();

if (res.ok) {
setSubmitted(true)
setSubmitted(true);
}
setSubmitting(false)
}
setSubmitting(false);
};

return (
<Box sx={{ position: 'relative', py: 6, background: 'darker' }}>
<Box sx={{ position: "relative", py: 6, background: "darker" }}>
<Card
sx={{
maxWidth: 'narrowPlus',
mx: 'auto',
maxWidth: "1050px",
mx: "auto",
// mt: [3, 4],
background: 'rgb(255,255,255, 0.45)',
position: 'relative',
background: "rgb(255,255,255, 0.45)",
position: "relative",
zIndex: 2,
backdropFilter: 'blur(8px)'
backdropFilter: "blur(8px)",
}}
>
<Flex
sx={{
justifyContent: 'space-between',
alignItems: ['left', 'left', 'center'],
flexDirection: ['column', 'column', 'column'],
gap: '10px',
textAlign: 'center'
}}
>
<Box>
<Text
variant="title"
sx={{ fontSize: [4, '36px', '42px', 6], zIndex: 2 }}
>
Stay in Touch
</Text>
<Text sx={{ color: 'darkless', mt: 2, fontSize: 3 }} as="p">
We’ll send you an email no more than once a month, when we work on
something cool for you.
</Text>
</Box>
<Grid
as="form"
ref={formRef}
onSubmit={handleSubmit}
gap={[2, 3]}
<Flex sx={{ flexDirection: ["column", "row"], gridGap: [0, 5] }}>
<Flex
sx={{
textAlign: 'center',
alignItems: 'end',
input: { bg: 'sunken' },
width: '100%'
placeItems: "center",
justifyContent: "center",
alignItems: ["left", "left", "center"],
flexDirection: "column",
gap: "10px",
width: ["100%", "75%"],
}}
>
<Box sx={{ width: '100%' }}>
<Input
autofillBackgroundColor="highlight"
type="text"
name="name"
id="name"
placeholder="Your Name"
required
sx={{ width: '100%', textAlign: 'center', fontSize: 2 }}
/>
<Box>
<Text
variant="title"
sx={{
fontSize: [4, "36px", "42px", 6],
zIndex: 2,
textAlign: "left",
}}
>
Join the newsletter
</Text>
<Text
sx={{
color: "darkless",
mt: 2,
fontSize: 3,
textAlign: "left",
}}
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{" "}
<Link href="/leader-newsletters/">previous issues</Link>.
</Text>
</Box>
<div>
<Input
autofillBackgroundColor="highlight"
type="email"
name="email"
id="email"
placeholder="Your Email"
required
sx={{ width: '100%', textAlign: 'center', fontSize: 2 }}
/>
</div>
<Button type="submit" sx={{ mt: [2, 0], fontSize: 2 }}>
{submitting ? (
<>
<Loading />
&nbsp;Subscribe
</>
) : (
'Subscribe'
)}
</Button>
</Grid>
<Grid
as="form"
ref={formRef}
onSubmit={handleSubmit}
gap={[2, 3]}
sx={{
textAlign: "center",
alignItems: "end",
input: { bg: "sunken" },
width: "100%",
}}
>
<Box sx={{ width: "100%" }}>
<Input
autofillBackgroundColor="highlight"
type="text"
name="name"
id="name"
placeholder="Your Name"
required
sx={{
width: "100%",
textAlign: "center",
fontSize: 2,
}}
/>
</Box>
<div>
<Input
autofillBackgroundColor="highlight"
type="email"
name="email"
id="email"
placeholder="Your Email"
required
sx={{
width: "100%",
textAlign: "center",
fontSize: 2,
}}
/>
</div>
<Button type="submit" sx={{ mt: [2, 0], fontSize: 2 }}>
{submitting ? (
<>
<Loading /> Subscribe
</>
) : submitted ? (
<>
<Icon glyph="send" /> You're on the list!
</>
) : (
"Subscribe"
)}
</Button>
</Grid>
</Flex>
<Box
sx={{
display: "grid",
gridGap: 4,
mt: [4, 0],
width: "100%",
}}
>
<MailCard
date="August 2023"
issue={18}
body="Bring your club on an epic adventure in code this semester! Jams are 18 brand new coding workshops created by Hack Clubbers ESPECIALLY for you to use in your meetings, complete with pre-made slide decks and even some videos!"
link="/leader-newsletters/2023-08-18"
/>
<MailCard
date="September 2023"
issue={20}
body="📆📣 Leader meeting tomorrow! Join club leaders Sahiti, Zayn and Ronnit tomorrow 8:00am PST/11:00am EST/8:30pm IST. Bring questions and advice to share about maintaining your club after the first meeting!!"
link="/leader-newsletters/2023-09-29"
/>
</Box>
</Flex>

{submitted && (
<Alert variant="primary" sx={{ bg: 'green', mt: [2, 3] }}>
<Icon glyph="send" />
<Text sx={{ ml: 2 }}>You're on the list!</Text>
</Alert>
)}
</Card>
<BGImg
width={2544}
height={2048}
gradient="linear-gradient(rgba(0,0,0,0.125), rgba(0,0,0,0.25))"
src={FooterImgFile}
src={background}
placeholder="blur"
alt="Globe with hundreds of Hack Clubs"
/>
</Box>
)
}
);
};

export default MailingList
export default MailingList;
Loading
Loading