Skip to content

Commit cd23da0

Browse files
Add language logo chips to the Languages skills row
Parse language names from the protected skill fact and render each as a soft chip with a Simple Icons logo. GDScript uses the Godot icon. Styles target .locked-resume-language-* classes with attribution id gus-h-language-logos. Co-authored-by: parse-nip <parse-nip@users.noreply.github.com>
1 parent 03a13cb commit cd23da0

2 files changed

Lines changed: 111 additions & 5 deletions

File tree

src/app/globals.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,48 @@
10091009
color: inherit;
10101010
}
10111011

1012+
#locked-resume .locked-resume-skill-languages {
1013+
list-style: none;
1014+
display: flex;
1015+
flex-direction: column;
1016+
gap: 0.625rem;
1017+
margin-bottom: 0.75rem;
1018+
}
1019+
1020+
#locked-resume .locked-resume-skill-languages-label {
1021+
font-weight: 500;
1022+
color: var(--color-text-primary, #111111);
1023+
}
1024+
1025+
#locked-resume .locked-resume-language-list {
1026+
display: flex;
1027+
flex-wrap: wrap;
1028+
gap: 0.5rem;
1029+
list-style: none;
1030+
padding: 0;
1031+
margin: 0;
1032+
}
1033+
1034+
#locked-resume .locked-resume-language-chip {
1035+
display: inline-flex;
1036+
align-items: center;
1037+
gap: 0.4rem;
1038+
list-style: none;
1039+
padding: 0.35rem 0.65rem;
1040+
border-radius: var(--radius-sm, 10px);
1041+
background: var(--color-surface-soft, #f6f6f5);
1042+
border: 1px solid var(--color-border, #e8e8e6);
1043+
font-size: 0.875rem;
1044+
line-height: 1.4;
1045+
}
1046+
1047+
#locked-resume .locked-resume-language-icon {
1048+
width: 18px;
1049+
height: 18px;
1050+
flex-shrink: 0;
1051+
object-fit: contain;
1052+
}
1053+
10121054
.design-select-overlay {
10131055
pointer-events: none;
10141056
position: fixed;

src/components/locked/LockedResume.tsx

Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
import { getExperience } from "@/lib/experience";
22

3+
/** Presentation-only map from fact language names to Simple Icons slugs. */
4+
const LANGUAGE_ICON_SLUGS: Record<string, string> = {
5+
typescript: "typescript",
6+
javascript: "javascript",
7+
rust: "rust",
8+
python: "python",
9+
gdscript: "godotengine",
10+
crystal: "crystal",
11+
};
12+
13+
function parseLanguagesSkill(skill: string): string[] | null {
14+
const match = skill.match(/^Languages:\s*(.+)$/);
15+
if (!match) return null;
16+
return match[1].split(",").map((name) => name.trim());
17+
}
18+
19+
function languageIconUrl(name: string): string | null {
20+
const slug = LANGUAGE_ICON_SLUGS[name.toLowerCase()];
21+
return slug ? `https://cdn.simpleicons.org/${slug}` : null;
22+
}
23+
324
/**
425
* Renders owner facts from locked JSON. Community contributors may restyle
526
* this component and target #locked-resume in CSS — but must not change
@@ -77,11 +98,54 @@ export function LockedResume() {
7798
<section id="skills" className="locked-resume-skills">
7899
<h2>Skills</h2>
79100
<ul>
80-
{data.skills.map((skill, i) => (
81-
<li key={i} data-fact-id={`skill-${i}`}>
82-
{skill}
83-
</li>
84-
))}
101+
{data.skills.map((skill, i) => {
102+
const languages = parseLanguagesSkill(skill);
103+
104+
if (languages) {
105+
return (
106+
<li
107+
key={i}
108+
data-fact-id={`skill-${i}`}
109+
className="locked-resume-skill-languages"
110+
data-contribution-id="gus-h-language-logos"
111+
>
112+
<span className="locked-resume-skill-languages-label">
113+
Languages:
114+
</span>
115+
<ul className="locked-resume-language-list">
116+
{languages.map((language) => {
117+
const iconUrl = languageIconUrl(language);
118+
119+
return (
120+
<li
121+
key={language}
122+
className="locked-resume-language-chip"
123+
>
124+
{iconUrl ? (
125+
<img
126+
className="locked-resume-language-icon"
127+
src={iconUrl}
128+
alt=""
129+
width={18}
130+
height={18}
131+
loading="lazy"
132+
/>
133+
) : null}
134+
<span>{language}</span>
135+
</li>
136+
);
137+
})}
138+
</ul>
139+
</li>
140+
);
141+
}
142+
143+
return (
144+
<li key={i} data-fact-id={`skill-${i}`}>
145+
{skill}
146+
</li>
147+
);
148+
})}
85149
</ul>
86150
</section>
87151

0 commit comments

Comments
 (0)