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.
71 lines
2.2 KiB
71 lines
2.2 KiB
import React from "react"; |
|
import CommentIcon from "../../MiniComponents/CommentIcon"; |
|
|
|
const BlogDesign3 = ({ |
|
blogTitle, |
|
blogSubTitle, |
|
featuredImage, |
|
blogAuthor, |
|
blogAuthorImg, |
|
blogComments, |
|
}) => { |
|
return ( |
|
<div |
|
className="min-w-[550px] relative flex flex-col justify-end p-3" |
|
style={{ |
|
backgroundImage: `url(${featuredImage})`, |
|
backgroundSize: "100% 100%", |
|
backgroundRepeat: "no-repeat", |
|
// minHeight: "300px", |
|
height: "calc(100vh/3)", |
|
maxHeight: "300px", |
|
}} |
|
> |
|
{/* <img src={blogFeaturedImage2} alt="" /> */} |
|
<div className="w-full mx-auto p-4 rounded-lg shadow-md bg-surface transform translate-y-20"> |
|
{blogTitle && ( |
|
<h2 className="text-primaryText text-base text-justify font-bold leading-6"> |
|
{blogTitle} |
|
</h2> |
|
)} |
|
{blogSubTitle && ( |
|
<h2 className="text-primaryText text-base mt-2 font-bold leading-6"> |
|
شما چه فکری می کنید |
|
</h2> |
|
)} |
|
<div className="flex item-center justify-between w-full mt-4"> |
|
{blogAuthor && ( |
|
<div className="flex items-center"> |
|
<img src={blogAuthorImg} alt="author" className="w-8" /> |
|
<p className="mr-2 text-sm text-[#2a2a2a]">{blogAuthor}</p> |
|
</div> |
|
)} |
|
{blogComments && ( |
|
<div className="flex items-center"> |
|
<p className="ml-2 text-sm text-[#2a2a2a]">{blogComments}</p> |
|
<CommentIcon |
|
commentClassName="w-7" |
|
commentNum={"26"} |
|
className="w-5 h-5 bg-primaryText text-white text-[10px] font-bold absolute top-0 right-0 transform translate-x-1 -translate-y-2" |
|
/> |
|
</div> |
|
)} |
|
</div> |
|
</div> |
|
</div> |
|
); |
|
}; |
|
|
|
export default BlogDesign3; |
|
|
|
BlogDesign3.defaultProps = { |
|
blogTitle: `آیا مواد غذای پر فیبر و مفید هستند؟`, |
|
blogSubTitle: `شما چه فکری می کنید`, |
|
|
|
featuredImage: "images/blog-featured-image2.jpg", |
|
|
|
blogAuthor: `حامد دژبانی نسب`, |
|
blogAuthorImg: "images/blog-author.png", |
|
|
|
blogComments: `زمان مطالعه 30 دقیقه`, |
|
};
|
|
|