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