Last active
December 11, 2017 13:01
-
-
Save SamWSoftware/a1d3de29bb82c7f696f62dbd32edf233 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
render() { | |
if (this.props.post) { | |
return ( | |
<div className="article"> | |
<a href={"/blog/" + this.props.post.ID} className="blackLink"> | |
{this.props.post.featured_image ? ( | |
<img | |
className="img-responsive webpic" | |
alt="article header" | |
src={this.props.post.featured_image} | |
/> | |
) : ( | |
"" | |
)} | |
<h1 className="text-center">{this.props.post.title}</h1> | |
<div className="content">{excerpt}</div> | |
</a> | |
<Link to={"/blog/" + this.props.post.ID}> | |
<button className="btn">Read More</button> | |
</Link> | |
</div> | |
); | |
} else { | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment