Skip to content

Commit 56409a4

Browse files
committed
expressions
1 parent 305b17d commit 56409a4

File tree

4 files changed

+28
-16
lines changed

4 files changed

+28
-16
lines changed

public/expression_high.png

1.33 MB
Loading

public/expression_low.png

1.27 MB
Loading

public/expression_mid.png

1.23 MB
Loading

src/components/interactive/ReportCard.tsx

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ function prettifyStatus(raw: string) {
5959
return raw.replace(/_/g, " ");
6060
}
6161

62-
function getExpressionLevel(score: number): { level: string; color: string } {
62+
function getExpressionLevel(score: number): { level: string; color: string; imagePath: string } {
6363
if (score >= 80) {
64-
return { level: "High", color: "text-green-600" };
64+
return { level: "High", color: "text-green-600", imagePath: "/expression_high.png" };
6565
} else if (score >= 60) {
66-
return { level: "Mid", color: "text-yellow-600" };
66+
return { level: "Mid", color: "text-yellow-600", imagePath: "/expression_mid.png" };
6767
} else {
68-
return { level: "Low", color: "text-red-600" };
68+
return { level: "Low", color: "text-red-600", imagePath: "/expression_low.png" };
6969
}
7070
}
7171

@@ -393,19 +393,31 @@ export default function ReportCard() {
393393
</p>
394394
</div>
395395

396-
{/* Indexes */}
397-
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
398-
<div className="rounded-lg bg-gray-50 p-5 text-center">
399-
<h2 className="text-lg font-semibold">Role Fit Index</h2>
400-
<p className="text-3xl font-bold">{report.index}/100</p>
401-
<p className="text-xs text-gray-600 mt-2">40% Technical + 30% Domain + 20% Career + 10% Cultural</p>
402-
</div>
403-
<div className="rounded-lg bg-gray-50 p-5 text-center">
404-
<h2 className="text-lg font-semibold">Weighted Role Fit Index</h2>
405-
<p className="text-3xl font-bold">{report.weighted_index}/100</p>
406-
<p className="text-xs text-gray-600 mt-0.5">40% Technical + 30% Domain + 20% Career + 10% Cultural<br />(each score × confidence)</p>
396+
{/* Expression and Indexes */}
397+
<div className="flex gap-6">
398+
<div
399+
className="rounded-lg bg-cover bg-center bg-no-repeat p-5 text-center flex flex-col justify-center items-center flex-shrink-0"
400+
style={{
401+
backgroundImage: `url(${getExpressionLevel(report.index).imagePath})`,
402+
backgroundSize: 'cover',
403+
aspectRatio: '832 / 1248',
404+
width: '200px'
405+
}}
406+
>
407+
</div>
408+
<div className="flex flex-col gap-6 flex-1">
409+
<div className="rounded-lg bg-gray-50 p-5 text-center">
410+
<h2 className="text-lg font-semibold">Role Fit Index</h2>
411+
<p className="text-3xl font-bold">{report.index}/100</p>
412+
<p className="text-xs text-gray-600 mt-2">40% Technical + 30% Domain + 20% Career + 10% Cultural</p>
413+
</div>
414+
<div className="rounded-lg bg-gray-50 p-5 text-center">
415+
<h2 className="text-lg font-semibold">Weighted Role Fit Index</h2>
416+
<p className="text-3xl font-bold">{report.weighted_index}/100</p>
417+
<p className="text-xs text-gray-600 mt-0.5">40% Technical + 30% Domain + 20% Career + 10% Cultural<br />(each score × confidence)</p>
418+
</div>
419+
</div>
407420
</div>
408-
</div>
409421

410422
<div>
411423
<h2 className="text-lg font-semibold mb-3">Breakdown Scores</h2>

0 commit comments

Comments
 (0)