Paper as the default theme; the club in every window head; the bank hall with either picture

The bank hall falls back to the first hall picture with its own places when a data set
lacks the newer one, and names its five services on tags. Window heads carry the
manager's crest and a rule in the club's colour. The glass cards of the desk lose their
shadow, which drew stray lines over the backdrop blur. A postponed league match is
called Nachholspiel on the match day.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 19:17:26 +01:00
1 parent 7e161ca505
commit 20d4f890cc
7 files changed
+43 -14

No files matched your search

+4
View File
@@ -82,3 +82,7 @@ body.matchday .credit-fact>strong,body.matchday .bank-overview-row>strong {color
body.matchday #bank-term {background-color:#191a208a;color:#efeded;}
body.matchday .credit-schedule {background-color:#1d1e2466;}
body.matchday .bank-actions .bank-control {decorator:linear-gradient(180deg,#e8d6dc12,#a1a0aa0d);}
/* each service of the hall carries its name on a paper tag */
.bank-hotspot {display:flex;align-items:flex-end;justify-content:center;}
.bank-tag {display:block;flex-shrink:0;margin-bottom:10dp;padding:6dp 22dp;border:2dp #7b725f88;border-radius:6dp;background-color:#fbfaf6f0;color:#233443;font-family:Display;font-size:34dp;line-height:44dp;white-space:nowrap;}
.bank-hotspot:hover .bank-tag {background-color:#ffffff;border-color:#25617a;}
+4 -3
View File
@@ -187,11 +187,12 @@ body.silver .titlebar {border-bottom-color:#4a433438;}
body.calm .window.window-in,body.calm .sheet-under.window-in {animation:none;}
button {transition:background-color border-color 0.12s cubic-out;}
/* the desk: cards and tiles lie above the stadium and answer the pointer */
.desktop-card {box-shadow:0dp 10dp 30dp #00000055;}
.desktop-card[data-action] {transition:transform box-shadow 0.14s cubic-out;}
.desktop-card[data-action]:hover {transform:translateY(-4dp);box-shadow:0dp 16dp 40dp #00000070;}
/* no shadow under the glass cards: with the backdrop blur it draws stray lines */
.desktop-card[data-action] {transition:transform 0.14s cubic-out;}
.desktop-card[data-action]:hover {transform:translateY(-4dp);}
.desktop-app .app-tile {transition:transform 0.12s cubic-out;box-shadow:0dp 8dp 20dp #00000060;}
.desktop-app:hover .app-tile {transform:translateY(-6dp) scale(1.04);}
.desktop-app:active .app-tile {transform:scale(0.97);}
body.calm .desktop-app:hover .app-tile,body.calm .desktop-card[data-action]:hover {transform:none;}
.identity strong {font-family:Display;font-size:44dp;}
.titlebar-club {margin-left:auto;width:68dp;height:68dp;flex-shrink:0;}
+13 -4
View File
@@ -19,19 +19,28 @@ std::string App::render_bank() {
btn("bank-calc", left, "bank-control", "id=\"bank-" + std::string(lk) + "\" data-kind=\"" + lk + "\"") +
btn("bank-calc", right, "bank-control", "id=\"bank-" + std::string(rk) + "\" data-kind=\"" + rk + "\"") + "</nav>";
};
// A data set may carry the newer hall picture or only the first one; each has its own
// places for the five services.
const bool newer_hall = !renderer_.image("art.bank-hall-v2.png", false, 3000).token.empty();
std::string out = "<div class=\"bank-page\"><div class=\"bank-scene\">" +
img("art.bank-hall-v2.png", 2608, 1466.016746, false, false, 3000);
img(newer_hall ? "art.bank-hall-v2.png" : "art.bank-hall-v1.png", 2608, 1466.016746, false, false, 3000);
if (bank_view_ == "entrance") {
struct Service { const char *id, *label, *hint; double x, y, w, h; };
const std::array<Service, 5> services{{
const std::array<Service, 5> services = newer_hall ? std::array<Service, 5>{{
{"properties", "Immobilien", "Immobilien – Gebäude ansehen, kaufen oder verkaufen.", 14, 23, 23, 43},
{"stocks", "Aktien", "Aktien – Kurse und Bestände ansehen, Aktien kaufen oder verkaufen.", 49, 4, 45, 26},
{"overview", "Finanzübersicht", "Finanzübersicht – Konto, Sparbuch, Immobilien, Aktien und Kredit im Überblick.", 44, 48, 14, 17},
{"savings", "Sparbuch", "Sparbuch – Guthaben ansehen, Geld einzahlen oder abheben.", 78, 55, 12, 11},
{"credit", "Kredit", "Kredit – Laufzeit wählen, einen Kredit aufnehmen oder tilgen.", 81, 32, 15, 22}}};
{"credit", "Kredit", "Kredit – Laufzeit wählen, einen Kredit aufnehmen oder tilgen.", 81, 32, 15, 22}}}
: std::array<Service, 5>{{
{"properties", "Immobilien", "Immobilien – Gebäude ansehen, kaufen oder verkaufen.", .5, 18.5, 17.5, 43.5},
{"stocks", "Aktien", "Aktien – Kurse und Bestände ansehen, Aktien kaufen oder verkaufen.", 30, 30, 13.5, 19.5},
{"overview", "Finanzübersicht", "Finanzübersicht – Konto, Sparbuch, Immobilien, Aktien und Kredit im Überblick.", 30.5, 49.5, 13, 14.5},
{"savings", "Sparbuch", "Sparbuch – Guthaben ansehen, Geld einzahlen oder abheben.", 85, 60, 6.5, 7.5},
{"credit", "Kredit", "Kredit – Laufzeit wählen, einen Kredit aufnehmen oder tilgen.", 85.3, 31.5, 13.7, 27.5}}};
out += "<div class=\"bank-hotspots\">";
for (const auto &s : services)
out += btn("bank-view", "", "bank-hotspot", "id=\"bank-view-" + std::string(s.id) +
out += btn("bank-view", std::string("<span class=\"bank-tag\">") + s.label + "</span>", "bank-hotspot", "id=\"bank-view-" + std::string(s.id) +
"\" data-view=\"" + s.id + "\" data-bank-hint=\"" + esc(s.hint) + "\" aria-label=\"" + s.label +
"\" style=\"left:" + scalar(s.x) + "%;top:" + scalar(s.y) + "%;width:" + scalar(s.w) + "%;height:" + scalar(s.h) + "%;\"");
out += "</div>";
+2
View File
@@ -311,6 +311,8 @@ Json engine_live_progress(const Json &previous, const Json &state, const Json &b
if (next.is_object() && next.at("home").at("id") == m.at("home").at("id")) {
competition = next.at("competition").value("text", competition);
std::replace(competition.begin(), competition.end(), '\n', ' ');
// the original's column label for a postponed league match, spelled out
if (competition == "Verlegte Sp.") competition = "Nachholspiel";
// "24.Spieltag" of the original reads "24. Spieltag"
for (size_t i = 0; i + 1 < competition.size(); ++i)
if (competition[i] == '.' && std::isalpha(static_cast<unsigned char>(competition[i + 1]))) competition.insert(++i, 1, ' ');
+3 -3
View File
@@ -219,10 +219,10 @@ std::string App::render_settings() {
pane =
"<div class=\"settings-group\"><h3>Gestaltung</h3><div class=\"settings-theme-options\">";
const std::array<std::array<const char *, 3>, 3> themes{
{{{"midnight", "Mitternacht",
"Dunkles Blau, mintgrüne Akzente"}},
{{"silver", "Papier",
{{{"silver", "Papier",
"Helles Papier, blaue Akzente"}},
{{"midnight", "Mitternacht",
"Dunkles Blau, mintgrüne Akzente"}},
{{"matchday", "Spieltag", "Graphit, rote Akzente"}}}};
for (const auto &t : themes) {
const std::string type = t[0];
+1 -1
View File
@@ -21,7 +21,7 @@ bool choice(const Json &v, std::initializer_list<const char *> names) {
}
} // namespace
Json default_ui_preferences() {
return {{"theme", "midnight"},
return {{"theme", "silver"},
{"display",
{{"mode", "window"},
{"resolution", "1920x1080"},
+16 -3
View File
@@ -416,7 +416,7 @@ class App final : public Rml::EventListener {
// A menu window (2720 x 2040 at the middle of the stage) is shown as large as the screen
// allows; the desk behind it is cropped. Without a window the whole stage is fitted.
bool window_zoom_ = false;
std::string scene_ = "main", menu_, theme_ = "midnight", active_mod_,
std::string scene_ = "main", menu_, theme_ = "silver", active_mod_,
selected_mod_, notice_, country_ = "nation:de", league_,
selected_club_;
std::vector<Mod> mods_;
@@ -617,10 +617,23 @@ class App final : public Rml::EventListener {
// a sheet of paper on two more; it slides in once when its menu opens, not on every redraw
const std::string arriving = window_shown_ == menu_ ? "" : " window-in";
window_shown_ = menu_;
return "<div class=\"sheet-under first" + arriving + "\"></div><div class=\"sheet-under second" + arriving + "\"></div><div class=\"window" + arriving + "\"><div class=\"titlebar\">" +
// the head of every sheet carries the manager's club: its crest at the right, its colour
// as the rule under the title
std::string club_rule, club_mark;
try {
std::string own;
if (engine_mode_) own = engine_data_.at("desktop").at("meta").at("scope").at("teamId").get<std::string>();
else if (world_ && source_ && snap().state.at("career").value("role", "club") == "club") own = manager(snap()).value("club", "");
if (const auto *club = world_ && !own.empty() ? world_->find("clubs", own) : nullptr; club && !club->value("crest", "").empty()) {
if (const auto colour = renderer_.crest_colour(club->value("crest", "")); !colour.empty()) club_rule = " style=\"border-bottom:6dp " + colour + ";\"";
club_mark = "<div class=\"titlebar-club\">" + crest(club, 68) + "</div>";
}
} catch (const std::exception &) {
}
return "<div class=\"sheet-under first" + arriving + "\"></div><div class=\"sheet-under second" + arriving + "\"></div><div class=\"window" + arriving + "\"><div class=\"titlebar\"" + club_rule + ">" +
(close ? btn("close", "<span>×</span>", "close", "id=\"window-close\" aria-label=\"" + std::string(menu_ == "bank" && bank_view_ != "entrance" ? "Zurück zur Bankhalle" : "Fenster schließen") + "\"")
: "<span style=\"width:76dp;\"></span>") +
"<h1>" + esc(heading) + "</h1></div><div class=\"content\">" +
"<h1>" + esc(heading) + "</h1>" + club_mark + "</div><div class=\"content\">" +
content + "</div>" + (amount_ ? render_amount() : "") + "</div>";
}
std::string