Skip to content

Commit cdf69be

Browse files
committed
feat: init author layout
1 parent 92b2c72 commit cdf69be

File tree

1 file changed

+15
-51
lines changed

1 file changed

+15
-51
lines changed

src/templates/author.js

Lines changed: 15 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from "react";
22
import PropTypes from "prop-types";
33
import { graphql } from "gatsby";
44

5-
import { Layout, PostCard, Pagination } from "../components/common";
5+
import { Layout, PostCardBlog, Pagination } from "../components/common";
66
import { MetaData } from "../components/common/meta";
77

88
/**
@@ -25,57 +25,21 @@ const Author = ({ data, location, pageContext }) => {
2525
<>
2626
<MetaData data={data} location={location} type="profile" />
2727
<Layout>
28-
<div className="container">
29-
<header className="author-header">
30-
<div className="author-header-content">
28+
<div>
29+
<div className="bg-bg-black py-8 text-white mx-auto">
30+
<h1 className="text-4xl md:text-5xl ml-4 font-semibold md:mx-auto max-w-3xl">
3131
<h1>{author.name}</h1>
32-
{author.bio && <p>{author.bio}</p>}
33-
<div className="author-header-meta">
34-
{author.website && (
35-
<a
36-
className="author-header-item"
37-
href={author.website}
38-
target="_blank"
39-
rel="noopener noreferrer"
40-
>
41-
Website
42-
</a>
43-
)}
44-
{twitterUrl && (
45-
<a
46-
className="author-header-item"
47-
href={twitterUrl}
48-
target="_blank"
49-
rel="noopener noreferrer"
50-
>
51-
Twitter
52-
</a>
53-
)}
54-
{facebookUrl && (
55-
<a
56-
className="author-header-item"
57-
href={facebookUrl}
58-
target="_blank"
59-
rel="noopener noreferrer"
60-
>
61-
Facebook
62-
</a>
63-
)}
64-
</div>
65-
</div>
66-
<div className="author-header-image">
67-
{author.profile_image && (
68-
<img src={author.profile_image} alt={author.name} />
69-
)}
70-
</div>
71-
</header>
72-
<section className="post-feed">
73-
{posts.map(({ node }) => (
74-
// The tag below includes the markup for each post - components/common/PostCard.js
75-
<PostCard key={node.id} post={node} />
76-
))}
77-
</section>
78-
<Pagination pageContext={pageContext} />
32+
</h1>
33+
</div>
34+
<div className="post-container">
35+
<section className="post-feed max-w-3xl mx-auto">
36+
{posts.map(({ node }) => (
37+
// The tag below includes the markup for each post - components/common/PostCard.js
38+
<PostCardBlog key={node.id} post={node} />
39+
))}
40+
</section>
41+
<Pagination pageContext={pageContext} />
42+
</div>
7943
</div>
8044
</Layout>
8145
</>

0 commit comments

Comments
 (0)