The venue of the next match is plain words without a marker
Dreierpack macOS arm64 / package (push) Waiting to run
Dreierpack macOS arm64 / package (push) Waiting to run
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
18b511f443
commit
6a2d0d01f8
2 files changed
+7
-3
No files matched your search
@@ -321,3 +321,5 @@ body.midnight .hw-item,body.matchday .hw-item {background-color:#ffffff14;} body
|
||||
/* the ribbon is a button: back to the main menu */
|
||||
.nb-ribbon,.nb-ribbon:hover,.nb-ribbon:focus {display:block;padding:0;margin:0;border:0dp;border-radius:0dp;background-color:transparent;decorator:none;}
|
||||
.nb-ribbon:hover {top:2014dp;}
|
||||
.hw-venue {display:block;margin-top:8dp;font-size:30dp;font-weight:bold;line-height:40dp;white-space:nowrap;color:#8a3f1c;}
|
||||
.hw-match-mid .hw-venue {text-align:center;}
|
||||
@@ -172,6 +172,8 @@ std::string App::notebook_card(const std::string &type, int cols, int rows, cons
|
||||
return "<div class=\"hw-big\"><strong style=\"font-size:" + std::to_string(size) + "dp;line-height:" + std::to_string(size + 4) + "dp;\">" + esc(text) + "</strong>" + (sub.empty() ? "" : "<span>" + esc(sub) + "</span>") + "</div>";
|
||||
};
|
||||
const auto tag = [](const std::string &text, bool terra = false) { return "<span class=\"hw-tag" + std::string(terra ? " terra" : "") + "\">" + esc(text) + "</span>"; };
|
||||
// home or away: plain words, no marker behind them
|
||||
const auto place = [](const std::string &text) { return "<span class=\"hw-venue\">" + esc(text) + "</span>"; };
|
||||
const auto foot = [](const std::string &text) { return "<span class=\"hw-foot\">" + esc(text) + "</span>"; };
|
||||
const auto lines = [](const std::vector<std::pair<std::string, std::string>> &rows_) {
|
||||
std::string out = "<div class=\"hw-lines\">";
|
||||
@@ -196,13 +198,13 @@ std::string App::notebook_card(const std::string &type, int cols, int rows, cons
|
||||
const bool home = venue == "Heimspiel";
|
||||
const auto &other = fixture.at(home ? "away" : "home");
|
||||
const std::string placed = opponent.is_object() ? "Platz " + opponent.value("rank", std::string("—")) + " · Stärke " + opponent.value("strength", std::string("—")) : std::string();
|
||||
if (flat) return kicker(competition) + "<div class=\"hw-row\"><span class=\"hw-disc\" style=\"width:150dp;height:150dp;\">" + notebook_crest(other.at("team"), 140) + "</span><div class=\"hw-row-text\">" + big(other.at("name").get<std::string>(), 50) + tag(venue, !home) + "</div></div>";
|
||||
if (flat) return kicker(competition) + "<div class=\"hw-row\"><span class=\"hw-disc\" style=\"width:150dp;height:150dp;\">" + notebook_crest(other.at("team"), 140) + "</span><div class=\"hw-row-text\">" + big(other.at("name").get<std::string>(), 50) + place(venue) + "</div></div>";
|
||||
if (!wide)
|
||||
return kicker(competition) + "<div class=\"hw-centre\"><span class=\"hw-disc\" style=\"width:230dp;height:230dp;\">" + notebook_crest(other.at("team"), 216) + "</span></div>" + big(other.at("name").get<std::string>(), 56) + tag(venue, !home) + foot(placed);
|
||||
return kicker(competition) + "<div class=\"hw-centre\"><span class=\"hw-disc\" style=\"width:230dp;height:230dp;\">" + notebook_crest(other.at("team"), 216) + "</span></div>" + big(other.at("name").get<std::string>(), 56) + place(venue) + foot(placed);
|
||||
const auto side = [&](const Json &team) {
|
||||
return "<div class=\"hw-match-side\"><div class=\"hw-match-crest\"><span class=\"hw-disc\" style=\"width:250dp;height:250dp;\">" + notebook_crest(team.at("team"), 236) + "</span></div><strong>" + esc(team.at("name").get<std::string>()) + "</strong></div>";
|
||||
};
|
||||
return kicker("Nächstes Spiel · " + competition) + "<div class=\"hw-match\">" + side(fixture.at("home")) + "<div class=\"hw-match-mid\"><span class=\"hw-versus\">vs</span>" + tag(venue, !home) + "</div>" + side(fixture.at("away")) + "</div>" +
|
||||
return kicker("Nächstes Spiel · " + competition) + "<div class=\"hw-match\">" + side(fixture.at("home")) + "<div class=\"hw-match-mid\"><span class=\"hw-versus\">vs</span>" + place(venue) + "</div>" + side(fixture.at("away")) + "</div>" +
|
||||
foot(placed.empty() ? std::string() : "Gegner auf " + placed);
|
||||
}
|
||||
if (type == "news") {
|
||||
|
||||
Reference in new issue
Block a user