Skip to content

Commit f0a0359

Browse files
author
Sergei Orlow
committed
✨ Add email form
1 parent fd635dc commit f0a0359

File tree

7 files changed

+92
-1
lines changed

7 files changed

+92
-1
lines changed

src/colours.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const Colours = {
2-
PRIMARY: '#CEB3AB',
2+
PRIMARY: '#c29da6',
33
SECONDARY: '#DCDFB6',
44
LIGHT: '#F2E6BE',
55
ACCENT: '#FF7F00',

src/components/subscription-form.js

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pages/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Centralise } from '../components/centralise'
66
import { Layout } from '../layout'
77
import { PostPreview } from '../components/post-preview'
88
import Seo from '../components/seo'
9+
import SubscriptionForm from '../components/subscription-form'
910

1011
const List = styled.ul`
1112
list-style: none;
@@ -31,6 +32,8 @@ const Index = ({ data }) => (
3132
</li>
3233
))}
3334
</List>
35+
36+
<SubscriptionForm />
3437
</Centralise>
3538
</Layout>
3639
)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import React from 'react'
2+
import { Centralise } from '../components/centralise'
3+
import Seo from '../components/seo'
4+
import { Layout } from '../layout'
5+
6+
const SubscriptionConfirmationPage = () => (
7+
<Layout>
8+
<Seo
9+
title='Thanks!'
10+
description='It must be the wrong place.'
11+
meta={[
12+
{
13+
name: 'robots',
14+
content: 'noindex, nofollow',
15+
},
16+
]}
17+
/>
18+
<Centralise css={{ textAlign: 'center', marginTop: '10rem' }}>
19+
<h1>
20+
All done!{' '}
21+
<span role='img' aria-label='high fives'>
22+
🙌
23+
</span>
24+
</h1>
25+
<p>
26+
You should get an approval email shortly. Click the button there if you didn&apos;t change
27+
your mind.
28+
</p>
29+
</Centralise>
30+
</Layout>
31+
)
32+
33+
export default SubscriptionConfirmationPage
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react'
2+
import { Centralise } from '../components/centralise'
3+
import Seo from '../components/seo'
4+
import { Layout } from '../layout'
5+
6+
const ThanksForSubscribingPage = () => (
7+
<Layout>
8+
<Seo
9+
title='Thanks for subscribing!'
10+
description='Thanks to subscribing to my newsletter.'
11+
meta={[
12+
{
13+
name: 'robots',
14+
content: 'noindex, nofollow',
15+
},
16+
]}
17+
/>
18+
<Centralise css={{ textAlign: 'center', marginTop: '10rem' }}>
19+
<h1>Thank you for subscribing!</h1>
20+
<p>
21+
You should get an approval email shortly. Click the button there if you didn&apos;t change
22+
your mind.
23+
</p>
24+
</Centralise>
25+
</Layout>
26+
)
27+
28+
export default ThanksForSubscribingPage

src/templates/blog-post-template.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { SmallText } from '../components/small-text'
1212
import { Colours } from '../colours'
1313
import { useSiteMetadata } from '../hooks/use-site-metadata'
1414
import Seo from '../components/seo'
15+
import SubscriptionForm from '../components/subscription-form'
1516

1617
const Hero = styled(BackgroundImage)`
1718
width: 100%;
@@ -114,6 +115,8 @@ const PageTemplate = ({ data }) => {
114115
</a>
115116
.
116117
</SmallText>
118+
119+
<SubscriptionForm />
117120
</Centralise>
118121
</Article>
119122
</Layout>

src/templates/tag-template.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import styled from '@emotion/styled'
77
import { PostPreview } from '../components/post-preview'
88
import { SmallText } from '../components/small-text'
99
import Seo from '../components/seo'
10+
import SubscriptionForm from '../components/subscription-form'
1011

1112
const List = styled.ul`
1213
list-style: none;
@@ -42,6 +43,8 @@ const TagTemplate = ({ pageContext, data }) => {
4243
This page contains all articles tagged with #{pageContext.tag}. Currently there are
4344
<strong> {data.allMarkdownRemark.edges.length}</strong>.
4445
</SmallText>
46+
47+
<SubscriptionForm />
4548
</Centralise>
4649
</Layout>
4750
)

0 commit comments

Comments
 (0)