-
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
66f93e6
commit 325ffd9
Showing
3 changed files
with
63 additions
and
222 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,127 +1,54 @@ | ||
import styles from './SectionBlogs.module.scss'; | ||
import Image from "next/image"; | ||
import Fade from 'react-reveal/Fade'; | ||
import AuthorDetails from '../BlogListing/AuthorDetails'; | ||
import styles from "./SectionBlogs.module.scss"; | ||
import Fade from "react-reveal/Fade"; | ||
import AuthorDetails from "../BlogListing/AuthorDetails"; | ||
import Link from "next/link"; | ||
|
||
export default function SectionBlogs(props) { | ||
return ( | ||
<section className='pt-10 lg:pt-20'> | ||
<div className='container container--small'> | ||
<div className="sectionHeader"> | ||
<Fade> | ||
<h2 className='sectionHeader__title md:w-36 lg:w-44 xl:w-56'>Series of Blogs</h2> | ||
<p className="sectionHeader__description">Get the latest scoop from the world of tech ranging from javascript to AI and other crazy hacks from dev ducks across the globe.</p> | ||
</Fade> | ||
</div> | ||
{/* <div className={styles.blogList}> | ||
<div className={styles.blogItem}> | ||
<Fade> | ||
<figure className={styles.blogImage}> | ||
<Image | ||
src="/images/temp/blog1.png" | ||
alt="Blog image" | ||
width={528} | ||
height={548} | ||
className="w-full" | ||
/> | ||
</figure> | ||
</Fade> | ||
<h3> | ||
<a href="">All you need to know about Supabase</a> | ||
</h3> | ||
<AuthorDetails /> | ||
</div> | ||
<div className={styles.blogItem}> | ||
<Fade> | ||
<figure className={styles.blogImage}> | ||
<Image | ||
src="/images/temp/blog2.png" | ||
alt="Blog image" | ||
width={528} | ||
height={548} | ||
className="w-full" | ||
/> | ||
</figure> | ||
</Fade> | ||
<h3> | ||
<a href="">Creative Search Bar and Input Field Design Inspiration</a> | ||
</h3> | ||
<AuthorDetails /> | ||
</div> | ||
<div className={styles.blogItem}> | ||
<Fade> | ||
<figure className={styles.blogImage}> | ||
<Image | ||
src="/images/temp/blog3.png" | ||
alt="Blog image" | ||
width={528} | ||
height={548} | ||
className="w-full" | ||
/> | ||
</figure> | ||
</Fade> | ||
<h3> | ||
<a href="">All you need to know about Supabase</a> | ||
</h3> | ||
<AuthorDetails /> | ||
</div> | ||
<div className={styles.blogItem}> | ||
<Fade> | ||
<figure className={styles.blogImage}> | ||
<Image | ||
src="/images/temp/blog4.png" | ||
alt="Blog image" | ||
width={528} | ||
height={548} | ||
className="w-full" | ||
/> | ||
</figure> | ||
</Fade> | ||
<h3> | ||
<a href="">All you need to know about Supabase</a> | ||
</h3> | ||
<AuthorDetails /> | ||
</div> | ||
</div> */} | ||
<div className={styles.blogList}> | ||
{props.blog.map((item, key) => ( | ||
<div className={styles.blogItem} key={key}> | ||
<Fade> | ||
<figure className={styles.blogImage}> | ||
<img | ||
src={item.bannerImage} | ||
alt={item.title} | ||
width={528} | ||
height={548} | ||
className="w-full" | ||
/> | ||
</figure> | ||
</Fade> | ||
<h3> | ||
<a href={`/${item.slug}`}>{item.title}</a> | ||
</h3> | ||
|
||
<AuthorDetails | ||
username={item.primaryAuthor.username} | ||
/> | ||
</div> | ||
))} | ||
</div> | ||
<div className="cta text-center"> | ||
<a href="/blog" className="btn"> | ||
<span className="btn__text">VIEW ALL OUR LATEST POSTS</span> | ||
</a> | ||
</div> | ||
return ( | ||
<section className="pt-10 lg:pt-20"> | ||
<div className="container container--small"> | ||
<div className="sectionHeader"> | ||
<Fade> | ||
<h2 className="sectionHeader__title md:w-36 lg:w-44 xl:w-56"> | ||
Series of Blogs | ||
</h2> | ||
<p className="sectionHeader__description"> | ||
Get the latest scoop from the world of tech ranging from | ||
javascript to AI and other crazy hacks from dev ducks across the | ||
globe. | ||
</p> | ||
</Fade> | ||
</div> | ||
<div className={styles.blogList}> | ||
{props.blog.map((item, key) => ( | ||
<div className={styles.blogItem} key={key}> | ||
<Fade> | ||
<figure className={styles.blogImage}> | ||
<img | ||
src={item.bannerImage} | ||
alt={item.title} | ||
width={528} | ||
height={548} | ||
className="w-full" | ||
/> | ||
</figure> | ||
</Fade> | ||
<h3> | ||
<a href={`/${item.slug}`}>{item.title}</a> | ||
</h3> | ||
|
||
<AuthorDetails username={item.primaryAuthor.username} /> | ||
</div> | ||
</section> | ||
); | ||
} | ||
))} | ||
</div> | ||
<div className="cta text-center"> | ||
<Link href="/blog"> | ||
<a className="btn"> | ||
<span className="btn__text">VIEW ALL OUR LATEST POSTS</span> | ||
</a> | ||
</Link> | ||
</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