Blof data
This commit is contained in:
+15
-37
@@ -10,7 +10,9 @@ export default function Home() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function fetchPosts() {
|
async function fetchPosts() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch('https://blogdata.chiefsoft.net/blogdata/mermsemr')
|
const blog_url = 'https://blogdata.chiefsoft.net/mermsblogdata/mermsemr';
|
||||||
|
//http://localhost:8805/mermsblogdata/mermsemr'; // https://blogdata.chiefsoft.net/mermsblogdata/mermsemr
|
||||||
|
const res = await fetch(blog_url)
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
setPosts(data)
|
setPosts(data)
|
||||||
console.log(data)
|
console.log(data)
|
||||||
@@ -25,6 +27,9 @@ export default function Home() {
|
|||||||
})
|
})
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
const firstBlogItem = posts?.payload?.blogdata[0];
|
||||||
|
console.log(firstBlogItem);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Layout headerStyle={1} footerStyle={3} headerCls="navbar-dark inner-page-header">
|
<Layout headerStyle={1} footerStyle={3} headerCls="navbar-dark inner-page-header">
|
||||||
@@ -37,7 +42,10 @@ export default function Home() {
|
|||||||
{/* BLOG POST IMAGE */}
|
{/* BLOG POST IMAGE */}
|
||||||
<div className="col-md-6">
|
<div className="col-md-6">
|
||||||
<div className="blog-post-img">
|
<div className="blog-post-img">
|
||||||
<img className="img-fluid r-16" src="/images/blog/post-11-img.jpg" alt="blog-post-image" />
|
<img
|
||||||
|
className="img-fluid r-16"
|
||||||
|
src="https://blog.mermsemr.com/wp-content/uploads/2024/10/branding-practice.jpg"
|
||||||
|
alt="blog-post-image" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* BLOG POST TEXT */}
|
{/* BLOG POST TEXT */}
|
||||||
@@ -45,20 +53,18 @@ export default function Home() {
|
|||||||
<div className="blog-post-txt">
|
<div className="blog-post-txt">
|
||||||
|
|
||||||
<h3 className="s-38 w-700">
|
<h3 className="s-38 w-700">
|
||||||
<Link href="/single-post">Congue magna tempor and ipsum Martex sapien turpis
|
<Link href="https://blog.mermsemr.com/?p=55"> {firstBlogItem?.post_name}
|
||||||
laoreet augue
|
|
||||||
</Link>
|
</Link>
|
||||||
</h3>
|
</h3>
|
||||||
{/* Text */}
|
{/* Text */}
|
||||||
<p>Aliqum mullam blandit vitae and tempor sapien and donec lipsum gravida porta undo
|
<p>{firstBlogItem?.post_content.substring(0, 250)}
|
||||||
velna dolor libero a risus aliquet tempus posuere a tempor velna tempus posuere dolor
|
|
||||||
</p>
|
</p>
|
||||||
{/* Post Meta */}
|
{/* Post Meta */}
|
||||||
<div className="blog-post-meta mt-30">
|
<div className="blog-post-meta mt-30">
|
||||||
<ul className="post-meta-list ico-10">
|
<ul className="post-meta-list ico-10">
|
||||||
<li><p className="w-500">MermsEmr Team</p></li>
|
<li><p className="w-500">MERMS </p></li>
|
||||||
<li className="meta-list-divider"><p><span className="flaticon-minus" /></p></li>
|
<li className="meta-list-divider"><p><span className="flaticon-minus" /></p></li>
|
||||||
<li><p>Apr 28, 2023</p></li>
|
<li><p>{firstBlogItem?.post_date}</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -446,35 +452,7 @@ export default function Home() {
|
|||||||
<hr className="divider" />
|
<hr className="divider" />
|
||||||
{/* NEWSLETTER-1
|
{/* NEWSLETTER-1
|
||||||
============================================= */}
|
============================================= */}
|
||||||
<section id="newsletter-1" className="newsletter-section">
|
|
||||||
<div className="newsletter-overlay">
|
|
||||||
<div className="container">
|
|
||||||
<div className="row d-flex align-items-center row-cols-1 row-cols-lg-2">
|
|
||||||
{/* NEWSLETTER TEXT */}
|
|
||||||
<div className="col">
|
|
||||||
<div className="newsletter-txt">
|
|
||||||
<h4 className="s-34 w-700">Stay up to date with our news, ideas and updates</h4>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/* NEWSLETTER FORM */}
|
|
||||||
<div className="col">
|
|
||||||
<form className="newsletter-form">
|
|
||||||
<div className="input-group">
|
|
||||||
<input type="email" autoComplete="off" className="form-control" placeholder="Your email address" required id="s-email" />
|
|
||||||
<span className="input-group-btn">
|
|
||||||
<button type="submit" className="btn btn--theme hover--theme">Subscribe Now</button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{/* Newsletter Form Notification */}
|
|
||||||
<label htmlFor="s-email" className="form-notification" />
|
|
||||||
</form>
|
|
||||||
</div> {/* END NEWSLETTER FORM */}
|
|
||||||
</div> {/* End row */}
|
|
||||||
</div> {/* End container */}
|
|
||||||
</div> {/* End newsletter-overlay */}
|
|
||||||
</section> {/* END NEWSLETTER-1 */}
|
|
||||||
{/* DIVIDER LINE */}
|
|
||||||
<hr className="divider" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user