The statistics as five pages of the notebook with markers of their own

Analysis (the club's season as figures and charts), course (the recorded series as
curves, the seasons' finances), winners under their trophies, records (all-time
table, series and records, world cups) and players (transfer history, minutes,
chances). A page with several kinds shows them as tabs; the old list of kinds in
the foot is gone in a career.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-15 20:20:18 +01:00
1 parent 9d94d05db1
commit 9f164b4d61
8 files changed
+239 -173

No files matched your search

+7 -4
View File
@@ -17,7 +17,7 @@ const std::vector<NotebookSection> &notebook_sections() {
{"club", "Verein", {"stadium", "environment", "advertising"}},
{"finance", "Finanzen", {"balance", "bank", "toto"}},
{"fixtures", "Spielplan", {"calendar", "league", "tables", "other", "friendlies", "postpone", "indoor"}},
{"records", "Statistik", {"statistics", "achievements", "almanac", "fairplay", "highscore"}},
{"records", "Statistik", {"statistics", "stat-trend", "stat-winners", "stat-records", "stat-players", "achievements", "almanac", "fairplay", "highscore"}},
{"inbox", "Posteingang", {"news"}},
{"options", "Optionen", {"settings", "save", "load", "newplayer"}}};
return value;
@@ -28,7 +28,7 @@ std::string notebook_page_label(const std::string &route) {
{"scorers", "Spielerstatistik"}, {"transfer", "Transfermarkt"}, {"contracts", "Verträge"}, {"stadium", "Stadion"}, {"environment", "Umfeld"},
{"advertising", "Werbung"}, {"balance", "Bilanz"}, {"bank", "Bank"}, {"toto", "Toto"}, {"calendar", "Kalender"}, {"league", "Ligaspiele"},
{"tables", "Tabellen"}, {"other", "Übrige Spiele"}, {"friendlies", "Testspiele"}, {"postpone", "Verlegen"}, {"indoor", "Halle"},
{"statistics", "Statistiken"}, {"achievements", "Erfolge"}, {"almanac", "Almanach"}, {"fairplay", "Fairplay"}, {"highscore", "Highscore"},
{"statistics", "Analyse"}, {"stat-trend", "Verlauf"}, {"stat-winners", "Sieger"}, {"stat-records", "Rekorde"}, {"stat-players", "Spieler"}, {"achievements", "Erfolge"}, {"almanac", "Almanach"}, {"fairplay", "Fairplay"}, {"highscore", "Highscore"},
{"news", "Nachrichten"}, {"settings", "Einstellungen"}, {"save", "Speichern"}, {"load", "Laden"}, {"newplayer", "Manager"}};
const auto found = labels.find(route);
return found == labels.end() ? route : found->second;
@@ -198,7 +198,10 @@ std::string App::notebook_shell(const std::function<bool(const std::string &)> &
}
size_t n = 0;
for (const char *r : section.routes) {
const bool here = menu_ == r;
// the statistics are one menu with several pages; the demo has only its first
const bool part = std::string_view(r).starts_with("stat-") || std::string_view(r) == "statistics";
if (!engine_mode_ && std::string_view(r).starts_with("stat-")) continue;
const bool here = part && engine_mode_ ? menu_ == "statistics" && statistics_page_ == r : menu_ == r;
if (here) {
kicker = std::string(section.label) + " · " + std::to_string(n + 1) + " / " + std::to_string(section.routes.size());
heading = notebook_page_label(r);
@@ -207,7 +210,7 @@ std::string App::notebook_shell(const std::function<bool(const std::string &)> &
std::string("nb-sub") + (here ? " active" : ""),
"id=\"page-" + std::string(r) + "\" aria-pressed=\"" + (here ? "true" : "false") + "\" style=\"transform:translateY(" + (here ? std::string("-13") : std::to_string(sub_rest[n % sub_rest.size()])) + "dp) rotate(" +
scalar(sub_turns[n % sub_turns.size()]) + "deg);\"",
enabled(r));
enabled(part ? "statistics" : r));
++n;
}
}