Skip to content

Commit 79ef97d

Browse files
committed
[BlOG-9], [BLOG-25] feat(new-layout): new home page with subscribe button
1 parent 207b4dd commit 79ef97d

File tree

1 file changed

+59
-49
lines changed

1 file changed

+59
-49
lines changed

src/pages/index.jsx

Lines changed: 59 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import AllCategories from "../components/AllCategories";
1111

1212
/** @jsx jsx */
1313
import { Styled, jsx } from "theme-ui";
14+
import { darken, lighten } from "@theme-ui/color";
1415

1516
class Index extends React.Component {
1617
render() {
@@ -26,81 +27,90 @@ class Index extends React.Component {
2627
<Helmet title={config.siteTitle} />
2728
<SEO />
2829
<section>
29-
<BigAvatar />
30+
<div
31+
sx={{
32+
display: "flex",
33+
flexDirection: "column",
34+
alignItems: "center",
35+
p: "2em",
36+
}}
37+
>
38+
<Styled.h1 sx={{ m: ".5em" }}>Hi! I'm Shaun</Styled.h1>
39+
<Styled.p sx={{ textAlign: "center" }}>
40+
I'm a Software Engineer passionate about modern Javascript,
41+
Backend technologies, Data, and Cloud tooling.
42+
</Styled.p>
43+
<a
44+
href="https://shaunjacks.substack.com"
45+
sx={{
46+
padding: "1em",
47+
borderRadius: ".5rem",
48+
textDecoration: "none",
49+
color: "background",
50+
cursor: "pointer",
51+
outline: "none",
52+
backgroundColor: "primary",
53+
border: "3px solid text",
54+
borderColor: "primary",
55+
borderRadius: "5px",
56+
borderWidth: "1px",
57+
padding: "4px 11px",
58+
fontSize: "16px",
59+
boxShadow: "0 2px 0 rgba(0,0,0,.045)",
60+
transition: "all .3s ease",
61+
"&:focus, &:hover": {
62+
outline: "none",
63+
borderColor: lighten("primary", 0.2),
64+
backgroundColor: lighten("primary", 0.2),
65+
},
66+
}}
67+
>
68+
<Styled.h3 sx={{ m: 0, p: ".5em 1.5em", color: "background" }}>
69+
Subscribe
70+
</Styled.h3>
71+
</a>
72+
</div>
3073
</section>
3174
<section
3275
sx={{
3376
my: `40px`,
3477
display: "flex",
3578
flexDirection: "column",
36-
alignItems: "center"
79+
alignItems: "center",
3780
}}
3881
>
39-
<Styled.h1 sx={{ color: "text" }}>I write about</Styled.h1>
40-
<AllCategories />
82+
<Styled.h1 sx={{ mt: 0, color: "text" }}>Most popular</Styled.h1>
83+
<SimplePostListing postEdges={verticalMostPopularEdges} />
4184
</section>
4285
<section
4386
sx={{
4487
my: `40px`,
4588
display: "flex",
4689
flexDirection: "column",
47-
alignItems: "center"
90+
alignItems: "center",
4891
}}
4992
>
5093
<Styled.h1 sx={{ mt: 0, color: "text" }}>Most recent</Styled.h1>
5194
<SimplePostListing postEdges={verticalMostRecentEdges} />
5295
</section>
53-
<section
54-
sx={{
55-
my: `40px`,
56-
display: "flex",
57-
flexDirection: "column",
58-
alignItems: "center"
59-
}}
60-
>
61-
<Styled.h1 sx={{ mt: 0, color: "text" }}>Most popular</Styled.h1>
62-
<SimplePostListing postEdges={verticalMostPopularEdges} />
63-
</section>
64-
{/* <section
65-
sx={{
66-
my: `40px`,
67-
display: "flex",
68-
p: 2,
69-
flexDirection: "column"
70-
// "@media screen and (min-width: 40em)": {
71-
// width: "50%"
72-
// }
73-
}}
74-
>
75-
<Styled.h1 sx={{ color: "text" }}>Most recent</Styled.h1>
76-
<PostListing postEdges={horizontalMostRecentEdges} />
77-
</section>
78-
<section
79-
sx={{
80-
my: `40px`,
81-
display: "flex",
82-
flexDirection: "column"
83-
}}
84-
>
85-
<Styled.h1 sx={{ color: "text" }}>Most popular</Styled.h1>
86-
<PostListing postEdges={horizontalMostPopular} />
87-
</section> */}
88-
<section>
96+
<section sx={{ display: "flex", justifyContent: "center" }}>
8997
<Styled
9098
as={Link}
9199
to={"/blog"}
92100
sx={{
93101
margin: `auto`,
94102
textAlign: `center`,
95103
color: `primary`,
96-
borderBottom: `solid 3px`,
104+
border: `1px solid`,
105+
borderRadius: 3,
106+
borderColor: `panelBackground`,
97107
textDecoration: `none`,
98-
fontSize: 26,
108+
transition: "all .3s ease",
109+
fontSize: 20,
110+
p: ".5em 1.5em",
99111
":hover": {
100-
bg: `muted`,
101-
p: 1,
102-
borderRadius: `5px`
103-
}
112+
bg: lighten("background", 0.1),
113+
},
104114
}}
105115
>
106116
More posts...
@@ -137,7 +147,7 @@ export const pageQuery = graphql`
137147
tags
138148
cover {
139149
childImageSharp {
140-
fixed(width: 256, height: 200) {
150+
fixed(width: 256, height: 150) {
141151
...GatsbyImageSharpFixed
142152
}
143153
}
@@ -172,7 +182,7 @@ export const pageQuery = graphql`
172182
tags
173183
cover {
174184
childImageSharp {
175-
fixed(width: 256, height: 200) {
185+
fixed(width: 256, height: 150) {
176186
...GatsbyImageSharpFixed
177187
}
178188
}

0 commit comments

Comments
 (0)