Skip to content

Commit a424aaa

Browse files
Gamedirectionclaude
andcommitted
Exclude junk repos, show real language icons on project cards
Drop gimp-kink and test from the fetched repo list, and swap the plain colored dot for the actual language logo (reusing the tech stack icon set) on each project card where one exists. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent b2e4d6d commit a424aaa

2 files changed

Lines changed: 41 additions & 7 deletions

File tree

src/components/ProjectCard.tsx

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
import { motion } from 'framer-motion'
22
import type { Repo } from '../lib/github'
3+
import typescriptIcon from '../assets/logos/tech/typescript.svg'
4+
import javascriptIcon from '../assets/logos/tech/javascript.svg'
5+
import pythonIcon from '../assets/logos/tech/python.svg'
6+
import csharpIcon from '../assets/logos/tech/csharp.svg'
7+
import html5Icon from '../assets/logos/tech/html5.svg'
8+
import css3Icon from '../assets/logos/tech/css3.svg'
9+
import goIcon from '../assets/logos/tech/go.svg'
10+
import bashIcon from '../assets/logos/tech/bash.svg'
11+
import cIcon from '../assets/logos/tech/c.svg'
12+
import rustIcon from '../assets/logos/tech/rust.svg'
13+
14+
const LANGUAGE_ICONS: Record<string, string> = {
15+
TypeScript: typescriptIcon,
16+
JavaScript: javascriptIcon,
17+
Python: pythonIcon,
18+
'C#': csharpIcon,
19+
HTML: html5Icon,
20+
CSS: css3Icon,
21+
Go: goIcon,
22+
Shell: bashIcon,
23+
C: cIcon,
24+
Rust: rustIcon,
25+
}
326

427
const LANGUAGE_COLORS: Record<string, string> = {
528
TypeScript: '#3178c6',
@@ -9,11 +32,13 @@ const LANGUAGE_COLORS: Record<string, string> = {
932
HTML: '#e34c26',
1033
CSS: '#563d7c',
1134
Go: '#00ADD8',
12-
Java: '#b07219',
1335
Shell: '#89e051',
36+
C: '#555555',
37+
Rust: '#dea584',
1438
}
1539

1640
export function ProjectCard({ repo, index }: { repo: Repo; index: number }) {
41+
const languageIcon = repo.language ? LANGUAGE_ICONS[repo.language] : undefined
1742
const languageColor = repo.language
1843
? (LANGUAGE_COLORS[repo.language] ?? '#8b8b93')
1944
: null
@@ -53,11 +78,15 @@ export function ProjectCard({ repo, index }: { repo: Repo; index: number }) {
5378
<div className="mt-4 flex items-center justify-between text-xs text-[var(--color-text-muted)]">
5479
{repo.language ? (
5580
<span className="flex items-center gap-1.5">
56-
<span
57-
aria-hidden="true"
58-
className="h-2.5 w-2.5 rounded-full"
59-
style={{ background: languageColor ?? undefined }}
60-
/>
81+
{languageIcon ? (
82+
<img src={languageIcon} alt="" className="h-3.5 w-3.5" />
83+
) : (
84+
<span
85+
aria-hidden="true"
86+
className="h-2.5 w-2.5 rounded-full"
87+
style={{ background: languageColor ?? undefined }}
88+
/>
89+
)}
6190
{repo.language}
6291
</span>
6392
) : (

src/lib/github.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const GITHUB_USERNAME = 'Gamedirection'
1616
// Forks worth showing despite the fork filter below (real contribution work).
1717
const PINNED_FORKS = new Set(['AffinityOnLinux'])
1818

19+
// Repos not worth showing on the portfolio (junk/test repos).
20+
const EXCLUDED_REPOS = new Set(['gimp-kink', 'test'])
21+
1922
export async function fetchRepos(): Promise<Repo[]> {
2023
const response = await fetch(
2124
`https://api.github.com/users/${GITHUB_USERNAME}/repos?per_page=100&sort=updated`,
@@ -31,7 +34,9 @@ export async function fetchRepos(): Promise<Repo[]> {
3134
return repos
3235
.filter(
3336
(repo) =>
34-
(!repo.fork || PINNED_FORKS.has(repo.name)) && !repo.archived,
37+
(!repo.fork || PINNED_FORKS.has(repo.name)) &&
38+
!repo.archived &&
39+
!EXCLUDED_REPOS.has(repo.name),
3540
)
3641
.sort(
3742
(a, b) =>

0 commit comments

Comments
 (0)