This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move all styles out of components and into a base CSS file
Make images full width Align images in postcards Add simple font-sizing
- Loading branch information
1 parent
884e417
commit 1232e14
Showing
11 changed files
with
419 additions
and
488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,34 @@ | ||
import React from 'react'; | ||
import { Author } from './Author'; | ||
import { Markdown } from './Markdown'; | ||
import { PostData } from '../loader'; | ||
import { PostMeta } from './PostMeta'; | ||
import { Author } from './Author'; | ||
|
||
export const BlogPost: React.FunctionComponent<{ post: PostData }> = ({ | ||
post, | ||
}) => { | ||
const { title, subtitle } = post; | ||
return ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'center', | ||
width: '100%', | ||
padding: '0px 0px 100px 0px', | ||
}} | ||
> | ||
<div className="blog-post"> | ||
<PostMeta post={post} /> | ||
<div style={{ width: '100%', maxWidth: '600px' }}> | ||
{post.bannerPhoto && ( | ||
<img | ||
style={{ | ||
width: '100%', | ||
maxWidth: '100%', | ||
margin: '0px', | ||
}} | ||
src={post.bannerPhoto} | ||
/> | ||
<img className="blog-post-image" src={post.bannerPhoto} /> | ||
)} | ||
<div style={{ padding: '50px 3vw 50px 3vw' }}> | ||
|
||
<div className="blog-post-title"> | ||
{title && ( | ||
<h1 | ||
style={{ | ||
margin: '10px 0px 10px 0px', | ||
padding: 0, | ||
border: 'none', | ||
}} | ||
> | ||
{title} | ||
</h1> | ||
<h1>{title}</h1> | ||
)} | ||
{subtitle && ( | ||
<h2 | ||
style={{ | ||
margin: '10px 0px', | ||
padding: 0, | ||
border: 'none', | ||
fontWeight: 400, | ||
opacity: '0.6', | ||
}} | ||
> | ||
{subtitle} | ||
</h2> | ||
<h2>{subtitle}</h2> | ||
)} | ||
<hr | ||
style={{ | ||
height: '1px', | ||
color: '#eee', | ||
opacity: 0.2, | ||
margin: '25px 0px', | ||
}} | ||
/> | ||
<hr /> | ||
<Author post={post} /> | ||
</div> | ||
|
||
<div style={{ width: '100%', padding: '0px 3vw' }}> | ||
<div className="blog-post-content"> | ||
<Markdown source={post.content} /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.