modified: static/css/style.css
modified: static/js/game.js
This commit is contained in:
@@ -287,22 +287,21 @@
|
||||
return `<span class="num">${formatMoney(row.value)}</span>${arrowMoney(row.direction, row.diff)}`;
|
||||
}
|
||||
|
||||
// Pfeil mit Zahl (z.B. Jahr): ▲ 5 / ▼ 3
|
||||
// Pfeil nur (z.B. Jahr): ▲ / ▼ – bei >6 Jahren Abweichung in Rot
|
||||
function arrowDiff(dir, diff) {
|
||||
if (dir === "equal" || diff == null) return "";
|
||||
const cls = dir === "up" ? "up" : "down";
|
||||
const gly = dir === "up" ? "▲" : "▼";
|
||||
return `<span class="dir-pill ${cls}">${gly} ${Math.abs(diff)}</span>`;
|
||||
const far = Math.abs(diff) > 6 ? " far" : "";
|
||||
return `<span class="dir-pill ${cls}${far}">${gly}</span>`;
|
||||
}
|
||||
|
||||
// Pfeil mit Differenz in Geld (Budget)
|
||||
// Pfeil nur (Budget): ▲ / ▼
|
||||
function arrowMoney(dir, diff) {
|
||||
if (dir === "equal" || diff == null) return "";
|
||||
const cls = dir === "up" ? "up" : "down";
|
||||
const gly = dir === "up" ? "▲" : "▼";
|
||||
const n = Math.abs(diff);
|
||||
const txt = n >= 1000000 ? (n / 1000000).toFixed(0) + " Mio $" : Math.round(n / 1000) + " Tsd $";
|
||||
return `<span class="dir-pill ${cls}">${gly} ${txt}</span>`;
|
||||
return `<span class="dir-pill ${cls}">${gly}</span>`;
|
||||
}
|
||||
|
||||
function cell(inner, status) {
|
||||
|
||||
Reference in New Issue
Block a user