feat: importance in db and mentorcard home colors
This commit is contained in:
@@ -1,61 +1,36 @@
|
||||
// Couleurs officielle des technologies
|
||||
export const TECH_COLORS: Record<
|
||||
// Couleurs basées sur l'importance des skills
|
||||
export const IMPORTANCE_COLORS: Record<
|
||||
string,
|
||||
{ bg: string; text: string; border: string }
|
||||
> = {
|
||||
react: {
|
||||
bg: "bg-blue-500/10",
|
||||
text: "text-blue-600 dark:text-blue-400",
|
||||
border: "border-blue-500/20",
|
||||
incontournable: {
|
||||
bg: "bg-red-500/20",
|
||||
text: "text-red-400 dark:text-red-300",
|
||||
border: "border-red-500/30",
|
||||
},
|
||||
vue: {
|
||||
bg: "bg-green-500/10",
|
||||
text: "text-green-600 dark:text-green-400",
|
||||
border: "border-green-500/20",
|
||||
majeure: {
|
||||
bg: "bg-blue-500/20",
|
||||
text: "text-blue-400 dark:text-blue-300",
|
||||
border: "border-blue-500/30",
|
||||
},
|
||||
typescript: {
|
||||
bg: "bg-blue-500/10",
|
||||
text: "text-blue-600 dark:text-blue-400",
|
||||
border: "border-blue-500/20",
|
||||
},
|
||||
nextjs: {
|
||||
bg: "bg-gray-500/10",
|
||||
text: "text-gray-900 dark:text-gray-100",
|
||||
border: "border-gray-500/20",
|
||||
},
|
||||
nodejs: {
|
||||
bg: "bg-green-500/10",
|
||||
text: "text-green-600 dark:text-green-400",
|
||||
border: "border-green-500/20",
|
||||
},
|
||||
python: {
|
||||
bg: "bg-yellow-500/10",
|
||||
text: "text-yellow-600 dark:text-yellow-400",
|
||||
border: "border-yellow-500/20",
|
||||
},
|
||||
docker: {
|
||||
bg: "bg-blue-500/10",
|
||||
text: "text-blue-600 dark:text-blue-400",
|
||||
border: "border-blue-500/20",
|
||||
},
|
||||
kubernetes: {
|
||||
bg: "bg-indigo-500/10",
|
||||
text: "text-indigo-600 dark:text-indigo-400",
|
||||
border: "border-indigo-500/20",
|
||||
},
|
||||
aws: {
|
||||
bg: "bg-orange-500/10",
|
||||
text: "text-orange-600 dark:text-orange-400",
|
||||
border: "border-orange-500/20",
|
||||
},
|
||||
// Couleur par défaut
|
||||
default: {
|
||||
bg: "bg-muted",
|
||||
text: "text-foreground",
|
||||
border: "border-muted",
|
||||
standard: {
|
||||
bg: "bg-slate-500/20",
|
||||
text: "text-slate-400 dark:text-slate-300",
|
||||
border: "border-slate-500/30",
|
||||
},
|
||||
};
|
||||
|
||||
export function getTechColors(techId: string) {
|
||||
return TECH_COLORS[techId] || TECH_COLORS.default;
|
||||
// Fonction principale pour récupérer les couleurs basées sur l'importance
|
||||
export function getImportanceColors(importance: string) {
|
||||
return IMPORTANCE_COLORS[importance] || IMPORTANCE_COLORS.standard;
|
||||
}
|
||||
|
||||
// Fonction legacy pour la compatibilité (utilise seulement l'importance)
|
||||
export function getTechColors(importance: string) {
|
||||
return getImportanceColors(importance);
|
||||
}
|
||||
|
||||
// Fonction pour obtenir les couleurs d'importance uniquement
|
||||
export function getSmartColors(importance: string) {
|
||||
return getImportanceColors(importance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user