KnowledgeBlog.js
4.02 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
import React from "react";
import Link from "next/link";
import Image from "next/image";
import { Col, Container, Row } from "react-bootstrap";
import Heading from "@/components/reuseables/Heading";
import { motion } from "framer-motion";
import { slideFromLeft } from "@/components/reuseables/variants";
import { cleanImage } from "@/layout/imageHandling";
const blogPosts = [
  {
    id: 1,
    image: "/images/blog/blogs1.jpeg",
    altText: "Blog Image",
    date: "Jan 22, 2024",
    author: "By Advith Consulting",
    authorLink: "/blog/author",
    title: "Tax Deducted at Source under Income Tax Act",
    shortDesc:
      "Tax Deducted at Source under Income Tax ActBy Advith Consulting1. Introduction",
    btnText: "Read More",
    detailsUrl: "/blog/details",
  },
  {
    id: 2,
    image: "/images/blog/blog-2.jpeg",
    altText: "Blog Image",
    date: "Jan 22, 2024",
    author: "By Advith Consulting",
    authorLink: "/blog/author",
    title: "Reporting on Fraudulent Activities by Auditors",
    shortDesc:
      "Reporting on Fraudulent Activities by AuditorsBy Advith ConsultingIntroduction",
    btnText: "Read More",
    detailsUrl: "/blog/details",
  },
  {
    id: 3,
    image: "/images/blog/blogs3.jpeg",
    altText: "Blog Image",
    date: "Jan 22, 2024",
    author: "By Advith Consulting",
    authorLink: "/blog/author",
    title: "Start-up and Angel Tax",
    shortDesc:
      "Start-up and Angel TaxBy Advith ConsultingBackgroundWith the aim of foste",
    btnText: "Read More",
    detailsUrl: "/blog/details",
  },
];
const KnowledgeBlog = ({ Knowledgedata, BlogHeading }) => {
  const latestPosts = Knowledgedata.slice(0, 3);
  console.log(BlogHeading, "Knowledgedata");
  return (
    <>
      <div id="blog" className="blog-area pt-100 pb-70">
        <Container>
          <div className="section-title">
            <span className="sub-title">OUR BLOGS</span>
            <Heading el="h2" heading="Advith’s Insights"  />
            <p>{BlogHeading.Description}</p>
          </div>
          <Row className="justify-content-center">
            {latestPosts &&
              latestPosts.map((post, index) => (
                <Col md={6} lg={4} key={index}>
                  <motion.div
                    variants={slideFromLeft(0.5)}
                    initial={"hidden"}
                    whileInView={"show"}
                    viewport={{ once: false, amount: 0.4 }}
                  >
                    <div className="single-blog-post">
                      <div className="post-image">
                        <Link href={post?.slug} className="d-block">
                          <Image
                            layout="fill"
                            src={cleanImage(post?.ThumbnailImage?.url)}
                            alt={post?.ThumbnailImage?.alternativeText}
                            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>
                            {post?.Author}
                          </li>
                        </ul>
                        <h3>
                          <Link href={post?.slug}>{post.Title}</Link>
                        </h3>
                        <p>{post?.shortDescription}</p>
                        <Link
                          href={`/blog/${post?.slug}`}
                          className="default-btn"
                        >
                          Read More <i className="ri-arrow-right-line"></i>
                        </Link>
                      </div>
                    </div>
                  </motion.div>
                </Col>
              ))}
          </Row>
        </Container>
      </div>
    </>
  );
};
export default KnowledgeBlog;