Skip to content

Commit c47a1dc

Browse files
committed
Refactor header and contributor card components for improved styling and responsiveness; update button hover effects and layout adjustments for better user experience.
1 parent 5225c76 commit c47a1dc

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

src/app/(public)/_components/header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export async function Header() {
3535
</form>
3636
<Link
3737
href="/contributors"
38-
className="btn btn-square btn-ghost umami--click--contributors-button hover:bg-blue-700 transition-colors"
38+
className="btn btn-square btn-ghost umami--click--contributors-button hover:text-hacktoberfest-light transition-colors"
3939
>
4040
<BsPeopleFill size="1.5rem" color="white" title="Contributors" />
4141
</Link>
@@ -44,7 +44,7 @@ export async function Header() {
4444
href="https://github.com/max-programming/hacktoberfest-projects"
4545
target="_blank"
4646
rel="noreferrer"
47-
className="btn btn-square btn-ghost umami--click--github-button hover:bg-blue-700 transition-colors"
47+
className="btn btn-square btn-ghost umami--click--github-button hover:text-hacktoberfest-light transition-colors"
4848
>
4949
<IoLogoGithub size="1.5rem" color="white" title="GitHub" />
5050
</a>

src/app/(public)/contributors/_components/contributor-card.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,33 @@ export function ContributorCard({ contributor }: ContributorCardProps) {
4040

4141
return (
4242
<button
43-
className="justify-center min-w-full text-center shadow-2xl card focus-within:outline-hacktoberfest-green bg-hacktoberfest-black"
43+
className="group justify-center min-w-full text-center shadow-2xl card focus-within:outline-hacktoberfest-blue bg-hacktoberfest-light-blue hover:bg-hacktoberfest-light transition-all duration-300 transform hover:-translate-y-1 overflow-hidden"
4444
id={contributor.login}
4545
onClick={() => router.replace(`/contributors#${contributor.login}`)}
4646
ref={cardRef}
4747
>
48-
<div className="w-full pt-5 mx-auto">
49-
<figure className="w-full h-full">
50-
<img src={url} alt={contributor.name} className="rounded-xl" />
48+
<div className="w-full mx-auto">
49+
<figure className="w-full h-56">
50+
<img
51+
src={url}
52+
alt={contributor.name}
53+
className="h-full w-full object-cover transition-transform duration-300 group-hover:scale-110"
54+
/>
5155
</figure>
5256
</div>
5357
<div className="w-full gap-3 items-center card-body">
54-
<h2 className="text-2xl font-medium text-hacktoberfest-green">
58+
<h2 className="text-2xl font-medium text-hacktoberfest-light group-hover:text-hacktoberfest-black">
5559
{contributor.name}
5660
</h2>
5761
<a
5862
href={contributor.profile}
59-
className="link text-hacktoberfest-green hover:text-hacktoberfest-pink w-fit underline-expand"
63+
className="link text-hacktoberfest-light group-hover:text-hacktoberfest-black hover:text-hacktoberfest-blue w-fit underline-expand"
6064
>
6165
{contributor.profile}
6266
</a>
6367
<div className="justify-center mt-auto card-actions">
6468
<a
65-
className="border-2 text-hacktoberfest-light btn border-hacktoberfest-pink hover:border-hacktoberfest-pink btn-outline hover:bg-hacktoberfest-pink hover:text-hacktoberfest-black"
69+
className="border-2 text-hacktoberfest-light btn border-hacktoberfest-blue group-hover:!text-white hover:-translate-y-1"
6670
href={`https://github.com/${contributor.login}`}
6771
target="_blank"
6872
rel="noreferrer"

src/app/(public)/contributors/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export default async function ContributorsPage() {
1717
return (
1818
<div>
1919
<Header />
20-
<div className="container mx-auto mb-5">
21-
<h1 className="my-5 text-5xl font-medium text-center text-neutral-100">
20+
<div className="container mx-auto mb-5 space-y-8 mt-36">
21+
<h1 className="text-4xl sm:text-5xl font-medium text-center text-neutral-100">
2222
Contributors ✨
2323
</h1>
24-
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4">
24+
<div className="grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 px-4">
2525
{contributors.map(contributor => (
2626
<ContributorCard
2727
key={contributor.login}

0 commit comments

Comments
 (0)