From Arms of God Wiki
bot: Phase 12 grade-S (comparison tables + tier theming) |
bot: documentation pass — editor-facing docs (data descriptions, module comments, template usage, Help rewrite) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly | <includeonly><div class="infobox" style="border:2px solid var(--infobox-border, #3a3c44);background:var(--infobox-bg, #1c1d22);color:var(--infobox-text, #e6e6e6);padding:0.5em;float:right;width:280px;"> | ||
{| style="width:100%;" | {| style="width:100%;" | ||
! colspan="2" style="{{#switch:{{{Tier|}}}|1=background:var(--tier-1-bg, #bbbbbb);color:#000000;|2=background:var(--tier-2-bg, #69c343);color:#000000;|3=background:var(--tier-3-bg, #e94040);color:#ffffff;|#default=background:var(--infobox-header-bg, # | ! colspan="2" style="{{#switch:{{{Tier|}}}|1=background:var(--tier-1-bg, #bbbbbb);color:#000000;|2=background:var(--tier-2-bg, #69c343);color:#000000;|3=background:var(--tier-3-bg, #e94040);color:#ffffff;|#default=background:var(--infobox-header-bg, #26272e);color:var(--infobox-header-fg, #f1e9d2);}}font-size:1.2em;text-align:center;" | {{{name|}}} | ||
|- | |- | ||
| colspan="2" style="text-align:center;" | {{#if:{{{icon|}}}|[[File:{{{icon}}}{{!}}96px{{!}}alt={{{name|}}}]]|—}} | | colspan="2" style="text-align:center;" | {{#if:{{{icon|}}}|[[File:{{{icon}}}{{!}}96px{{!}}alt={{{name|}}}]]|—}} | ||
| Line 88: | Line 21: | ||
{{#if:{{{desc|}}}|''{{{desc}}}''|}} | {{#if:{{{desc|}}}|''{{{desc}}}''|}} | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
== What this template does == | |||
Renders the infobox panel at the top right of every Passive page. You normally never call it by hand: each detail page calls <code><nowiki>{{#invoke:Passives|infobox|id=<slug>}}</nowiki></code>, and [[Module:Core]] computes the values from [[Data:Passives.json]] at render time, then passes them to this template as parameters. This template is presentation only — row layout, header color, em-dash fallbacks. To change a VALUE, edit the source Data page; to change WHICH fields are computed, edit Module:Core; to change how the box looks, edit here. | |||
== Parameters == | |||
* <code>name</code> — display name, shown in the colored header. | |||
* <code>id</code> — the game's internal id, shown small under the icon. | |||
* <code>icon</code> — <code>File:</code> image name for the entity's icon. | |||
* <code>Tier</code> | |||
* <code>Price</code> | |||
* <code>Stats</code> | |||
If you add or remove a row here, keep Module:Core's <code>INFOBOX_FIELD_ORDER.Passives</code> list in sync — that list decides which computed values get passed in. | |||
== Row shape == | |||
Every body row follows this exact shape (keep it when adding rows): | |||
<pre> | |||
|- | |||
! Label | |||
| {{#if:{{{Label|}}}|{{{Label}}}|—}} | |||
</pre> | |||
The row markers (<code>|-</code>, <code>!</code>, <code>|</code>) stay OUTSIDE the <code>#if</code>; only the value is conditional. Missing data then shows an em-dash instead of breaking the table layout. | |||
== Styling == | |||
Colors come from the site theme tokens (<code>var(--infobox-*, fallback)</code> — defined in [[MediaWiki:Common.css]], with inline fallbacks so the box renders correctly even without site CSS). | |||
</noinclude> | </noinclude> | ||
Latest revision as of 16:04, 10 June 2026
What this template does
Renders the infobox panel at the top right of every Passive page. You normally never call it by hand: each detail page calls {{#invoke:Passives|infobox|id=<slug>}}, and Module:Core computes the values from Data:Passives.json at render time, then passes them to this template as parameters. This template is presentation only — row layout, header color, em-dash fallbacks. To change a VALUE, edit the source Data page; to change WHICH fields are computed, edit Module:Core; to change how the box looks, edit here.
Parameters
name— display name, shown in the colored header.id— the game's internal id, shown small under the icon.icon—File:image name for the entity's icon.TierPriceStats
If you add or remove a row here, keep Module:Core's INFOBOX_FIELD_ORDER.Passives list in sync — that list decides which computed values get passed in.
Row shape
Every body row follows this exact shape (keep it when adding rows):
|-
! Label
| {{#if:{{{Label|}}}|{{{Label}}}|—}}
The row markers (|-, !, |) stay OUTSIDE the #if; only the value is conditional. Missing data then shows an em-dash instead of breaking the table layout.
Styling
Colors come from the site theme tokens (var(--infobox-*, fallback) — defined in MediaWiki:Common.css, with inline fallbacks so the box renders correctly even without site CSS).