/** * Language to Iconify icon mapping * Uses simple-icons set via Iconify API * Format: https://api.iconify.design/simple-icons/{slug}.svg */ export const LANGUAGE_ICONS: Record = { // Web javascript: 'javascript', js: 'javascript', typescript: 'typescript', ts: 'typescript', html: 'html5', css: 'css3', scss: 'sass', sass: 'sass', less: 'less', // Frontend frameworks react: 'react', jsx: 'react', tsx: 'react', vue: 'vuedotjs', svelte: 'svelte', angular: 'angular', astro: 'astro', // Backend python: 'python', py: 'python', go: 'go', golang: 'go', rust: 'rust', java: 'openjdk', kotlin: 'kotlin', scala: 'scala', ruby: 'ruby', rb: 'ruby', php: 'php', csharp: 'csharp', cs: 'csharp', cpp: 'cplusplus', c: 'c', swift: 'swift', // Data & config json: 'json', yaml: 'yaml', yml: 'yaml', toml: 'toml', xml: 'xml', // Shell & scripting bash: 'gnubash', sh: 'gnubash', shell: 'gnubash', zsh: 'gnubash', powershell: 'powershell', ps1: 'powershell', // Database sql: 'postgresql', mysql: 'mysql', postgres: 'postgresql', postgresql: 'postgresql', mongodb: 'mongodb', redis: 'redis', // Other graphql: 'graphql', gql: 'graphql', docker: 'docker', dockerfile: 'docker', markdown: 'markdown', md: 'markdown', lua: 'lua', elixir: 'elixir', erlang: 'erlang', haskell: 'haskell', clojure: 'clojure', zig: 'zig', nim: 'nim', r: 'r', julia: 'julia', dart: 'dart', flutter: 'flutter', solidity: 'solidity', terraform: 'terraform', nginx: 'nginx', apache: 'apache', } /** * Get Iconify API URL for a language */ export function getLanguageIconUrl(language: string): string | null { const slug = LANGUAGE_ICONS[language.toLowerCase()] if (!slug) return null return `https://api.iconify.design/simple-icons/${slug}.svg?color=%2371717a` } /** * Get display name for a language */ export function getLanguageDisplayName(language: string): string { const displayNames: Record = { javascript: 'JavaScript', typescript: 'TypeScript', python: 'Python', go: 'Go', rust: 'Rust', java: 'Java', kotlin: 'Kotlin', ruby: 'Ruby', php: 'PHP', csharp: 'C#', cpp: 'C++', c: 'C', swift: 'Swift', html: 'HTML', css: 'CSS', scss: 'SCSS', json: 'JSON', yaml: 'YAML', bash: 'Bash', sql: 'SQL', graphql: 'GraphQL', markdown: 'Markdown', docker: 'Docker', jsx: 'JSX', tsx: 'TSX', vue: 'Vue', svelte: 'Svelte', } return displayNames[language.toLowerCase()] || language } /** * All supported languages for the language selector */ export const SUPPORTED_LANGUAGES = [ 'javascript', 'typescript', 'python', 'go', 'rust', 'java', 'kotlin', 'ruby', 'php', 'csharp', 'cpp', 'c', 'swift', 'html', 'css', 'scss', 'json', 'yaml', 'bash', 'sql', 'graphql', 'markdown', 'docker', 'jsx', 'tsx', 'vue', 'svelte', 'lua', 'elixir', 'haskell', 'dart', 'terraform', ] as const