Skip to content

Instantly share code, notes, and snippets.

@SamWSoftware
Last active December 11, 2017 13:01
Show Gist options
  • Save SamWSoftware/a1d3de29bb82c7f696f62dbd32edf233 to your computer and use it in GitHub Desktop.
Save SamWSoftware/a1d3de29bb82c7f696f62dbd32edf233 to your computer and use it in GitHub Desktop.
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