diff --git a/src/components/layout/avatar.tsx b/src/components/layout/avatar.tsx index 8c2769e..7169598 100644 --- a/src/components/layout/avatar.tsx +++ b/src/components/layout/avatar.tsx @@ -6,6 +6,7 @@ type AvatarProps = { alt: string; size?: number; unoptimized?: boolean; + priority?: boolean; className?: string; }; @@ -13,7 +14,14 @@ type AvatarProps = { * Reusable avatar image component. * */ -export function Avatar({ src, alt, size = 32, unoptimized = true, className }: AvatarProps) { +export function Avatar({ + src, + alt, + size = 32, + unoptimized = true, + priority = false, + className, +}: AvatarProps) { return ( ); diff --git a/src/features/comparison/components/result-dashboard.tsx b/src/features/comparison/components/result-dashboard.tsx index e29ca18..85eaa3d 100644 --- a/src/features/comparison/components/result-dashboard.tsx +++ b/src/features/comparison/components/result-dashboard.tsx @@ -366,20 +366,45 @@ export function ResultDashboard({ return (
- -
+ +
{overallWinnerUser ? ( <> -
-
- +
+ {/* Winner Avatar with Corner Trophy Badge */} +
+ + + +
+ +
-
-

{t("banner.winner")}

-
+ +
+

+ {t("banner.winner")} +

+
{getDisplayName(overallWinnerUser)} @@ -387,26 +412,47 @@ export function ResultDashboard({ href={getGithubProfileUrl(overallWinnerUser.username)} target="_blank" rel="noopener noreferrer" - className="inline-flex items-center text-muted-foreground transition-colors hover:text-foreground" + className="inline-flex shrink-0 items-center text-muted-foreground transition-colors hover:text-foreground" aria-label={t("a11y.openProfile", { name: getDisplayName(overallWinnerUser), })} > - + + + @{overallWinnerUser.username} + +
+ + {/* Compact Lead Pill on Mobile */} +
+ + {t("banner.leadby")}: + {winnerLeadValue} +
-
-

{t("banner.leadby")}

-

{winnerLeadValue}

+ + {/* Bold Stat Block on Desktop */} +
+

+ {t("banner.leadby")} +

+

{winnerLeadValue}

) : ( - <> -

{t("banner.metric")}

-

{t("banner.tie")}

- +
+
+

+ {t("banner.metric")} +

+

+ {t("banner.tie")} +

+
+
)}
{scoreVersion ? ( @@ -488,28 +534,28 @@ export function ResultDashboard({ ) : null} -
+
@@ -517,18 +563,18 @@ export function ResultDashboard({ variant="secondary" size="sm" onClick={handleCopy} - className="flex items-center gap-2" + className="flex w-full items-center justify-center gap-1.5 px-2 text-xs sm:w-auto sm:px-3 sm:text-sm" aria-label={t("results.copyAria")} > {copied ? ( <> - - {t("results.copied")} + + {t("results.copied")} ) : ( <> - - {t("results.copy")} + + {t("results.copy")} )} @@ -536,18 +582,18 @@ export function ResultDashboard({ variant="secondary" size="sm" onClick={handleCopyMarkdown} - className="flex items-center gap-2" + className="flex w-full items-center justify-center gap-1.5 px-2 text-xs sm:w-auto sm:px-3 sm:text-sm" aria-label={t("results.copyMarkdownAria")} > {markdownCopied ? ( <> - - {t("results.copied")} + + {t("results.copied")} ) : ( <> - - {t("results.copyMarkdown")} + + {t("results.copyMarkdown")} )} diff --git a/src/features/developer/components/user-profile-client.tsx b/src/features/developer/components/user-profile-client.tsx index 5757710..b10eeac 100644 --- a/src/features/developer/components/user-profile-client.tsx +++ b/src/features/developer/components/user-profile-client.tsx @@ -232,18 +232,49 @@ export function UserProfileClient({ user, location, countryParam }: Props) { {/* ── Header Profile Hero Section ────────────────────────────── */}
-
- +
+ {/* Interactive Avatar with Ambient Glow & Floating Score Badge */} + + {/* Ambient Glow */} +
diff --git a/src/features/developer/components/user-profile-skeleton.tsx b/src/features/developer/components/user-profile-skeleton.tsx index fe00123..ee62300 100644 --- a/src/features/developer/components/user-profile-skeleton.tsx +++ b/src/features/developer/components/user-profile-skeleton.tsx @@ -8,17 +8,20 @@ export function UserProfileSkeleton() {
-
- -
+
+ +
-
- - +
+ +
+ + +