-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77819c7
commit fe4ac46
Showing
10 changed files
with
78 additions
and
120 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,35 @@ | ||
import styles from './BlogSpotlight.module.scss'; | ||
import AuthorDetails from '../BlogListing/AuthorDetails'; | ||
|
||
import moment from 'moment' | ||
import styles from "./BlogSpotlight.module.scss"; | ||
import AuthorDetails from "../BlogListing/AuthorDetails"; | ||
|
||
import moment from "moment"; | ||
|
||
export default function BlogSpotlight(props) { | ||
const { title, bannerImage, createdAt, primaryAuthor } = props; | ||
const { username } = primaryAuthor; | ||
const { title, bannerImage, createdAt, primaryAuthor } = props; | ||
const { username, avatar } = primaryAuthor; | ||
|
||
return ( | ||
<> | ||
<section className={styles.postTitle}> | ||
<div className="container"> | ||
<div className={styles.title}> | ||
{/* <h2>Creative Search Bar and Input Field Design Inspiration</h2> */} | ||
<h2> | ||
{title} | ||
</h2> | ||
{/* <h3 className="date">12 May 2021</h3> */} | ||
<h3 className="date">{moment(createdAt).format('Do MMMM YYYY')}</h3> | ||
</div> | ||
</div> | ||
</section> | ||
<section className={styles.section}> | ||
<div className={styles.postWrap}> | ||
<figure> | ||
{!bannerImage && ( | ||
<img src="/images/temp/blogmain.png" alt=""/> | ||
)} | ||
<img src={bannerImage} alt=""/> | ||
</figure> | ||
<div className={styles.author}> | ||
<div className={styles.item}> | ||
<AuthorDetails | ||
username={username} | ||
/> | ||
</div> | ||
{/* <div className={styles.item}> | ||
<AuthorDetails /> | ||
</div> | ||
<div className={styles.item}> | ||
<AuthorDetails /> | ||
</div> */} | ||
</div> | ||
return ( | ||
<> | ||
<section className={styles.postTitle}> | ||
<div className="container"> | ||
<div className={styles.title}> | ||
<h2>{title}</h2> | ||
<h3 className="date">{moment(createdAt).format("Do MMMM YYYY")}</h3> | ||
</div> | ||
</div> | ||
</section> | ||
<section className={styles.section}> | ||
<div className={styles.postWrap}> | ||
<figure> | ||
{!bannerImage && <img src="/images/temp/blogmain.png" alt="" />} | ||
<img src={bannerImage} alt="blog" /> | ||
</figure> | ||
<div className={styles.author}> | ||
<div className={styles.item}> | ||
<AuthorDetails username={username} avatar={avatar} /> | ||
</div> | ||
</section> | ||
</> | ||
); | ||
} | ||
</div> | ||
</div> | ||
</section> | ||
</> | ||
); | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.