More consistent headers (#140)

* More consistent headers

* Clean up mobile blog posts styles
This commit is contained in:
Ricky Vetter 2017-10-18 13:04:29 -07:00 committed by Joel Marcey
parent 967970eaa5
commit fd05bb3239
2 changed files with 40 additions and 44 deletions

View file

@ -39,9 +39,12 @@ class BlogPost extends React.Component {
renderAuthorPhoto() {
const post = this.props.post;
const className = "authorPhoto" + ((post.author && post.authorTitle)
? " authorPhoto-big"
: "");
if (post.authorFBID) {
return (
<div className="authorPhoto">
<div className={className}>
<a href={post.authorURL} target="_blank">
<img
src={
@ -55,7 +58,7 @@ class BlogPost extends React.Component {
);
} else if (post.authorImage) {
return (
<div className="authorPhoto">
<div className={className}>
<a href={post.authorURL} target="_blank">
<img
src={post.authorImage}
@ -102,20 +105,21 @@ class BlogPost extends React.Component {
return (
<header className="postHeader">
{this.renderAuthorPhoto()}
{post.author ? (
<p className="post-authorName">
<a href={post.authorURL} target="_blank">
{post.author}
</a>
<br />
{post.authorTitle}
</p>
) : null}
{this.renderTitle()}
<p className="post-meta">
{month} {day}, {year}
</p>
<div className="authorBlock">
{post.author ? (
<p className="post-authorName">
<a href={post.authorURL} target="_blank">
{post.author}
</a>
{post.authorTitle}
</p>
) : null}
{this.renderAuthorPhoto()}
</div>
</header>
);
}