Added recent job page

This commit is contained in:
dev-chiefworks
2021-12-31 00:03:53 -05:00
parent 5faa4bd728
commit 08a24cd265
7 changed files with 452 additions and 95 deletions
+78 -88
View File
@@ -1,9 +1,42 @@
import React from 'react';
import React, { useState } from 'react';
import blogOne from '../../assets/images/blog-1.jpg';
import blogTwo from '../../assets/images/blog-2.jpg';
import blogThree from '../../assets/images/blog-3.jpg';
import BlogData from './../../Services/BlogData';
import Axios from 'axios';
function BlogHomeOne() {
const blogResult = BlogData();
/*
const [blogResult,setBlogResult] = useState("");
var res = null;
// const getWrenchBoardBlog = () => {
Axios.get("http://10.0.0.52:5101/wp/wrenchboard/", {
headers: {
'Access-Control-Allow-Origin' : '*',
'Access-Control-Allow-Credentials':true,
'crossorigin':true,
'Access-Control-Allow-Methods':'GET,PUT,POST,DELETE,PATCH,OPTIONS',
},
responseType: "json",
}).then((response) => {
console.log(response);
res = response;
console.log("~~~~~~~~ ameye ~~~~~~~~~");
// setBlogResult( response !=null ? response.data.blogResult[0]["payload"]:"" );
setBlogResult( response.data );
// console.log(blogResultData);
});
*/
debugger;
console.log("~~~~~~~~ dorcas ~~~~~~~~~");
console.log(blogResult);
return (
<>
<section className="appie-blog-area pt-90 pb-95">
@@ -16,93 +49,50 @@ function BlogHomeOne() {
</div>
</div>
<div className="row">
<div className="col-lg-4 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="200ms"
>
<div className="thumb">
<img src={blogOne} alt="" />
</div>
<div className="content">
<div className="blog-meta">
<ul>
<li>December 10, 2021</li>
<li>
<a href="#">Online Jobs</a>
</li>
</ul>
</div>
<h3 className="title">
<a href="/news/single-news">
Online Jobs for University Students
</a>
</h3>
<a href="#">
Learn More <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>
<div className="col-lg-4 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="400ms"
>
<div className="thumb">
<img src={blogTwo} alt="" />
</div>
<div className="content">
<div className="blog-meta">
<ul>
<li>December 17, 2021</li>
<li>
<a href="#">Time and price management </a>
</li>
</ul>
</div>
<h3 className="title">
<a href="/news/single-news">
Time and price management when working an online job
</a>
</h3>
<a href="#">
Learn More <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>
<div className="col-lg-4 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="600ms"
>
<div className="thumb">
<img src={blogThree} alt="" />
</div>
<div className="content">
<div className="blog-meta">
<ul>
<li>December 21, 2021</li>
<li>
<a href="#"> online career strategy</a>
</li>
</ul>
</div>
<h3 className="title">
<a href="/news/single-news">
How to implement an effective online career strategy
</a>
</h3>
<a href="#">
Learn More <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>
{
blogResult.map(i=>{
console.log(i);
console.log("------------------------------ 11 ----");
var blgImg = "https://blog.mermsemr.com/wp-content/uploads/"+ i.meta_value;
return ( <div className="col-lg-4 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="200ms"
>
<div className="thumb">
<img src={blgImg} alt="{i.post_title}" />
</div>
<div className="content">
<div className="blog-meta">
<ul>
<li>{i.post_date}</li>
<li>
<a href="#">Online Jobs</a>
</li>
</ul>
</div>
<h3 className="title">
<a href="{i.guid}">
{i.post_title}
</a>
</h3>
<a href="#">
Learn More <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div> );
})
}
</div>
</div>
</section>