Skip to content

Commit cc7690b

Browse files
author
Alex Patterson
authored
Merge pull request CodingCatDev#159 from CodingCatDev/feature/newsletter
start using buttondown email
2 parents f02a6d5 + c056ebc commit cc7690b

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

frontend/main/src/layout/Footer.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,31 @@ export default function Footer({
139139
<section className="grid grid-cols-1 lg:col-start-1 lg:col-end-3 lg:justify-self-center 2xl:justify-self-end 2xl:col-start-3 2xl:col-end-4">
140140
<h4 className="underline">Newsletter</h4>
141141
<p className="text-xl">Subscribe for all the latest updates.</p>
142-
<form className="grid grid-cols-1">
142+
<form
143+
className="grid grid-cols-1"
144+
action="https://buttondown.email/api/emails/embed-subscribe/codingcatdev"
145+
method="post"
146+
target="popupwindow"
147+
onSubmit={() =>
148+
window.open(
149+
'https://buttondown.email/codingcatdev',
150+
'popupwindow'
151+
)
152+
}
153+
>
143154
<label htmlFor="subEmail">Email</label>
144155
<div className="flex flex-wrap gap-4 lg:flex-nowrap">
145156
<input
146-
id="subEmail"
157+
name="email"
158+
id="bd-email"
147159
type="email"
148160
placeholder="alex@codingcat.dev"
149161
/>
162+
<input type="hidden" value="1" name="embed" />
150163

151-
<button className="btn-secondary">Subscribe</button>
164+
<button className="btn-secondary" type="submit">
165+
Subscribe
166+
</button>
152167
</div>
153168
</form>
154169
</section>

0 commit comments

Comments
 (0)