Skip to content

Commit 1247c7a

Browse files
fix(ui): restore Persona styling for modal close/profile
Ensure the homepage profile image container has deterministic dimensions and align the project modal close button with Persona-style p6 button treatment. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent f5962ae commit 1247c7a

2 files changed

Lines changed: 37 additions & 29 deletions

File tree

portfolio/src/app/page.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,17 @@ export default function Home() {
360360
>
361361
<motion.div
362362
layoutId="profile-image"
363+
style={{
364+
width: responsiveStyles.showPortrait ? responsiveStyles.portraitSize.w : responsiveStyles.squareSize,
365+
height: responsiveStyles.showPortrait ? responsiveStyles.portraitSize.h : responsiveStyles.squareSize,
366+
skewX: -2,
367+
}}
363368
animate={{
364369
width: responsiveStyles.showPortrait ? responsiveStyles.portraitSize.w : responsiveStyles.squareSize,
365370
height: responsiveStyles.showPortrait ? responsiveStyles.portraitSize.h : responsiveStyles.squareSize,
366371
skewX: -2,
367372
}}
368-
initial={{ skewX: -2 }}
373+
initial={false}
369374
transition={springTransition}
370375
className="relative border-4 border-base09 bg-base01 shadow-[12px_12px_0px_var(--base08)] overflow-hidden will-change-transform"
371376
>

portfolio/src/components/ProjectModal.tsx

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -585,34 +585,37 @@ export default function ProjectModal({
585585
aria-hidden
586586
/>
587587

588-
{/* Close button - matches Contact / Resume modal style */}
589-
<div className="absolute top-2 right-3 sm:top-3 sm:right-4 z-30 flex flex-col items-center group/close">
590-
<button
591-
ref={closeButtonRef}
592-
onClick={onClose}
593-
onMouseEnter={() => {
594-
if (!bp.hasFinePointer) return;
595-
showCloseHint();
596-
}}
597-
onMouseLeave={() => {
598-
if (!bp.hasFinePointer) return;
599-
setIsCloseHintVisible(false);
600-
}}
601-
onFocus={() => {
602-
if (!bp.hasKeyboard) return;
603-
showCloseHint();
604-
}}
605-
onBlur={() => setIsCloseHintVisible(false)}
606-
className="p-2 bg-base00 bg-opacity-80 hover:bg-opacity-100 rounded-full text-base05 transition-all duration-200 shadow-sm touch-manipulation"
607-
style={{
608-
filter: 'drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3))'
609-
}}
610-
aria-label="Dismiss modal"
611-
>
612-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={2} stroke="currentColor" className="w-5 h-5">
613-
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
614-
</svg>
615-
</button>
588+
{/* Close button - Persona 5 style */}
589+
<div className="absolute top-2 right-3 sm:top-3 sm:right-4 z-30">
590+
<div className="relative group/close">
591+
<div
592+
className="absolute inset-0 -skew-x-12 translate-x-1.5 translate-y-1.5 opacity-70 transition-transform pointer-fine:group-hover/close:translate-x-2 pointer-fine:group-hover/close:translate-y-2"
593+
style={{ backgroundColor: eraColor }}
594+
/>
595+
<button
596+
ref={closeButtonRef}
597+
onClick={onClose}
598+
onMouseEnter={() => {
599+
if (!bp.hasFinePointer) return;
600+
showCloseHint();
601+
}}
602+
onMouseLeave={() => {
603+
if (!bp.hasFinePointer) return;
604+
setIsCloseHintVisible(false);
605+
}}
606+
onFocus={() => {
607+
if (!bp.hasKeyboard) return;
608+
showCloseHint();
609+
}}
610+
onBlur={() => setIsCloseHintVisible(false)}
611+
className="relative p6-button p-2 bg-base00 text-base05 border-2 border-base05 flex items-center justify-center touch-manipulation"
612+
aria-label="Dismiss modal"
613+
>
614+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={3} stroke="currentColor" className="w-5 h-5 skew-x-12">
615+
<path strokeLinecap="round" strokeLinejoin="round" d="M6 18L18 6M6 6l12 12" />
616+
</svg>
617+
</button>
618+
</div>
616619
</div>
617620
{bp.hasKeyboard && isCloseHintVisible && (
618621
<div

0 commit comments

Comments
 (0)