Carry the match day's score board into the review; minutes on the time line; depth on the desk
- The review after a match opens with the score board of the stage at its final whistle. - The time line names its quarter hours; the repeated status under a running match is gone. - Desk: cards and tiles cast a shadow and answer the pointer, the bar carries the club's colour along its foot, the club's name is set in the display serif. - Settings: themes are called Mitternacht, Papier and Spieltag; two filler lines removed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a3513fb60
commit
9b33e1f8c1
7 files changed
+42
-15
No files matched your search
@@ -137,8 +137,13 @@ body.matchday {--live-bg:#242426;--live-surface:#302f34ec;--live-wash:#efc7ce0a;
|
||||
.live-demo-tag {border-radius:10dp;padding:10dp 22dp;}
|
||||
.live-body {left:48dp;right:48dp;top:128dp;bottom:150dp;height:auto;flex-direction:column;gap:28dp;}
|
||||
.live-cards {padding:0;display:flex;flex-wrap:wrap;gap:16dp;flex-shrink:0;}
|
||||
.live-stage .live-game {position:relative;display:block;width:100%;height:600dp;flex-grow:0;flex-shrink:0;padding:18dp 40dp;border:2dp #00000090;border-radius:16dp;background-color:transparent;decorator:linear-gradient(180deg,#1d2832,#0f161d);color:#f1f4f6;overflow:hidden;}
|
||||
.live-stage .live-game,.postmatch-stage .live-game {position:relative;display:block;width:100%;height:600dp;flex-grow:0;flex-shrink:0;padding:18dp 40dp;border:2dp #00000090;border-radius:16dp;background-color:transparent;decorator:linear-gradient(180deg,#1d2832,#0f161d);color:#f1f4f6;overflow:hidden;}
|
||||
.live-stage .live-game:hover,.live-stage .live-game:focus-visible {background-color:transparent;border-color:#ffffff66;}
|
||||
.postmatch-stage {flex-shrink:0;margin-bottom:24dp;}
|
||||
.postmatch-stage .live-game {pointer-events:none;font-size:36dp;}
|
||||
.postmatch-stage .live-game .live-timeline {width:100%;}
|
||||
.live-timeline-ticks {position:relative;height:30dp;margin:0 auto;color:#aab6c0;font-size:24dp;}
|
||||
.live-timeline-ticks span {position:absolute;top:0;width:80dp;margin-left:-40dp;text-align:center;display:block;}
|
||||
.live-stage .live-game.duo {width:1296dp;}
|
||||
.live-stage .live-game.quad {width:1296dp;height:292dp;padding:10dp 28dp;}
|
||||
.live-stage .live-game.active {border-color:#00000090;}
|
||||
@@ -176,7 +181,7 @@ body.matchday {--live-bg:#242426;--live-surface:#302f34ec;--live-wash:#efc7ce0a;
|
||||
.live-game.duo .live-press {width:330dp;}
|
||||
.live-press-home {height:100%;}
|
||||
.live-press-away {flex:1;height:100%;}
|
||||
.live-timeline {display:flex;justify-content:center;height:124dp;}
|
||||
.live-timeline {display:flex;justify-content:center;height:112dp;}
|
||||
.live-game.quad .live-timeline {height:84dp;}
|
||||
@keyframes live-moment-in {from {opacity:0;transform:translateX(-220dp);} to {opacity:1;transform:translateX(0dp);}}
|
||||
.live-moment {position:absolute;left:0;right:0;top:120dp;height:260dp;display:flex;align-items:center;justify-content:center;gap:48dp;border-top:4dp #ffffffb0;border-bottom:4dp #ffffffb0;box-shadow:0dp 10dp 40dp #000000a0;color:#ffffff;pointer-events:none;}
|
||||
|
||||
@@ -186,4 +186,12 @@ body.silver .titlebar {border-bottom-color:#4a433438;}
|
||||
.sheet-under.window-in {animation:0.3s cubic-out sheet-in;}
|
||||
body.calm .window.window-in,body.calm .sheet-under.window-in {animation:none;}
|
||||
button {transition:background-color border-color 0.12s cubic-out;}
|
||||
.desktop-button img,.desktop-card {transition:transform 0.14s 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;}
|
||||
.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;}
|
||||
@@ -61,7 +61,11 @@ void App::engine_render() {
|
||||
} else {
|
||||
const auto &desk = engine_data_.at("desktop").at("data"), &meta = engine_data_.at("desktop").at("meta");
|
||||
const auto &team = desk.at("team"), &person = desk.at("manager");
|
||||
out = "<div class=\"desktop-layer\"><div class=\"info-bar\"><div class=\"identity\">" + engine_widget_crest(team, 82) +
|
||||
// the bar carries the club's colour as a line along its foot
|
||||
std::string club_line;
|
||||
if (const auto *club = world_->find("clubs", team.at("id").get<std::string>()); club && !club->value("crest", "").empty())
|
||||
if (const auto colour = renderer_.crest_colour(club->value("crest", "")); !colour.empty()) club_line = " style=\"border-bottom:8dp " + colour + ";\"";
|
||||
out = "<div class=\"desktop-layer\"><div class=\"info-bar\"" + club_line + "><div class=\"identity\">" + engine_widget_crest(team, 82) +
|
||||
"<span><strong>" + esc(engine_text(team.at("name"))) + "</strong><small>" + esc(engine_text(person.at("name"))) +
|
||||
"</small></span></div><div class=\"info-date\">" + esc(ui_long_date(meta.at("date").get<std::string>())) + "<small>Saison " +
|
||||
esc(meta.at("season").at("label").get<std::string>()) + "</small></div><div class=\"info-cash\"><small>Guthaben</small><strong id=\"engine-cash\" class=\"" + money_classes(engine_money_minor(desk.at("accounts").at("cash"))) + "\">" +
|
||||
|
||||
@@ -282,6 +282,7 @@ void App::live_set_speed(int value) {
|
||||
if (auto *node = element("live-pause")) node->SetInnerRML(live_text(value ? "Pause" : "Abspielen", "control-label"));
|
||||
const auto &frame = live_.fixture().at("frames")[live_.sequence()];
|
||||
const bool recorded = live_.fixture().at("source") == "engine-recording";
|
||||
if (recorded) { if (auto *node = element("live-playback-status")) node->SetInnerRML(""); return; }
|
||||
const std::string phase = live_.finished() ? "Beendet" : frame.at("phase") == "interval" ? "Halbzeit" : value ? (recorded ? "Spiel läuft" : "Aufzeichnung läuft") : (recorded ? "Pausiert" : "Gemeinsam pausiert");
|
||||
if (auto *node = element("live-phase-status")) node->SetInnerRML(esc(phase));
|
||||
if (auto *node = element("live-playback-status")) node->SetInnerRML(esc(phase + " · " + std::to_string(frame.at("minute").get<int>()) + (recorded ? "′" : "′ · keine Spielwertänderung")));
|
||||
|
||||
@@ -260,7 +260,7 @@ std::string App::live_card(const Json &match, const Json &frame, const std::stri
|
||||
const bool quad = layout == "quad";
|
||||
const double crest = layout == "solo" ? 250 : layout == "duo" ? 190 : 110;
|
||||
const auto id = match.at("id").get<std::string>();
|
||||
const double tw = layout == "solo" ? 2480 : 1180, th = quad ? 84 : 124, W = tw / th * 100;
|
||||
const double tw = layout == "solo" ? 2480 : 1180, th = quad ? 84 : 112, W = tw / th * 100;
|
||||
|
||||
// the clock: a ring that fills with the minutes
|
||||
const double turn = std::clamp(double(minute) / duration, 0.0, 1.0) * 289.03;
|
||||
@@ -320,6 +320,11 @@ std::string App::live_card(const Json &match, const Json &frame, const std::stri
|
||||
";\"></div><div class=\"live-press-away\" style=\"background-color:" + colours[1] + ";\"></div></div>";
|
||||
out += "</div><div class=\"live-side away\">" + live_badge(match.at("away"), crest) + live_text(match.at("away").at("name"), "live-team-name") + "</div></div>";
|
||||
out += "<div class=\"live-timeline\">" + picture(renderer_.diagram("live-line-" + std::to_string(index), timeline, 2048), tw, th) + "</div>";
|
||||
if (!quad) {
|
||||
out += "<div class=\"live-timeline-ticks\" style=\"width:" + scalar(tw) + "dp;\">";
|
||||
for (int at = 15; at < duration; at += 15) out += "<span style=\"left:" + scalar(at * 100.0 / duration) + "%;\">" + std::to_string(at) + "′</span>";
|
||||
out += "</div>";
|
||||
}
|
||||
|
||||
// a goal that has just fallen: a banner across this card, once
|
||||
if (!frame.at("events").empty()) {
|
||||
|
||||
@@ -268,7 +268,7 @@ std::string App::render_postmatch() {
|
||||
"<section id=\"postmatch-underlay\" class=\"postmatch\"><header "
|
||||
"class=\"postmatch-heading\"><div><p>" +
|
||||
live_text(selected.at("competition").get<std::string>() + " · " +
|
||||
postmatch_data_.at("date").get<std::string>()) +
|
||||
ui_long_date(postmatch_data_.at("date").get<std::string>())) +
|
||||
"</p><h2 id=\"postmatch-heading\" tabindex=\"-1\">" +
|
||||
live_text(postmatch_label(postmatch_tab_)) + "</h2></div>";
|
||||
if (postmatch_data_.at("role") == "club" &&
|
||||
@@ -305,6 +305,13 @@ std::string App::render_postmatch() {
|
||||
"role=\"tabpanel\" aria-labelledby=\"postmatch-tab-" +
|
||||
postmatch_tab_ + "\">";
|
||||
if (postmatch_tab_ == "results") {
|
||||
// the score board of the match day's stage, at its final whistle
|
||||
if (live_.available())
|
||||
for (const auto &played : live_.fixture().at("matches"))
|
||||
if (played.at("home").at("id") == selected.at("home").at("id") && played.at("away").at("id") == selected.at("away").at("id")) {
|
||||
try { body += "<div class=\"postmatch-stage\">" + live_card(played, live_.frame(), "solo", 0) + "</div>"; } catch (const std::exception &) {}
|
||||
break;
|
||||
}
|
||||
body += "<div class=\"postmatch-results-head\">" +
|
||||
live_text("Heim", "home") + live_text("Ergebnis", "score") +
|
||||
live_text("Auswärts", "away") +
|
||||
|
||||
@@ -215,18 +215,15 @@ std::string App::render_settings() {
|
||||
std::string head = "<div><h2>" + captions.at(settings_category_).first +
|
||||
"</h2><p>" + captions.at(settings_category_).second +
|
||||
"</p></div>";
|
||||
if(settings_category_=="display")head+="<span id=\"settings-transmission-style\" style=\"font-size:28dp;color:var(--muted);\">Live-Ticker · feste Darstellungsart</span>";
|
||||
if (settings_category_ == "display") {
|
||||
pane =
|
||||
"<div class=\"settings-group\"><h3>Gestaltung</h3><p "
|
||||
"class=\"settings-group-help\">Wähle deinen Look. Die Gestaltung wird "
|
||||
"mit „Anwenden“ übernommen.</p><div class=\"settings-theme-options\">";
|
||||
"<div class=\"settings-group\"><h3>Gestaltung</h3><div class=\"settings-theme-options\">";
|
||||
const std::array<std::array<const char *, 3>, 3> themes{
|
||||
{{{"midnight", "Midnight Glass",
|
||||
"Dunkles Glas · ruhige Blautöne · Mint"}},
|
||||
{{"silver", "Silver Glass",
|
||||
"Helles Glas · klare Schrift · Silberblau"}},
|
||||
{{"matchday", "Matchday", "Graphit · klare Flächen · Vereinsrot"}}}};
|
||||
{{{"midnight", "Mitternacht",
|
||||
"Dunkles Blau, mintgrüne Akzente"}},
|
||||
{{"silver", "Papier",
|
||||
"Helles Papier, blaue Akzente"}},
|
||||
{{"matchday", "Spieltag", "Graphit, rote Akzente"}}}};
|
||||
for (const auto &t : themes) {
|
||||
const std::string type = t[0];
|
||||
const auto mini =
|
||||
|
||||
Reference in new issue
Block a user