Skip to content

Commit fba1893

Browse files
committed
cv button
1 parent 58f8b16 commit fba1893

3 files changed

Lines changed: 57 additions & 21 deletions

File tree

src/data/work.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const WorkData = [
66
{
77
title: "Mechanical Engineer",
88
company: "EPFL Rocket Team",
9-
years: "2022 - 2023",
9+
years: "2021 - 2024",
1010
// Use dark mode logo by default; light mode logo can be handled in the component
1111
logo: rocketTeamLightLogo,
1212
// alternative
@@ -21,7 +21,7 @@ export const WorkData = [
2121
{
2222
title: "Teaching Assistant",
2323
company: "École polytechnique fédérale de Lausanne",
24-
years: "2022 - 2025",
24+
years: "2022 - 2024",
2525
logo: epflLogo,
2626
},
2727
];

src/pages/about/sections/introduction.tsx

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { FaRegEnvelope } from "react-icons/fa6";
22
import { toast } from "sonner";
33

4+
import { Button } from "@/components/ui/button";
45
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
56
import { UserInfo } from "@/data/profile";
67

@@ -14,6 +15,15 @@ export default function Introduction() {
1415
}
1516

1617
function Profile() {
18+
const isResumeLink = (label: string) => {
19+
const normalized = label.toLowerCase();
20+
return (
21+
normalized.includes("résumé") ||
22+
normalized.includes("resume") ||
23+
normalized.includes("cv")
24+
);
25+
};
26+
1727
return (
1828
<div className="flex flex-col items-center gap-y-4 shrink-0">
1929
<img
@@ -27,27 +37,52 @@ function Profile() {
2737
<EmailCopy email={UserInfo.email} />
2838
<TooltipProvider delayDuration={100}>
2939
<div className="flex flex-row flex-wrap justify-center gap-y-2 gap-x-4 py-2 text-foreground max-w-64">
30-
{UserInfo.links.map((item, index) => (
31-
<a
32-
key={index}
33-
href={item.url}
34-
target="_blank"
35-
rel="noopener noreferrer"
36-
className="shrink-0"
37-
>
38-
<Tooltip>
39-
<TooltipTrigger>
40-
<item.icon
41-
className="w-8 h-8 cursor-pointer opacity-80 hover:opacity-100 transition-opacity duration-50"
42-
aria-label={item.name}
43-
/>
40+
{UserInfo.links.map((item) =>
41+
isResumeLink(item.name) ? (
42+
<Tooltip key={item.name}>
43+
<TooltipTrigger asChild>
44+
<Button
45+
asChild
46+
size="sm"
47+
className="rounded-full border-2 border-foreground/20 bg-foreground/65 px-2 text-background hover:bg-foreground/55 hover:text-background dark:border-foreground/40 dark:bg-foreground/85 dark:text-background dark:hover:bg-foreground"
48+
>
49+
<a
50+
href={item.url}
51+
target="_blank"
52+
rel="noopener noreferrer"
53+
>
54+
<b className="font-['Roboto_Condensed',_Arial_Narrow,_Arial,_sans-serif] text-lg font-bold leading-none tracking-tight">
55+
CV
56+
</b>
57+
</a>
58+
</Button>
4459
</TooltipTrigger>
4560
<TooltipContent side="bottom">
46-
<p>{item.name}</p>
61+
<p>Resumé</p>
4762
</TooltipContent>
4863
</Tooltip>
49-
</a>
50-
))}
64+
) : (
65+
<a
66+
key={item.name}
67+
href={item.url}
68+
target="_blank"
69+
rel="noopener noreferrer"
70+
className="shrink-0"
71+
>
72+
<Tooltip>
73+
<TooltipTrigger>
74+
<item.icon
75+
className="w-8 h-8 cursor-pointer opacity-80 hover:opacity-100 transition-opacity duration-50"
76+
aria-label={item.name}
77+
/>
78+
</TooltipTrigger>
79+
<TooltipContent side="bottom">
80+
<p>{item.name}</p>
81+
</TooltipContent>
82+
</Tooltip>
83+
</a>
84+
)
85+
)}
5186
</div>
5287
</TooltipProvider>
5388
</div>
@@ -61,7 +96,7 @@ function Biography() {
6196
<div className="text-2xl font-semibold mb-2">About Me</div>
6297
{UserInfo.biography ? (
6398
<div
64-
className="prose dark:prose-invert text-justify text-base/6"
99+
className="prose dark:prose-invert text-justify text-lg/7"
65100
dangerouslySetInnerHTML={{ __html: UserInfo.biography }}
66101
aria-label="User biography"
67102
/>

src/styles/index.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&display=swap");
12
@import "tailwindcss";
23
@import "tw-animate-css";
34

@@ -123,4 +124,4 @@
123124
body {
124125
@apply bg-background text-foreground;
125126
}
126-
}
127+
}

0 commit comments

Comments
 (0)