Dark mode: red text and the market's heat tags read on the dark panels (#80)
Red warning text used var(--bad), 3.8 to 4.8:1 on the dark cards and tints. Every text use now takes var(--tx-red,var(--bad)): light mode keeps --bad, dark gets #FF8E9B (5.65:1 or better on paper, soft and every tint). --bad stays the fill under white letters (buttons, counters, bars). Lambda Bazaar's Hot and Cool tags kept their light pastel chips at night. They now use the dark tints (--tint-o, --tint-b) with --tx-amber and a new --tx-blue, keeping the same colours by day. The dark-mode test checks the tags, the text tokens on every dark card, that no tag keeps a bare pastel fill, and that no red text in --bad is left in the styles or the game's markup.
This commit is contained in:
parent
8068a45abd
commit
27ffa33d7c
27 changed files with 93 additions and 49 deletions
|
|
@ -11,12 +11,12 @@ function renderHUD(){
|
|||
if(pzOn()){$('hName').textContent=pzName(pzDef(S.pz.id)||S.pz);$('hAsn').textContent=tr('puzzles.puzzle');renderTabbar();return;}
|
||||
{const rt=ruleTag(),ha=$('hAsn');ha.title=rt?tr('rules.rules_are_locked_for_this_network',{rules:rt}):'';}
|
||||
$('hName').textContent=S.name;$('hAsn').textContent='AS'+S.asn+(S.mode==='sandbox'||ruleTag()&&!S.scn?' · '+ruleTag():S.scn?' · '+(scnName())+(S.scn.done||S.scn.failed?'':` · ${tr('ui.n_d_left',{n:Math.max(0,S.scn.days-S.day)})}`):'');
|
||||
$('hCash').textContent=fmt$(S.cash);$('hCash').style.color=S.cash<0?'var(--bad)':'';
|
||||
$('hCash').textContent=fmt$(S.cash);$('hCash').style.color=S.cash<0?'var(--tx-red,var(--bad))':'';
|
||||
const net=R.revMo-R.costMo;$('hRate').innerHTML=`<span class="${net>=0?'up':'down'}">${net>=0?'▲':'▼'} ${tr('common.price_mo',{price:fmt$(Math.abs(net))})}</span>`;
|
||||
$('hTraffic').textContent=`${fmtG(R.served)}`;
|
||||
$('hTrafBar').style.width=(R.demand?R.served/R.demand*100:0)+'%';
|
||||
$('hTrafBar').style.background=R.demand&&R.served/R.demand<0.9?'var(--bad)':'var(--ok)';
|
||||
$('hReach').textContent=reachPct(R.reach);$('hReach').style.color=R.reach<0.99?'var(--bad)':'var(--eye)';
|
||||
$('hReach').textContent=reachPct(R.reach);$('hReach').style.color=R.reach<0.99?'var(--tx-red,var(--bad))':'var(--eye)';
|
||||
$('hTier').textContent=tierLabel()+' · '+tr('hud_and_panels.lv_n',{n:S.lvl||1});
|
||||
{const P=scnProg(),hs=$('hScn');hs.hidden=!P;if(P){const sc=S.scn;$('hScnVal').textContent=sc.done?tr('common.done'):sc.failed?tr('common.time_s_up'):`${Math.round(P.f*100)}% · ${tr('ui.n_d_left',{n:Math.max(0,sc.days-S.day)})}`;}}
|
||||
$('hDate').textContent=dateStr(S.day);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue