Skip to content

Commit 8a5f592

Browse files
committed
fix: update project card layout and styling for better visibility and organization
1 parent 62c618d commit 8a5f592

File tree

1 file changed

+18
-30
lines changed

1 file changed

+18
-30
lines changed

src/components/sections/Projects.tsx

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ export default function Projects() {
105105
>
106106
{/* Featured Badge */}
107107
{project.featured && (
108-
<div className="absolute top-4 right-4 z-10">
109-
<div className="bg-gradient-primary text-white px-3 py-1 rounded-full text-xs font-medium shadow-lg">
110-
Featured
108+
<div className="absolute top-0 left-0 z-10">
109+
<div className="bg-gradient-primary text-white px-3 py-1 rounded-br-lg text-xs font-medium shadow-lg">
110+
Featured
111111
</div>
112112
</div>
113113
)}
@@ -121,36 +121,24 @@ export default function Projects() {
121121
: ''
122122
)}
123123
>
124-
<div className="flex items-start justify-between mb-3">
125-
<div className="flex items-center space-x-3">
126-
<div
124+
<div className="flex items-start justify-between pt-4 mb-3">
125+
<div>
126+
<h3 className="text-lg font-heading font-bold text-l-text-1 dark:text-d-text-1">
127+
{project.title}
128+
</h3>
129+
<span
127130
className={cn(
128-
'w-10 h-10 rounded-lg flex items-center justify-center text-white font-bold',
129-
project.featured
130-
? 'bg-gradient-primary shadow-lg'
131-
: 'bg-gradient-primary'
131+
'inline-block px-2 py-1 rounded-full text-xs font-medium mt-1',
132+
project.category === 'frontend' &&
133+
'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300',
134+
project.category === 'backend' &&
135+
'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300',
136+
project.category === 'fullstack' &&
137+
'bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300'
132138
)}
133139
>
134-
{project.title.charAt(0)}
135-
</div>
136-
<div>
137-
<h3 className="text-lg font-heading font-bold text-l-text-1 dark:text-d-text-1">
138-
{project.title}
139-
</h3>
140-
<span
141-
className={cn(
142-
'inline-block px-2 py-1 rounded-full text-xs font-medium mt-1',
143-
project.category === 'frontend' &&
144-
'bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300',
145-
project.category === 'backend' &&
146-
'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300',
147-
project.category === 'fullstack' &&
148-
'bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300'
149-
)}
150-
>
151-
{project.category}
152-
</span>
153-
</div>
140+
{project.category}
141+
</span>
154142
</div>
155143

156144
{/* Action Links */}

0 commit comments

Comments
 (0)