mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 10:52:35 +02:00
More consistent headers (#140)
* More consistent headers * Clean up mobile blog posts styles
This commit is contained in:
parent
967970eaa5
commit
fd05bb3239
2 changed files with 40 additions and 44 deletions
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue