Blof data
This commit is contained in:
+15
-37
@@ -10,7 +10,9 @@ export default function Home() {
|
||||
useEffect(() => {
|
||||
async function fetchPosts() {
|
||||
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()
|
||||
setPosts(data)
|
||||
console.log(data)
|
||||
@@ -25,6 +27,9 @@ export default function Home() {
|
||||
})
|
||||
}, [])
|
||||
|
||||
const firstBlogItem = posts?.payload?.blogdata[0];
|
||||
console.log(firstBlogItem);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Layout headerStyle={1} footerStyle={3} headerCls="navbar-dark inner-page-header">
|
||||
@@ -37,7 +42,10 @@ export default function Home() {
|
||||
{/* BLOG POST IMAGE */}
|
||||
<div className="col-md-6">
|
||||
<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>
|
||||
{/* BLOG POST TEXT */}
|
||||
@@ -45,20 +53,18 @@ export default function Home() {
|
||||
<div className="blog-post-txt">
|
||||
|
||||
<h3 className="s-38 w-700">
|
||||
<Link href="/single-post">Congue magna tempor and ipsum Martex sapien turpis
|
||||
laoreet augue
|
||||
<Link href="https://blog.mermsemr.com/?p=55"> {firstBlogItem?.post_name}
|
||||
</Link>
|
||||
</h3>
|
||||
{/* Text */}
|
||||
<p>Aliqum mullam blandit vitae and tempor sapien and donec lipsum gravida porta undo
|
||||
velna dolor libero a risus aliquet tempus posuere a tempor velna tempus posuere dolor
|
||||
<p>{firstBlogItem?.post_content.substring(0, 250)}
|
||||
</p>
|
||||
{/* Post Meta */}
|
||||
<div className="blog-post-meta mt-30">
|
||||
<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><p>Apr 28, 2023</p></li>
|
||||
<li><p>{firstBlogItem?.post_date}</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -446,35 +452,7 @@ export default function Home() {
|
||||
<hr className="divider" />
|
||||
{/* 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>
|
||||
|
||||
</Layout>
|
||||
|
||||
Reference in New Issue
Block a user