updates
34
README.md
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
BIN
tippspiel/public/img/flags/ad.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
tippspiel/public/img/flags/am.png
Normal file
|
After Width: | Height: | Size: 121 B |
BIN
tippspiel/public/img/flags/ar.png
Normal file
|
After Width: | Height: | Size: 335 B |
BIN
tippspiel/public/img/flags/at.png
Normal file
|
After Width: | Height: | Size: 109 B |
BIN
tippspiel/public/img/flags/ba.png
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
tippspiel/public/img/flags/be.png
Normal file
|
After Width: | Height: | Size: 127 B |
BIN
tippspiel/public/img/flags/bo.png
Normal file
|
After Width: | Height: | Size: 630 B |
BIN
tippspiel/public/img/flags/br.png
Normal file
|
After Width: | Height: | Size: 816 B |
BIN
tippspiel/public/img/flags/ch.png
Normal file
|
After Width: | Height: | Size: 135 B |
BIN
tippspiel/public/img/flags/cm.png
Normal file
|
After Width: | Height: | Size: 228 B |
BIN
tippspiel/public/img/flags/cr.png
Normal file
|
After Width: | Height: | Size: 398 B |
BIN
tippspiel/public/img/flags/cy.png
Normal file
|
After Width: | Height: | Size: 559 B |
BIN
tippspiel/public/img/flags/cz.png
Normal file
|
After Width: | Height: | Size: 363 B |
BIN
tippspiel/public/img/flags/de.png
Normal file
|
After Width: | Height: | Size: 105 B |
BIN
tippspiel/public/img/flags/dk.png
Normal file
|
After Width: | Height: | Size: 148 B |
BIN
tippspiel/public/img/flags/ec.png
Normal file
|
After Width: | Height: | Size: 933 B |
BIN
tippspiel/public/img/flags/es.png
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
tippspiel/public/img/flags/fi.png
Normal file
|
After Width: | Height: | Size: 134 B |
BIN
tippspiel/public/img/flags/fr.png
Normal file
|
After Width: | Height: | Size: 123 B |
BIN
tippspiel/public/img/flags/gb-eng.png
Normal file
|
After Width: | Height: | Size: 123 B |
BIN
tippspiel/public/img/flags/gb-nir.png
Normal file
|
After Width: | Height: | Size: 581 B |
BIN
tippspiel/public/img/flags/gb-sct.png
Normal file
|
After Width: | Height: | Size: 433 B |
BIN
tippspiel/public/img/flags/gb-wls.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
tippspiel/public/img/flags/gh.png
Normal file
|
After Width: | Height: | Size: 267 B |
BIN
tippspiel/public/img/flags/gr.png
Normal file
|
After Width: | Height: | Size: 208 B |
BIN
tippspiel/public/img/flags/hr.png
Normal file
|
After Width: | Height: | Size: 639 B |
BIN
tippspiel/public/img/flags/hu.png
Normal file
|
After Width: | Height: | Size: 119 B |
BIN
tippspiel/public/img/flags/ie.png
Normal file
|
After Width: | Height: | Size: 119 B |
BIN
tippspiel/public/img/flags/il.png
Normal file
|
After Width: | Height: | Size: 301 B |
BIN
tippspiel/public/img/flags/is.png
Normal file
|
After Width: | Height: | Size: 185 B |
BIN
tippspiel/public/img/flags/it.png
Normal file
|
After Width: | Height: | Size: 122 B |
BIN
tippspiel/public/img/flags/jp.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
tippspiel/public/img/flags/kr.png
Normal file
|
After Width: | Height: | Size: 972 B |
BIN
tippspiel/public/img/flags/li.png
Normal file
|
After Width: | Height: | Size: 399 B |
BIN
tippspiel/public/img/flags/lv.png
Normal file
|
After Width: | Height: | Size: 94 B |
BIN
tippspiel/public/img/flags/mk.png
Normal file
|
After Width: | Height: | Size: 545 B |
BIN
tippspiel/public/img/flags/mt.png
Normal file
|
After Width: | Height: | Size: 266 B |
BIN
tippspiel/public/img/flags/mx.png
Normal file
|
After Width: | Height: | Size: 562 B |
BIN
tippspiel/public/img/flags/nl.png
Normal file
|
After Width: | Height: | Size: 127 B |
BIN
tippspiel/public/img/flags/no.png
Normal file
|
After Width: | Height: | Size: 192 B |
BIN
tippspiel/public/img/flags/pl.png
Normal file
|
After Width: | Height: | Size: 94 B |
BIN
tippspiel/public/img/flags/pt.png
Normal file
|
After Width: | Height: | Size: 893 B |
BIN
tippspiel/public/img/flags/qa.png
Normal file
|
After Width: | Height: | Size: 201 B |
BIN
tippspiel/public/img/flags/ro.png
Normal file
|
After Width: | Height: | Size: 122 B |
BIN
tippspiel/public/img/flags/rs.png
Normal file
|
After Width: | Height: | Size: 934 B |
BIN
tippspiel/public/img/flags/ru.png
Normal file
|
After Width: | Height: | Size: 125 B |
BIN
tippspiel/public/img/flags/se.png
Normal file
|
After Width: | Height: | Size: 100 B |
BIN
tippspiel/public/img/flags/si.png
Normal file
|
After Width: | Height: | Size: 313 B |
BIN
tippspiel/public/img/flags/sk.png
Normal file
|
After Width: | Height: | Size: 524 B |
BIN
tippspiel/public/img/flags/sm.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
tippspiel/public/img/flags/sn.png
Normal file
|
After Width: | Height: | Size: 241 B |
BIN
tippspiel/public/img/flags/sr.png
Normal file
|
After Width: | Height: | Size: 281 B |
BIN
tippspiel/public/img/flags/tr.png
Normal file
|
After Width: | Height: | Size: 377 B |
BIN
tippspiel/public/img/flags/ua.png
Normal file
|
After Width: | Height: | Size: 105 B |
BIN
tippspiel/public/img/flags/us.png
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
tippspiel/public/img/flags/uy.png
Normal file
|
After Width: | Height: | Size: 504 B |
BIN
tippspiel/public/img/teams/1860-muenchen.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
tippspiel/public/img/teams/ac-milan.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
tippspiel/public/img/teams/ajax.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
tippspiel/public/img/teams/alemannia-aachen.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
tippspiel/public/img/teams/arminia-bielefeld.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
tippspiel/public/img/teams/arsenal.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
tippspiel/public/img/teams/as-monaco.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
tippspiel/public/img/teams/as-roma.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
tippspiel/public/img/teams/aston-villa.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
tippspiel/public/img/teams/atalanta.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
tippspiel/public/img/teams/athletic-bilbao.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
tippspiel/public/img/teams/atletico-madrid.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
tippspiel/public/img/teams/barcelona.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
tippspiel/public/img/teams/basaksehir.png
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
tippspiel/public/img/teams/bayer-leverkusen.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
tippspiel/public/img/teams/bayreuth.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
tippspiel/public/img/teams/benfica.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
tippspiel/public/img/teams/besiktas.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
tippspiel/public/img/teams/bodo-glimt.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
tippspiel/public/img/teams/bologna.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
tippspiel/public/img/teams/borussia-dortmund.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
tippspiel/public/img/teams/borussia-moenchengladbach.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
tippspiel/public/img/teams/braga.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
tippspiel/public/img/teams/carl-zeiss-jena.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
tippspiel/public/img/teams/celtic.png
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
tippspiel/public/img/teams/chelsea.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
tippspiel/public/img/teams/club-brugge.png
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
tippspiel/public/img/teams/como.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
tippspiel/public/img/teams/copenhagen.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
tippspiel/public/img/teams/crystal-palace.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
tippspiel/public/img/teams/darmstadt-98.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
tippspiel/public/img/teams/dinamo-zagreb.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
tippspiel/public/img/teams/dynamo-dresden.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
tippspiel/public/img/teams/dynamo-kyiv.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
tippspiel/public/img/teams/eintracht-braunschweig.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
tippspiel/public/img/teams/eintracht-frankfurt.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
tippspiel/public/img/teams/energie-cottbus.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
tippspiel/public/img/teams/erzgebirge-aue.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
tippspiel/public/img/teams/espanyol.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
tippspiel/public/img/teams/fc-augsburg.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
tippspiel/public/img/teams/fc-bayern-muenchen.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
tippspiel/public/img/teams/fc-heidenheim.png
Normal file
|
After Width: | Height: | Size: 25 KiB |