You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.7 KiB

import blogImage from "../assets/blog-featured-image.jpg";
import blogAuthorImg from "../assets/blog-author.png";
import commentIcon from "../assets/light-gray-comment-icon.svg";
const BlogDesign1 = ({
blogExcerpt,
blogAuthor,
blogComments,
commentNumBgColor,
commentNumTextColor,
commentNumTopPosition,
commentNumRightPosition,
}) => {
return (
<div className="w-fit flex items-strech justify-around p-4 bg-white">
<div className="w-fit">
<img
src="images/blog-featured-image.jpg"
alt="blogImage"
className="shrink"
/>
</div>
<div className="flex-1 flex flex-col justify-between mr-4 py-2">
<div>
<h2 className="text-base text-justify text-[#646464] font-sansbold leading-6">
آیا مواد غذای پر فیبر و مفید هستند؟
</h2>
{blogExcerpt && (
<p className="text-justify text-sm leading-6 my-1 text-[#646464] mt-3">
در این قسمت یک توضیح بسیار کوتاه یا عادی در مورد ارور نوشته خواهد
شد. طراح سعی می کند تا این متن را بیشتر از خد انتظار بلند کند تا
دیگران متوجه شوند.
</p>
)}
</div>
<div className="flex item-center justify-between w-full mt-2">
{blogAuthor && (
<div className="flex items-center">
<img src="images/blog-author.png" alt="" className="w-8 h-8" />
<p className="text-sm text-lightGrayTextColor mr-2 font-light">
حامد دژبانی نسب
</p>
</div>
)}
{blogComments && (
<div className="flex items-center">
<p className="text-sm text-lightGrayTextColor ml-2 font-light">
زمان مطالعه 30 دقیقه
</p>
<div className="relative">
<img
src="images/light-gray-comment-icon.svg"
alt=""
className="w-7 h-7"
/>
<span
className={`comment-num absolute ${commentNumBgColor} ${commentNumTextColor} ${commentNumTopPosition} ${commentNumRightPosition}`}
>
26
</span>
</div>
</div>
)}
</div>
</div>
</div>
);
};
export default BlogDesign1;
BlogDesign1.defaultProps = {
blogExcerpt: true,
blogAuthor: true,
blogComments: true,
commentNumBgColor: "bg-[#818181]",
commentNumTextColor: "text-white",
commentNumTopPosition: "-top-2",
commentNumRightPosition: "-right-2",
};