Skip to content

Commit 9f93481

Browse files
committed
fix: firefox and safari gradient fix after hyperlink
1 parent 7e2c5ad commit 9f93481

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

src/components/ProjectCard.tsx

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@ interface ProjectCardProps {
99
// Masonry Grid layout
1010
const ProjectCard: React.FC<ProjectCardProps> = ({ project, onViewSketch }) => {
1111
return (
12-
<div className="bg-clear shadow-lg rounded-lg overflow-hidden group cursor-default">
12+
<div className="bg-clear shadow-lg rounded-lg overflow-hidden group">
1313
{/* Image with Gradient */}
14-
<a
15-
href={project.githubLink}
16-
target="_blank"
17-
rel="noopener noreferrer"
18-
className="relative"
19-
>
20-
<img
21-
src={project.image}
22-
alt={project.name}
23-
className="w-full md:h-56 h-44 object-cover border-2 border-secondary rounded-lg"
24-
/>
25-
<div className="absolute inset-0 bg-gradient-to-t from-black/100 via-black/40 to-transparent transition-all duration-300 flex flex-col justify-end p-4">
14+
<div className="relative">
15+
<a href={project.githubLink} target="_blank" rel="noopener noreferrer">
16+
<img
17+
src={project.image}
18+
alt={project.name}
19+
className="w-full md:h-56 h-44 object-cover border-2 border-secondary rounded-lg"
20+
/>
21+
</a>
22+
<div className="absolute inset-0 bg-gradient-to-t from-black/100 via-black/40 to-transparent transition-all duration-300 flex flex-col justify-end p-4 pointer-events-none">
2623
<h3 className="text-lg font-bold text-primary drop-shadow-[0_1.2px_1.2px_rgba(0,0,0,0.8)]">
2724
{project.name}
2825
</h3>
@@ -33,7 +30,7 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ project, onViewSketch }) => {
3330
{project.description}
3431
</p>
3532
</div>
36-
</a>
33+
</div>
3734

3835
{/* Description and Links */}
3936
<div className="p-2">

0 commit comments

Comments
 (0)