index.js
4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import React from "react";
import Link from "next/link";
import BlogSidebar from "./BlogSidebar";
import PageBanner from "@/components/reuseables/PageBanner";
import Image from "next/image";
import { Col, Container, Row } from "react-bootstrap";
const banners = [
{
imageSrc: "/images/page-title-bg.jpg",
pageTitle: "Blogs",
homePageUrl: "/",
homePageText: "Home",
activePageText: "Blogs",
},
];
const posts = [
{
id: 1,
image: "/images/blog/blog1.jpg",
altText: "Blog Image",
date: "Jan 22, 2024",
author: "Lords Evans",
authorLink: "/blog/author",
title: "The Secret of Your Business Success Find Quickly",
shortDesc:
"Lorem ipsum dolor sit amet, conseteturants atal into sadipscing elitr, sed diam nonumy eirmod nsa ada tempor invidunt ut.",
btnText: "Read More",
detailsUrl: "/blog/details",
},
{
id: 2,
image: "/images/blog/blog2.jpg",
altText: "Blog Image",
date: "Jan 22, 2024",
author: "Sarah Taylor",
authorLink: "/blog/author",
title: "Consulting is a Good and Best Into Our Company",
shortDesc:
"Lorem ipsum dolor sit amet, conseteturants atal into sadipscing elitr, sed diam nonumy eirmod nsa ada tempor invidunt ut.",
btnText: "Read More",
detailsUrl: "/blog/details",
},
{
id: 3,
image: "/images/blog/blog3.jpg",
altText: "Blog Image",
date: "Jan 22, 2024",
author: "James Andy",
authorLink: "/blog/author",
title: "Business Has Become a Good in the Global World",
shortDesc:
"Lorem ipsum dolor sit amet, conseteturants atal into sadipscing elitr, sed diam nonumy eirmod nsa ada tempor invidunt ut.",
btnText: "Read More",
detailsUrl: "/blog/details",
},
{
id: 4,
image: "/images/blog/blog4.jpg",
altText: "Blog Image",
date: "Jan 16, 2024",
author: "James Andy",
authorLink: "/blog/author",
title: "Business Has Become a Good in the Global World",
shortDesc:
"Lorem ipsum dolor sit amet, conseteturants atal into sadipscing elitr, sed diam nonumy eirmod nsa ada tempor invidunt ut.",
btnText: "Read More",
detailsUrl: "/blog/details",
},
];
const Blogs = () => {
return (
<>
<PageBanner banners={banners} />
<div className="blog-area ptb-100">
<Container>
<Row>
<Col lg={8} md={12}>
<div className="row justify-content-center">
{posts &&
posts.map((post) => (
<Col lg={6} md={6} key={post.id}>
<div className="single-blog-post">
<div className="post-image">
<Link href={post.detailsUrl} className="d-block">
<Image
src={post.image}
alt={post.altText}
layout="fill"
className="img-fluid image"
/>
</Link>
</div>
<div className="post-content">
<ul className="meta">
<li>
<i className="ri-calendar-2-line"></i> {post.date}
</li>
<li>
<i className="ri-user-voice-line"></i>
<Link href={post.authorLink}>{post.author}</Link>
</li>
</ul>
<h3>
<Link href={post.detailsUrl}>{post.title}</Link>
</h3>
<p>{post.shortDesc}</p>
<Link href={post.detailsUrl} className="default-btn">
{post.btnText}{" "}
<i className="ri-arrow-right-line"></i>
</Link>
</div>
</div>
</Col>
))}
</div>
</Col>
<div className="col-lg-4 col-md-12">
<BlogSidebar />
</div>
</Row>
</Container>
</div>
</>
);
};
export default Blogs;