Template:Perk: Difference between revisions

From MENACE Official Wiki
use json to retrieve icon and description
mNo edit summary
Line 1: Line 1:
<includeonly>
<includeonly><div style="display: inline-block; width: 30%; margin: 10px; border: 1px solid #ccc;  border-radius: 5px; padding: 5px 5px 10px 5px; text-align: left;">
        <div style="width: 33%; margin: 10px; border: 1px solid #ccc;  border-radius: 5px; padding: 10px; text-align: left;">
<div style="float: left; width: 90px; height: 100px; margin: 0px 10px 0px 0px;">[[File:{{#invoke:PerksData|getIconByTitle|{{{title}}}}}]]</div>
            <div style="float: left; width: 50px; height: 50px; margin-right: 10px;">[[File:{{#invoke:PerksData|getIconByTitle|{{{title}}}}}|50px]]</div>
<div style="flex: 1;">
            <div style="flex: 1;">
<div style="font-weight: bold; font-size: 1.2em; {{#if: {{{case|}}} | {{#ifeq: {{{case}}} | starting_perk | color: #c7aa3f; | }} | }}">{{#invoke:StringUtils|toUpperCase|{{{title}}}}}</div>
                <div style="font-weight: bold; font-size: 1.2em; {{#if: {{{case|}}} | {{#ifeq: {{{case}}} | starting_perk | color: #c7aa3f; | }} | }}">{{#invoke:StringUtils|toUpperCase|{{{title}}}}}</div>
<div style="font-size: 1em; font-style: italic;margin-top: 5px;">{{#invoke:PerksData|getShortDescriptionByTitle|{{{title}}}}}</div></div></div></includeonly><noinclude>
                <div style="font-size: 1em;font-style: italic;margin-top: 5px;">{{#invoke:PerksData|getShortDescriptionByTitle|{{{title}}}}}</div>
            </div>
        </div>
</includeonly>
 
<noinclude>
== Usage & preview ==
== Usage & preview ==
Type in this:
Type in this:

Revision as of 09:24, 10 October 2025

Usage & preview

Type in this:

{{Perk
|title= High Value Target
}}

to see this:

[[File:]]
HIGH VALUE TARGET

Or add the case = starting_perk to change the color of the title:

{{Perk
|title=High Value Target Icon
|case=starting_perk
}}

to see this:

[[File:]]
HIGH VALUE TARGET


Click here to refresh the preview above