diff --git a/src/component/Blog/Blog/Main.js b/src/component/Blog/Blog/Main.js index 887cb45..a1608c3 100644 --- a/src/component/Blog/Blog/Main.js +++ b/src/component/Blog/Blog/Main.js @@ -4,23 +4,25 @@ import BGImg from "../../../assets/images/bread_crumb_bg.png"; import BGImg1 from "../../../assets/images/bread_crumb_bg_one.png"; import BGImg2 from "../../../assets/images/bread_crumb_bg_two.png"; import SiteService from "../../../vendors/service/siteService"; - +import Aos from "aos"; const Main = ({ brdcum, bgimg }) => { - const [firstBlog, setFirstBlog] = useState([]); + // const [firstBlog, setFirstBlog] = useState([]); const [blogData, setBlogData] = useState([]); const api = new SiteService(); useEffect(() => { getBlogData(); + Aos.init(); }, []); const getBlogData = async () => { try { const res = await api.blogData(); - let firstBlogData = res.data.shift(); + // let firstBlogData = res.data.slice(0,1); + setBlogData(res.data); - setFirstBlog([firstBlogData]); - console.log(firstBlogData); + // setFirstBlog(firstBlogData); + console.log(res.data); @@ -72,45 +74,54 @@ const Main = ({ brdcum, bgimg }) => {
- {firstBlog.length > 0 && -
-
-
-
- image - {/* 20 min ago */} - - {new Date (firstBlog[0].post_date).toDateString()} -
-
-
-
-
-

{firstBlog[0].post_title}

-
- - READ MORE - + {blogData.map((data,index) => { + if (index == 0){ + return ( +
+
+
+
+ image + {/* 20 min ago */} + + {new Date (data.post_date).toDateString()} +
+
+
+
+
+

{data.post_title}

+
+ + READ MORE + +
+
-
-
- } + + ) + } + })} + +
- {blogData.map((data) => ( -
-
+ {blogData.map((data, index) => { + if (index > 0){ + return ( +
+
image {new Date (data && data.post_date).toDateString()} @@ -124,7 +135,11 @@ const Main = ({ brdcum, bgimg }) => {
- ))} + + )} + + + })}
    diff --git a/src/component/Blog/BlogSingle/Main.js b/src/component/Blog/BlogSingle/Main.js index 78b7993..4e7f61c 100644 --- a/src/component/Blog/BlogSingle/Main.js +++ b/src/component/Blog/BlogSingle/Main.js @@ -56,6 +56,7 @@ const Main = ({brdcum}) => {
    Review + {/* 45 min ago */} {new Date (data && data.post_modified).toDateString()}
    @@ -67,19 +68,52 @@ const Main = ({brdcum}) => {

    {data && data.post_name}

    -
    - +
    - + {/*
    +

    Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived.

    +

    Printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unnown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys centuries, but also the leap into electronic.

    +

    Why we are best

    +

    Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic.

    +
      +
    • Lorem Ipsum is simply dummy text of the printing and typesetting in

    • +
    • Dustry lorem Ipsum has been the industrys standard dummy text ev er since the when

    • +
    • Unknown printer took a galley of type and scrambled it to make.

    • +
    • Type specimen book. It has survived not only five centuries, but also the leap into electronic.

    • +
    • Lorem Ipsum is simply dummy text of the printing.

    • +
    • Dustry lorem Ipsum has been the industrys standard dummy text ev er since.

    • +
    • Unknown printer took a galley of type and scrambled it to make.

    • +
    • Type specimen book. It has survived not only.

    • +
    +
    +
    +
    +
    + image +
    +
    + image +
    +
    +
    +
    +

    Why we are best

    +

    Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic Lorem Ipsum is simply dummy text of the printing and typesettingindustry lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived.

    +
    +
    + image +

    Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy.

    +

    Mr. John Doe, Apper Inc

    +
    */} + {/*

    Lorem Ipsum is simply dummy text of the printing and typesetting in dustry lorem Ipsum has been the industrys standard dummy text ev er since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic industry.

    */}
    -
    - {/* image */} -
    + {/*
    + image +
    */}
    - {/*

    {data && data.post_author}

    */} +

    {data && data.post_author}

    {new Date (data && data.post_date).toDateString()} -
    @@ -91,11 +125,70 @@ const Main = ({brdcum}) => {
- +
+
    +
  • Tags:

  • +
  • app,
  • +
  • rating,
  • +
  • development
  • +
+
- +
+
+
+

3 Comments

+
+ +
+