mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-10-03 10:13:47 +10:00
feat(ui): add a self-hosted Material Symbols icon subset
Icon renders Material Symbols Rounded at weight 300 from a subset font that holds only the glyphs listed in packages/ui/src/icons/names.ts. pnpm icons:build checks every name against Google's codepoints and regenerates the font; a test keeps the manifest and the list in sync. Icons are aria-hidden and untranslated, and directional ones mirror in right-to-left layouts.
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
// Deterministic accent color for a company's initials tile, shared by the board card and the
|
||||
// table row so the same company reads the same everywhere.
|
||||
const TILE_COLORS = [
|
||||
"bg-rose-500",
|
||||
"bg-orange-500",
|
||||
"bg-amber-500",
|
||||
"bg-emerald-500",
|
||||
"bg-teal-500",
|
||||
"bg-sky-500",
|
||||
"bg-indigo-500",
|
||||
"bg-violet-500",
|
||||
"bg-fuchsia-500",
|
||||
];
|
||||
|
||||
export function tileColor(seed: string) {
|
||||
let hash = 0;
|
||||
for (let i = 0; i < seed.length; i++) hash = (hash * 31 + seed.charCodeAt(i)) | 0;
|
||||
return TILE_COLORS[Math.abs(hash) % TILE_COLORS.length];
|
||||
}
|
||||
Reference in New Issue
Block a user