Skip to content

Commit 5cc7bda

Browse files
author
Sergei Orlov
committed
✨ Add support for pages
Add /about page
1 parent 2a731ac commit 5cc7bda

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

src/components/footer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ export const Footer = () => {
4646

4747
<nav>
4848
<ul>
49+
<li>
50+
<Link className='text-gray-500' rel='nofollow' to='/about'>
51+
About
52+
</Link>
53+
</li>
4954
<li>
5055
<a
5156
className='text-gray-500'

src/components/post-list.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ export const PostList = ({ posts }) => (
66
<section
77
itemScope
88
itemType='https://schema.org/ItemList'
9-
className='grid gap-5 place-items-center grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 auto-rows-min'
9+
className='grid gap-5 place-items-center grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4'
1010
>
1111
{posts.map(({ node }, i) => (
1212
<div
1313
key={node.frontmatter.Slug}
1414
className={`max-w-sm xl:max-w-none h-full w-full ${
15-
node.frontmatter.Featured ? 'row-span-2' : 'row-span-1'
15+
node.frontmatter.Featured ||
16+
node.frontmatter.Type.name === '📕' ||
17+
node.frontmatter.Type.name === '📮'
18+
? 'row-span-4'
19+
: 'row-span-3'
1620
}`}
1721
itemProp='itemListElement'
1822
itemScope

src/components/post-preview.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ export const PostPreview = ({ post }) => {
1111
const { siteUrl } = useSiteMetadata()
1212
const pageUrl = `${siteUrl}${post.frontmatter.Slug}`
1313
const imageUrl = `${siteUrl}${post.frontmatter.Hero_Image[0]?.remoteImage.sharp.fluid}`
14-
const isLarge = post.frontmatter.Featured
14+
15+
const isLarge =
16+
post.frontmatter.Featured ||
17+
post.frontmatter.Type.name === '📕' ||
18+
post.frontmatter.Type.name === '📮'
1519

1620
return (
1721
<div

src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default Index
2929
export const query = graphql`
3030
query IndexPage {
3131
allMarkdownRemark(
32-
filter: { frontmatter: { Published: { eq: true } } }
32+
filter: { frontmatter: { Published: { eq: true }, Page: { eq: false } } }
3333
sort: { order: DESC, fields: frontmatter___Publish_Date___start }
3434
) {
3535
edges {

0 commit comments

Comments
 (0)