This commit is contained in:
torsten 2026-10-18 23:16:07 +02:00
parent 50cd802d33
commit 317f0bce1a
224 changed files with 1105 additions and 27 deletions

View file

@ -60,6 +60,40 @@ docker compose exec app php import.php
Sobald das Skript durchgelaufen ist, sind die sauberen Daten im System und du kannst die Anwendung auf Port 8080 testen.
## Mannschaften & Vereinslogos
In der Rangliste, der Tippübersicht und bei der Tippeingabe werden neben den Mannschaftsnamen Vereinslogos bzw. Länderflaggen angezeigt. Da die Mannschaftsnamen in `games` Freitext sind, werden sie über eine kuratierte Zuordnung eindeutig auf eine kanonische Mannschaft abgebildet.
### Wie die Zuordnung funktioniert
- Tabelle `teams`: kanonische Mannschaften mit `key`, `type` (`club`/`national`), Anzeigename und Logo-Pfad.
- Tabelle `team_aliases`: normalisierte Namensvarianten (Aliase), inklusive historischer Schreibfehler, die auf eine `teams`-Zeile verweisen.
- `games.team1_id` / `games.team2_id`: verweisen auf die zugeordnete Mannschaft.
- Das Zuordnen übernimmt `App\Models\Team` (Normalisierung + Alias-Lookup).
- Logos liegen unter `public/img/teams/<key>.png`, Flaggen unter `public/img/flags/<code>.png`.
Die kuratierte Liste (`tools/seed_teams.php`) wird bei jedem Import automatisch aufgebaut — `import.php` ruft `seed_teams()` am Ende auf — und ordnet dabei die Spiele der aktiven Saison zu. Ein Logo/Flagge ohne passende Datei wird einfach nicht angezeigt (kein kaputtes Bild).
### Neue Mannschaften ergänzen
Wenn eine neue Mannschaft auftaucht (z. B. in einer neuen Saison), Mapping und Bild einmalig ergänzen:
1. **Mannschaft eintragen** in `tools/seed_teams.php`:
- Verein → in `$clubs` einen Eintrag `[key, name, [aliase, …]]` ergänzen.
- Nationalteam → in `$national` einen Eintrag `[key, name, [aliase, …], flagCode]` ergänzen.
2. **Bildquelle hinterlegen** in `tools/fetch_logos.py`:
- Verein → in `CLUBS` den Eintrag `"key": "Englischer Wikipedia-Artikeltitel"` ergänzen.
- Nationalteam → den ISO-Ländercode in `FLAGS` ergänzen (UK-Teile: `gb-eng`, `gb-sct`, `gb-wls`, `gb-nir`).
3. **Ausführen** (aus dem `tools/`-Verzeichnis):
```bash
docker compose exec app php seed_teams.php
python3 fetch_logos.py
```
Der nächste `import_from_dump.sh`-Lauf übernimmt das Mapping automatisch. Für das Testsystem müssen die neuen Logo-Dateien einmalig hochgeladen werden (voller `deploy_test.py`-Lauf ohne `--db-only`); die Datenbank-Spalten werden über den DB-Dump mitgesynct.
> Hinweis: Vereinslogos sind Markenzeichen der Vereine — für die private Freundes-App in Ordnung, aber nicht zur Weiterverbreitung bestimmt. Länderflaggen sind gemeinfrei.
## Deployment auf das Testsystem
Das Skript `deploy_test.py` lädt das Projekt per FTP nach `tippspiel.programmschmiede.de` hoch und erzeugt dabei eine `.htaccess` mit den nötigen Umgebungsvariablen (DB-Zugang, `APP_URL`) im `public/`-Verzeichnis. Die Zugangsdaten werden aus `docs/testsystem_credentials.txt` gelesen.

View file

@ -310,6 +310,21 @@ tr.me td:not(.tipp-cell) { background-color: #fff6d6 !important; font-weight: 70
margin-left: 4px;
}
th.game-header { white-space: normal; }
.team-logo {
height: 1.1em;
width: auto;
vertical-align: middle;
margin-right: 0.25em;
}
/* Logo + Name nebeneinander, vertikal zentriert (für Inline-Wrapper) */
.team-cell {
display: inline-flex;
align-items: center;
gap: 0.25em;
}
.team-cell .team-logo {
margin-right: 0;
}
/* Legende */
.legend {

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Some files were not shown because too many files have changed in this diff Show more