Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add blog card #50

Merged
merged 2 commits into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/issue-autolink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ jobs:
steps:
- uses: tkt-actions/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
repo-token: "${{ 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 }}"
resolve: "true"
28 changes: 28 additions & 0 deletions src/components/blogcard/BlogCard.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";

const BlogCard = ({ blog }) => {
return (
<div className='bg-white shadow-md rounded-xl ml-2 mr-2 mb-2 mt-2 px-2 py-2 verflow-hidden'>
<div className='relative '>
<div className='bg-green-500 text-white absolute bottom-0 left-0 py-0 px-0 rounded-tr-lg'>
<p className='text-sm bg-green ml-0 px-3 py-2'>
{blog.date}
</p>
</div>
<img
src={blog.image}
alt={blog.title}
className='w-full h-48 object-cover rounded-xl'
/>
</div>
<div className='p-6'>
<h3 className='text-2xl text-center font-semibold text-gray-800 mb-2 '>
{blog.title}
</h3>
<p className='text-gray-700 text-center'>{blog.description}</p>
</div>
</div>
);
};

export default BlogCard;
Loading