Form marks and the own club's row in tables, squad grounds in the line-up, an own news masthead

- League tables show the last matches as marks (won, drawn, lost, not played) and
  set the manager's club apart with a bar in its crest colour.
- The line-up tints starters, bench and the rest of the squad.
- The news window carries a masthead of its own in the display serif.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 16:22:35 +01:00
1 parent 9b5d448fb6
commit 3a3513fb60
7 files changed
+45 -6

No files matched your search

+7 -1
View File
@@ -4,7 +4,13 @@
.lineup-roster-scroll {position:absolute;left:0;top:48dp;width:2612dp;height:1168dp;overflow-x:hidden;overflow-y:auto;}
.lineup-row {display:flex;width:2612dp;height:56dp;border-bottom:1dp #c5d9e712;align-items:center;font-size:30dp;}
.lineup-row.even {background-color:#e3edf605;}
.lineup-row.selected {background-color:var(--selected);border-left-width:0;}
.lineup-row {border-left:8dp transparent;}
.lineup-roster-scroll .lineup-row.starter {background-color:#4f9a6a1f;border-left-color:var(--win);}
.lineup-roster-scroll .lineup-row.starter.even {background-color:#4f9a6a2b;}
.lineup-roster-scroll .lineup-row.bench {background-color:#4f7fb01c;border-left-color:#5b88b8;}
.lineup-roster-scroll .lineup-row.bench.even {background-color:#4f7fb028;}
.lineup-roster-scroll .lineup-row.stand {color:var(--muted);}
.lineup-roster-scroll .lineup-row.selected,.lineup-roster-scroll .lineup-row.selected.even {background-color:var(--selected);}
.lineup-row.reserve-start {margin-top:12dp;}
.lineup-cell {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:160.888889dp;height:54dp;padding:0 6dp;border:0;background-color:transparent;border-radius:0;white-space:nowrap;overflow:hidden;min-width:0;}
.lineup-cell.control-button:hover {background-color:var(--hover);}
+1 -1
View File
@@ -8,7 +8,7 @@
.news-layout {position:absolute;left:0;right:0;top:0;bottom:0;color:var(--text);}
.news-masthead {position:absolute;left:6dp;right:6dp;top:0;height:180dp;padding-bottom:34dp;display:flex;align-items:center;justify-content:space-between;gap:36dp;}
.news-brand {display:flex;align-items:center;gap:34dp;min-width:0;}
.news-wordmark {padding:8dp 24dp 15dp;border:2dp #ff8c8c25;border-radius:15dp;background-color:#c92736;color:#fff6f4;font-size:86dp;font-weight:bold;font-style:italic;letter-spacing:-5dp;line-height:1;}
.news-wordmark {padding:10dp 26dp 16dp;border-top:6dp var(--text);border-bottom:2dp var(--text);border-radius:0dp;background-color:transparent;color:var(--text);font-family:Display;font-size:76dp;font-weight:bold;letter-spacing:-1dp;line-height:1;}
.news-brand p {margin-bottom:12dp;color:var(--muted);font-size:28dp;letter-spacing:2dp;}
.news-brand h2 {font-size:48dp;line-height:1.1;font-weight:normal;letter-spacing:-1dp;}
.news-owner {display:flex;align-items:center;gap:24dp;min-width:0;}
+8
View File
@@ -10,6 +10,14 @@
.report-cell.first {justify-content:flex-start;}
.report-cell.score {justify-content:center;}
.report-cell.form {font-size:33dp;letter-spacing:1dp;}
.report-row {border-left:8dp transparent;}
.report-row.own {background-color:var(--selected);border-left-color:var(--accent);}
.report-row.own .report-value {font-weight:bold;}
.report-form {display:flex;align-items:center;gap:7dp;}
.form-mark {display:block;width:22dp;height:22dp;border-radius:11dp;background-color:var(--draw);}
.form-mark.won {background-color:var(--win);}
.form-mark.lost {background-color:var(--loss);}
.form-mark.none {width:22dp;height:6dp;border-radius:3dp;background-color:var(--border);}
.report-value {display:block;white-space:nowrap;}
.report-club-button {display:flex;align-items:center;gap:14dp;max-width:100%;min-width:0;padding:2dp 6dp;border:0dp;border-radius:0dp;background-color:transparent;font-size:36dp;}
.report-club-button .image-frame {flex-shrink:0;}
+2
View File
@@ -202,7 +202,9 @@ std::string App::render_lineup() {
for (const auto &row : rows) {
const auto slot = row.at("slot").get<int>();
const auto id = row.at("id").get<std::string>();
// starters, the bench and the rest of the squad each have their own ground
out += "<div class=\"lineup-row " + std::string(slot % 2 ? "even " : "") +
(slot < lineup_start_limit ? "starter " : slot < lineup_start_limit + lineup_bench_limit ? "bench " : "stand ") +
(slot == field_count ? "reserve-start " : "") +
(lineup_selected_ == id ? "selected" : "") + "\" role=\"row\">";
out += "<span class=\"lineup-cell lineup-col-0\"><span>" +
+1 -1
View File
@@ -131,7 +131,7 @@ std::string App::render_news() {
std::string content =
"<div id=\"news-underlay\" class=\"news-layout\"><div "
"class=\"news-masthead\"><div class=\"news-brand\"><span "
"class=\"news-wordmark\">kicker</span><div><p>" + std::string(engine_mode_ ? "" : "DEIN SPIELJOURNAL") + "</p><h2>Nachrichten</h2></div></div><div "
"class=\"news-wordmark\">Dreierpack</span><div><p>" + std::string(engine_mode_ ? "" : "DEIN SPIELJOURNAL") + "</p><h2>Nachrichten</h2></div></div><div "
"class=\"news-owner\"><div><strong>" +
esc(data.at("club_name").get<std::string>()) + "</strong><p>" +
esc(data.at("date").get<std::string>()) + "</p></div>" +
+16 -2
View File
@@ -119,9 +119,17 @@ std::string App::render_reports(const std::string &mode) {
body += "</div>";
for (size_t i = 0; i < rows.size(); ++i) {
const auto &row = rows[i];
body += "<div class=\"report-row " + std::string(i % 2 == 0 ? "striped" : "") +
// the manager's own club stands out: a bar in its colour down the left edge
const std::string row_club = row.value("club", "");
const bool own_row = !matches && !row_club.empty() &&
(engine_mode_ ? engine_data_.at("desktop").at("meta").at("scope").at("teamId") == row_club
: snap().state.at("career").value("role", "club") == "club" && manager(snap()).value("club", "") == row_club);
std::string own_colour;
if (own_row)
if (const auto *club = world_->find("clubs", row_club); club && !club->value("crest", "").empty()) own_colour = renderer_.crest_colour(club->value("crest", ""));
body += "<div class=\"report-row " + std::string(i % 2 == 0 ? "striped" : "") + (own_row ? " own" : "") +
"\" role=\"row\" data-club=\"" + esc(row.value("club", "")) +
"\" style=\"height:" + scalar(row_height) + "dp;\">";
"\" style=\"height:" + scalar(row_height) + "dp;" + (own_colour.empty() ? "" : "border-left-color:" + own_colour + ";") + "\">";
for (size_t column = 0; column < headings.size(); ++column) {
body += "<div class=\"report-cell " + std::string(column == 0 ? "first" : "") +
(matches && column == 1 ? " score" : "") +
@@ -156,6 +164,12 @@ std::string App::render_reports(const std::string &mode) {
value="Rück: "+value;
} else if(row.at("status")=="scheduled"&&row.at("date").is_string())detail=row.at("date").get<std::string>();
body+="<div class=\"report-score-lines\"><span class=\"report-value\">"+esc(value)+"</span>"+(detail.empty()?"":"<span class=\"report-score-note\">"+esc(detail)+"</span>")+"</div>";
} else if (!matches && !strengths && column == 5) {
// the last matches as marks: won, drawn, lost, not played
body += "<span class=\"report-form\" title=\"" + esc(value) + "\">";
for (const char c : value)
body += std::string("<span class=\"form-mark ") + (c == 'S' ? "won" : c == 'U' ? "drawn" : c == 'N' ? "lost" : "none") + "\"></span>";
body += "</span>";
} else body += "<span class=\"report-value\">" + esc(value) + "</span>";
}
body += "</div>";
+10 -1
View File
@@ -217,6 +217,15 @@ int main(int argc, char **argv) try {
Rml::Style::FontStyle::Italic,
Rml::Style::FontWeight::Bold),
"Bold italic font missing");
// the display serif of headings and the news masthead ships with the assets
require(Rml::LoadFontFace((root / "fonts" / "SourceSerif4-Regular.ttf").string(), "Display",
Rml::Style::FontStyle::Normal,
Rml::Style::FontWeight::Normal),
"Display font missing");
require(Rml::LoadFontFace((root / "fonts" / "SourceSerif4-Semibold.ttf").string(), "Display",
Rml::Style::FontStyle::Normal,
Rml::Style::FontWeight::Bold),
"Display bold font missing");
std::ostringstream css;
for (const auto *name : {"theme.rcss", "ticket.rcss", "sports.rcss",
"calendar.rcss", "reports.rcss", "report_details.rcss",
@@ -271,7 +280,7 @@ int main(int argc, char **argv) try {
"<div style='position:absolute;left:2300dp;top:160dp;width:1000dp;height:80dp;'>" +
button_markup("club-detail", "<span id='stats-from-label' class='report-club-name'>Synthetic source club</span><span style='width:42dp;height:42dp;'></span>",
"report-club-button statistics-club name-first") + "</div>" +
"<span id='news-brand-test' class='news-wordmark' style='position:absolute;left:2700dp;top:280dp;'>kicker</span>" +
"<span id='news-brand-test' class='news-wordmark' style='position:absolute;left:2700dp;top:280dp;'>Dreierpack</span>" +
"<div class='statistics-trophy-winner' style='left:2700dp;top:430dp;width:900dp;height:100dp;font-size:70dp;'>" +
"<div class='image-frame' style='width:100dp;height:100dp;'></div><span id='stats-winner-label'>Sample winner</span></div>" +
button_markup("statistics-curve", "<span class='statistics-series-dot'></span><span id='stats-legend-label' class='statistics-series-label'>Mannschaftsstärke</span>",