Skip to content

Commit 12a5cf2

Browse files
committed
fix: aggiorna i colori delle categorie nel generatore di immagini Open Graph
1 parent 52570c4 commit 12a5cf2

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/lib/og-image-generator.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ function wrapText(text: string, maxWidth: number, fontSize: number): string[] {
6666
// Funzione per generare il colore basato sulla categoria
6767
function getCategoryColor(category: string): string {
6868
const colors: Record<string, string> = {
69-
'AMBIENTE': '#10b981', // emerald-500
70-
'SALUTE': '#ef4444', // red-500
71-
'ECONOMIA': '#f59e0b', // amber-500
72-
'DIRITTI': '#8b5cf6', // violet-500
73-
'GIUSTIZIA': '#6366f1', // indigo-500
74-
'SOCIALE': '#ec4899', // pink-500
75-
'LAVORO': '#14b8a6', // teal-500
76-
'TRASPORTI': '#84cc16', // lime-500
69+
'AMBIENTE': '#10b981', // verde
70+
'DIRITTO': '#8b5cf6', // viola
71+
'ENERGIA': '#f59e0b', // ambra
72+
'ISTRUZIONE E COMUNICAZIONE': '#6366f1', // indaco
73+
'OCCUPAZIONE E LAVORO': '#14b8a6', // teal
74+
'QUESTIONI SOCIALI': '#ec4899', // rosa
75+
'TRASPORTO': '#84cc16', // lime
76+
'UNIONE EUROPEA': '#3b82f6', // blu
77+
'VITA POLITICA': '#ef4444', // rosso
7778
};
7879

7980
return colors[category.toUpperCase()] || '#3b82f6'; // default blue-500

0 commit comments

Comments
 (0)