|
|
|
@ -3,13 +3,18 @@ import React from "react"; |
|
|
|
|
import blogImage from "../../../assets/images/blog-featured-image.jpg"; |
|
|
|
|
import blogAuthorImg from "../../../assets/images/blog-author.png"; |
|
|
|
|
|
|
|
|
|
import commentIcon from "../../../assets/icons/black-comment-icon.svg"; |
|
|
|
|
import commentIcon from "../../../assets/icons/light-gray-comment-icon.svg"; |
|
|
|
|
import whiteCommentIcon from "../../../assets/icons/white-comment-icon.svg"; |
|
|
|
|
|
|
|
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; |
|
|
|
|
import {} from "@fortawesome/free-brands-svg-icons"; |
|
|
|
|
import { faComment } from "@fortawesome/free-solid-svg-icons"; |
|
|
|
|
|
|
|
|
|
const BlogDesign4 = () => { |
|
|
|
|
const BlogDesign4 = ({ |
|
|
|
|
blogExcerpt, |
|
|
|
|
blogAuthor, |
|
|
|
|
blogComments, |
|
|
|
|
commentNumBgColor, |
|
|
|
|
commentNumTextColor, |
|
|
|
|
commentNumTopPosition, |
|
|
|
|
commentNumRightPosition, |
|
|
|
|
}) => { |
|
|
|
|
return ( |
|
|
|
|
<section className="w-4/12 mx-auto p-4 bg-white rounded-md shadow-md my-20 mb-8"> |
|
|
|
|
{/* title holder */} |
|
|
|
@ -35,33 +40,38 @@ const BlogDesign4 = () => { |
|
|
|
|
<h2 className="text-sm text-grayTextColor"> |
|
|
|
|
آیا مواد غذای پر فیبر و مفید هستند؟ |
|
|
|
|
</h2> |
|
|
|
|
{blogExcerpt && ( |
|
|
|
|
<p className="text-xs text-justify leading-6 text-grayTextColor"> |
|
|
|
|
در این قسمت یک توضیح بسیار کوتاه یا عادی در مورد ارور نوشته خواهد |
|
|
|
|
شد. طراح سعی می کند تا این متن را بیشتر از خد انتظار بلند کند تا |
|
|
|
|
دیگران متوجه شوند. |
|
|
|
|
</p> |
|
|
|
|
)} |
|
|
|
|
<div className=" flex item-center justify-between"> |
|
|
|
|
{blogAuthor && ( |
|
|
|
|
<div className=" flex items-center"> |
|
|
|
|
<img src={blogAuthorImg} alt="" className="w-6 h-6" /> |
|
|
|
|
<p className="text-xs text-lightGrayTextColor font-light mr-2"> |
|
|
|
|
حامد دژبانی نسب |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
{blogComments && ( |
|
|
|
|
<div className=" flex items-center"> |
|
|
|
|
<p className="text-xs text-lightGrayTextColor font-light ml-2"> |
|
|
|
|
زمان مطالعه 30 دقیقه |
|
|
|
|
</p> |
|
|
|
|
<div className="relative"> |
|
|
|
|
<FontAwesomeIcon |
|
|
|
|
icon={faComment} |
|
|
|
|
className="text-grayTextColor text-md" |
|
|
|
|
></FontAwesomeIcon> |
|
|
|
|
<span className="comment-num absolute -top-3 -right-3 bg-lightGrayBgColor text-white"> |
|
|
|
|
<img src={commentIcon} alt="" className="w-6 h-6" /> |
|
|
|
|
<span |
|
|
|
|
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`} |
|
|
|
|
> |
|
|
|
|
26 |
|
|
|
|
</span> |
|
|
|
|
</div>{" "} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</section> |
|
|
|
@ -69,3 +79,22 @@ const BlogDesign4 = () => { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default BlogDesign4; |
|
|
|
|
|
|
|
|
|
// background color i used in commnet number background color
|
|
|
|
|
// bg-lightGrayBgColor
|
|
|
|
|
// bg-white
|
|
|
|
|
|
|
|
|
|
// text color i used for comment number text color:
|
|
|
|
|
// text-grayTextColor
|
|
|
|
|
// text-white
|
|
|
|
|
|
|
|
|
|
BlogDesign4.defaultProps = { |
|
|
|
|
blogExcerpt: true, |
|
|
|
|
blogAuthor: true, |
|
|
|
|
blogComments: true, |
|
|
|
|
|
|
|
|
|
commentNumBgColor: "bg-lightGrayBgColor", |
|
|
|
|
commentNumTextColor: "text-white", |
|
|
|
|
commentNumTopPosition: "-top-2", |
|
|
|
|
commentNumRightPosition: "-right-2", |
|
|
|
|
}; |
|
|
|
|