Skip to content

Commit 2f22611

Browse files
Showing image on the individual blog post
1 parent b5df671 commit 2f22611

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

client/components/blog/Card/Card.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ const Card =({blog})=>{
4343
<CategoryIcon style={{color:"limegreen"}}/>[{listAndDisplayAllCategories(blog)}]<LabelIcon style={{color:"teal"}}/>[{listAndDisplayAllTaglists(blog)}]
4444
</section>
4545
<div className="row">
46-
<div className="col-md-4">Image-Background</div>
46+
<div className="col-md-4">
47+
<section>
48+
<img className="img img-fluid" style={{maxHeight:"120px",width:"auto"}} src={`${API}/api/blog/photo/${blog.slug}`} alt={blog.title}/>
49+
</section>
50+
</div>
4751
<div className="col-md-8">
4852
<section>
4953
<div className="pb-3">{renderHTML(blog.excerpt)}</div>

client/pages/blogs/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const Blogs = ({blogs,categories,taglists,size}) => {
1212
return blogs.map((blog,index)=>(
1313
<article key={index}>
1414
<Card blog={blog}/>
15-
<hr style={{backgroundColor:"white"}}/>
15+
<hr style={{backgroundColor:"white",height:"2px",width:"100%"}}/>
1616
</article>
1717
))
1818
}

0 commit comments

Comments
 (0)