diff --git a/app/templates/index.html b/app/templates/index.html
index 0f4f919..a6c8fba 100644
--- a/app/templates/index.html
+++ b/app/templates/index.html
@@ -1109,14 +1109,22 @@
blContainer.innerHTML = '';
}
- // Partei-Durchschnitte berechnen
+ // Partei-Durchschnitte berechnen (mit Normalisierung für AfD/AFD etc.)
+ const normalizePartei = (f) => {
+ const u = f.toUpperCase();
+ if (u === 'AFD') return 'AfD';
+ if (u === 'GRÜNE' || u === 'GRUENE' || u === 'BÜNDNIS 90/DIE GRÜNEN') return 'GRÜNE';
+ if (u === 'DIE LINKE') return 'LINKE';
+ return f;
+ };
const parteiStats = {};
allAssessments.forEach(a => {
if (a.gwoeScore == null) return;
(a.fraktionen || []).forEach(f => {
- if (!parteiStats[f]) parteiStats[f] = { sum: 0, count: 0 };
- parteiStats[f].sum += a.gwoeScore;
- parteiStats[f].count += 1;
+ const norm = normalizePartei(f);
+ if (!parteiStats[norm]) parteiStats[norm] = { sum: 0, count: 0 };
+ parteiStats[norm].sum += a.gwoeScore;
+ parteiStats[norm].count += 1;
});
});
@@ -1159,7 +1167,7 @@
${blBadge}${item.drucksache}
${scoreText}
-
${item.title || 'Ohne Titel'}
+ ${(item.title || 'Ohne Titel').length > 80 ? (item.title.substring(0, 80) + '…') : (item.title || 'Ohne Titel')}
${fraktionen} · ${item.datum || ''}
${isUnchecked ? `