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

removed merge conflicts #41 #75

Merged
merged 2 commits into from
Jun 2, 2024
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
14 changes: 7 additions & 7 deletions frontend/src/components/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ const PostCard = ({ post }: Props) => {
return (
<div
key={post.id}
className="bg-gray-800 border border-gray-600 p-4 rounded hover:border-blue-500 hover:-translate-y-2 transition ease-in-out"
className="bg-gray-800 border border-gray-600 p-6 rounded-lg shadow-lg hover:shadow-2xl hover:border-blue-500 hover:-translate-y-2 transition-transform duration-300 ease-in-out"
>
<h2 className="text-lg font-semibold mb-2 text-white">{post.title}</h2>
<p className="text-gray-400 mb-2">
<h2 className="text-xl font-bold mb-3 text-white">{post.title}</h2>
<p className="text-gray-300 mb-4">
{post.description.length > 100
? `${post.description.slice(0, 100)}...`
: post.description}
</p>
<p className="text-gray-500">By: {post.author.username}</p>
<div className="mt-2 flex flex-wrap">
<p className="text-gray-400 mb-4">By: {post.author.username}</p>
<div className="mt-2 flex flex-wrap gap-2">
{post.tags.map((tag, index) => (
<span
key={index}
className="text-sm bg-gray-700 text-white px-2 py-1 rounded mr-2 mb-2"
className="text-sm bg-gray-700 text-white px-3 py-1 rounded-full"
>
{tag}
</span>
))}
</div>
<Link
to={`/app/posts/${post.id}`}
className="text-blue-400 hover:text-blue-300"
className="inline-block mt-4 text-blue-400 hover:text-blue-300 transition-colors duration-200"
>
Read more
</Link>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/Posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const Posts = () => {
const filteredPosts = posts.filter(post =>
filterTags.every(tag => post.tags.map(t => t.toLowerCase()).includes(tag)) &&
(post.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
post.description.toLowerCase().includes(searchQuery.toLowerCase()) ||
post.author.username.toLowerCase().includes(searchQuery.toLowerCase()))
post.description.toLowerCase().includes(searchQuery.toLowerCase()) ||
post.author.username.toLowerCase().includes(searchQuery.toLowerCase()))
);

const handlePreviousPage = () => {
Expand Down
Loading