Skip to content

Commit

Permalink
Showing image on the individual blog post
Browse files Browse the repository at this point in the history
  • Loading branch information
pramit-marattha committed Jan 22, 2021
1 parent b5df671 commit 2f22611
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion client/components/blog/Card/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ const Card =({blog})=>{
<CategoryIcon style={{color:"limegreen"}}/>[{listAndDisplayAllCategories(blog)}]<LabelIcon style={{color:"teal"}}/>[{listAndDisplayAllTaglists(blog)}]
</section>
<div className="row">
<div className="col-md-4">Image-Background</div>
<div className="col-md-4">
<section>
<img className="img img-fluid" style={{maxHeight:"120px",width:"auto"}} src={`${API}/api/blog/photo/${blog.slug}`} alt={blog.title}/>
</section>
</div>
<div className="col-md-8">
<section>
<div className="pb-3">{renderHTML(blog.excerpt)}</div>
Expand Down
2 changes: 1 addition & 1 deletion client/pages/blogs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Blogs = ({blogs,categories,taglists,size}) => {
return blogs.map((blog,index)=>(
<article key={index}>
<Card blog={blog}/>
<hr style={{backgroundColor:"white"}}/>
<hr style={{backgroundColor:"white",height:"2px",width:"100%"}}/>
</article>
))
}
Expand Down

0 comments on commit 2f22611

Please # to comment.