website refactor
This commit is contained in:
41
apps/website/lib/display-objects/SkillLevelDisplay.ts
Normal file
41
apps/website/lib/display-objects/SkillLevelDisplay.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
export class SkillLevelDisplay {
|
||||
static getLabel(skillLevel: string): string {
|
||||
const levels: Record<string, string> = {
|
||||
pro: 'Pro',
|
||||
advanced: 'Advanced',
|
||||
intermediate: 'Intermediate',
|
||||
beginner: 'Beginner',
|
||||
};
|
||||
return levels[skillLevel] || skillLevel;
|
||||
}
|
||||
|
||||
static getColor(skillLevel: string): string {
|
||||
const colors: Record<string, string> = {
|
||||
pro: 'text-yellow-400',
|
||||
advanced: 'text-purple-400',
|
||||
intermediate: 'text-primary-blue',
|
||||
beginner: 'text-green-400',
|
||||
};
|
||||
return colors[skillLevel] || 'text-gray-400';
|
||||
}
|
||||
|
||||
static getBgColor(skillLevel: string): string {
|
||||
const colors: Record<string, string> = {
|
||||
pro: 'bg-yellow-400/10',
|
||||
advanced: 'bg-purple-400/10',
|
||||
intermediate: 'bg-primary-blue/10',
|
||||
beginner: 'bg-green-400/10',
|
||||
};
|
||||
return colors[skillLevel] || 'bg-gray-400/10';
|
||||
}
|
||||
|
||||
static getBorderColor(skillLevel: string): string {
|
||||
const colors: Record<string, string> = {
|
||||
pro: 'border-yellow-400/30',
|
||||
advanced: 'border-purple-400/30',
|
||||
intermediate: 'border-primary-blue/30',
|
||||
beginner: 'border-green-400/30',
|
||||
};
|
||||
return colors[skillLevel] || 'border-gray-400/30';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user