Skip to content

Commit 170e0f5

Browse files
committed
fix(portfolio): align ProjectModal with ExperienceModal + unify react-icons on fa6
ProjectModal parity with ExperienceModal's mobile UX: - Bottom-sheet alignment on mobile (flex-end, padding 0, top-rounded only) - Slide-up-from-bottom animation (y: 100) matching ExperienceModal - 92vh mobile max height (was 88vh) for parity Cleanups in the same pass: - Swap lucide Github (deprecated brand icon) for react-icons FaGithub to match the rest of the codebase post-revert - Unify ProjectCard on react-icons/fa6 (was /fa) for visual consistency with iconMap/CodingProfiles - Collapse identical ternary on accent-bar borderRadius - Use optional chaining on hasGithub/hasLive guards
1 parent 567438d commit 170e0f5

2 files changed

Lines changed: 20 additions & 15 deletions

File tree

src/pages/portfolio/ProjectCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { motion } from "motion/react";
22
import { ExternalLink } from "lucide-react";
3-
import { FaGithub } from "react-icons/fa";
3+
import { FaGithub } from "react-icons/fa6";
44
import { scaleRotateIn } from "@utils/animations";
55
import { MONO_FONT } from "@/constants/theme";
66
import {

src/pages/portfolio/ProjectModal.tsx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { motion, AnimatePresence } from "motion/react";
44
import {
55
X,
66
ExternalLink,
7-
Github,
87
Calendar,
98
Users,
109
Star,
1110
FolderGit2,
1211
Sparkles,
1312
} from "lucide-react";
13+
import { FaGithub } from "react-icons/fa6";
1414
import useBreakpoint from "@hooks/useBreakpoint";
1515
import useFocusTrap from "@hooks/useFocusTrap";
1616
import TechTag from "@components/ui/TechTag";
@@ -61,12 +61,9 @@ const ProjectModal = ({ project, onClose }: ProjectModalProps) => {
6161
const features = project?.features ?? [];
6262
const contributors = project?.contributors ?? [];
6363
const hasGithub =
64-
project &&
65-
project.github &&
66-
project.github !== "" &&
67-
project.github !== "#";
64+
project?.github && project.github !== "" && project.github !== "#";
6865
const hasLive =
69-
project && project.live && project.live !== "" && project.live !== "#";
66+
project?.live && project.live !== "" && project.live !== "#";
7067

7168
return createPortal(
7269
<AnimatePresence>
@@ -82,9 +79,9 @@ const ProjectModal = ({ project, onClose }: ProjectModalProps) => {
8279
inset: 0,
8380
zIndex: 1000,
8481
display: "flex",
85-
alignItems: "center",
82+
alignItems: isMobile ? "flex-end" : "center",
8683
justifyContent: "center",
87-
padding: isMobile ? 16 : 20,
84+
padding: isMobile ? 0 : 20,
8885
background: "rgba(0,0,0,0.3)",
8986
backdropFilter: "blur(12px)",
9087
WebkitBackdropFilter: "blur(12px)",
@@ -93,9 +90,17 @@ const ProjectModal = ({ project, onClose }: ProjectModalProps) => {
9390
>
9491
<motion.div
9592
ref={dialogRef}
96-
initial={{ opacity: 0, y: 50, scale: 0.95 }}
93+
initial={{
94+
opacity: 0,
95+
y: isMobile ? 100 : 50,
96+
scale: 0.95,
97+
}}
9798
animate={{ opacity: 1, y: 0, scale: 1 }}
98-
exit={{ opacity: 0, y: 30, scale: 0.97 }}
99+
exit={{
100+
opacity: 0,
101+
y: isMobile ? 100 : 30,
102+
scale: 0.97,
103+
}}
99104
transition={{ duration: 0.4, ease: EASING.cinematic }}
100105
onClick={(e) => e.stopPropagation()}
101106
onWheel={(e) => e.stopPropagation()}
@@ -107,9 +112,9 @@ const ProjectModal = ({ project, onClose }: ProjectModalProps) => {
107112
position: "relative",
108113
width: "100%",
109114
maxWidth: isMobile ? "100%" : 720,
110-
maxHeight: isMobile ? "88vh" : "85vh",
115+
maxHeight: isMobile ? "92vh" : "85vh",
111116
overflowY: "auto",
112-
borderRadius: 20,
117+
borderRadius: isMobile ? "20px 20px 0 0" : 20,
113118
border: "1px solid rgba(255,255,255,0.1)",
114119
background:
115120
"linear-gradient(180deg, rgba(15,15,30,0.98) 0%, rgba(8,8,20,0.99) 100%)",
@@ -122,7 +127,7 @@ const ProjectModal = ({ project, onClose }: ProjectModalProps) => {
122127
style={{
123128
height: isFeatured ? 4 : 3,
124129
background: colors.gradient,
125-
borderRadius: isMobile ? "20px 20px 0 0" : "20px 20px 0 0",
130+
borderRadius: "20px 20px 0 0",
126131
}}
127132
/>
128133

@@ -486,7 +491,7 @@ const ProjectModal = ({ project, onClose }: ProjectModalProps) => {
486491
}}
487492
aria-label={`View ${project.title} on GitHub`}
488493
>
489-
<Github size={14} />
494+
<FaGithub size={14} />
490495
View Source
491496
</a>
492497
)}

0 commit comments

Comments
 (0)