Skip to content

Commit 678982e

Browse files
author
Sergei Orlow
committed
💄 Some styling changes
1 parent e249817 commit 678982e

12 files changed

Lines changed: 95 additions & 28 deletions

File tree

File renamed without changes.
File renamed without changes.
File renamed without changes.

src/components/footer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const InternalLink = styled(Link)`
1919
`
2020

2121
const FooterLinks = styled.ol`
22+
list-style: none;
2223
margin: 0;
2324
`
2425

src/components/header.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ import { ExternalRoutes } from '../routes'
99
import { Link } from 'gatsby'
1010

1111
const StyledHeader = styled.header`
12+
position: fixed;
13+
top: 0;
14+
left: 0;
15+
right: 0;
16+
background: #fff;
17+
z-index: 2000;
1218
display: flex;
1319
justify-content: space-between;
1420
padding: 1rem;

src/components/post-preview-small.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ export const PostPreviewSmall = ({ post }) => {
5959
/>
6060
</Link>
6161
<Column>
62-
<h4>
62+
<h3>
6363
<PostLink itemProp='url' to={post.fields.slug}>
6464
<span itemProp='name headline'>{post.frontmatter.title}</span>
6565
<PostDate>
6666
{' '}
6767
- <span itemProp='datePublished'>{post.frontmatter.date}</span>
6868
</PostDate>
6969
</PostLink>
70-
</h4>
70+
</h3>
7171

7272
<meta itemProp='headline' content={post.frontmatter.title} />
7373
<meta itemProp='url' content={pageUrl} />

src/components/post-preview.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const PostPreviewSection = styled.section`
4747
const Column = styled.div`
4848
display: flex;
4949
flex-direction: column;
50-
max-width: calc(1000px - 5rem - 300px);
50+
max-width: calc(1000px - 2rem - 300px);
5151
`
5252

5353
export const PostPreview = ({ post }) => {
@@ -66,15 +66,15 @@ export const PostPreview = ({ post }) => {
6666
/>
6767
</Link>
6868
<Column>
69-
<h3>
69+
<h2>
7070
<PostLink itemProp='url' to={post.fields.slug}>
7171
<span itemProp='name headline'>{post.frontmatter.title}</span>
7272
<PostDate>
7373
{' '}
7474
- <span itemProp='datePublished'>{post.frontmatter.date}</span>
7575
</PostDate>
7676
</PostLink>
77-
</h3>
77+
</h2>
7878

7979
<meta itemProp='headline' content={post.frontmatter.title} />
8080
<meta itemProp='url' content={pageUrl} />

src/components/top-tags.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import React from 'react'
2+
import styled from '@emotion/styled'
3+
import { Labels } from './labels'
4+
import { graphql, useStaticQuery } from 'gatsby'
5+
6+
const Tags = styled.div`
7+
align-self: flex-end;
8+
text-align: center;
9+
max-width: 500px;
10+
margin-left: 1rem;
11+
`
12+
13+
export const TopTags = () => {
14+
const data = useStaticQuery(graphql`
15+
query TopTagsQuery {
16+
tagsGroup: allMarkdownRemark {
17+
group(field: frontmatter___tags) {
18+
fieldValue
19+
totalCount
20+
}
21+
}
22+
}
23+
`)
24+
25+
return (
26+
<Tags>
27+
<h3>
28+
<span role='img' aria-label='High fives'>
29+
🙌
30+
</span>{' '}
31+
Top Tags
32+
</h3>
33+
<Labels
34+
from={data.tagsGroup.group
35+
.sort((a, b) => b.totalCount - a.totalCount)
36+
.slice(0, 5)
37+
.map((tag) => `${tag.fieldValue} (${tag.totalCount})`)}
38+
/>
39+
</Tags>
40+
)
41+
}

src/layout.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const Main = styled.main`
1010
display: flex;
1111
flex-direction: column;
1212
flex-grow: 1;
13+
margin-top: 3.5rem;
1314
`
1415

1516
const GlobalStyles = () => (
@@ -36,6 +37,20 @@ const GlobalStyles = () => (
3637
background-color: #fafafa;
3738
}
3839
40+
h1 {
41+
font-size: 2.5rem;
42+
padding: 1rem 0;
43+
text-align: center;
44+
}
45+
46+
h2 {
47+
font-size: 1.8rem;
48+
}
49+
50+
h3 {
51+
font-size: 1.6rem;
52+
}
53+
3954
a {
4055
color: #333;
4156

src/pages/404.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ const FourOhFour = () => (
1717
]}
1818
/>
1919
<Centralise css={{ textAlign: 'center', marginTop: '10rem' }}>
20-
<h1>Found Nothing</h1>
20+
<h1>
21+
<span role='img' aria-label='Looking'>
22+
👀
23+
</span>{' '}
24+
Found Nothing
25+
</h1>
2126
<Link to='/'>Try again?</Link>
2227
</Centralise>
2328
</Layout>

0 commit comments

Comments
 (0)