|
|
@ -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,33 +40,38 @@ const BlogDesign4 = () => { |
|
|
|
<h2 className="text-sm text-grayTextColor"> |
|
|
|
<h2 className="text-sm text-grayTextColor"> |
|
|
|
آیا مواد غذای پر فیبر و مفید هستند؟ |
|
|
|
آیا مواد غذای پر فیبر و مفید هستند؟ |
|
|
|
</h2> |
|
|
|
</h2> |
|
|
|
|
|
|
|
{blogExcerpt && ( |
|
|
|
<p className="text-xs text-justify leading-6 text-grayTextColor"> |
|
|
|
<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"> |
|
|
|
|
|
|
|
{blogAuthor && ( |
|
|
|
<div className=" flex items-center"> |
|
|
|
<div className=" flex items-center"> |
|
|
|
<img src={blogAuthorImg} alt="" className="w-6 h-6" /> |
|
|
|
<img src={blogAuthorImg} alt="" className="w-6 h-6" /> |
|
|
|
<p className="text-xs text-lightGrayTextColor font-light mr-2"> |
|
|
|
<p className="text-xs text-lightGrayTextColor font-light mr-2"> |
|
|
|
حامد دژبانی نسب |
|
|
|
حامد دژبانی نسب |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
{blogComments && ( |
|
|
|
<div className=" flex items-center"> |
|
|
|
<div className=" flex items-center"> |
|
|
|
<p className="text-xs text-lightGrayTextColor font-light ml-2"> |
|
|
|
<p className="text-xs text-lightGrayTextColor font-light ml-2"> |
|
|
|
زمان مطالعه 30 دقیقه |
|
|
|
زمان مطالعه 30 دقیقه |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
<div className="relative"> |
|
|
|
<div className="relative"> |
|
|
|
<FontAwesomeIcon |
|
|
|
<img src={commentIcon} alt="" className="w-6 h-6" /> |
|
|
|
icon={faComment} |
|
|
|
<span |
|
|
|
className="text-grayTextColor text-md" |
|
|
|
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`} |
|
|
|
></FontAwesomeIcon> |
|
|
|
> |
|
|
|
<span className="comment-num absolute -top-3 -right-3 bg-lightGrayBgColor text-white"> |
|
|
|
|
|
|
|
26 |
|
|
|
26 |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div>{" "} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
</section> |
|
|
@ -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", |
|
|
|
|
|
|
|
}; |
|
|
|