Template:Perk: Difference between revisions
From MENACE Official Wiki
mNo edit summary |
use json to retrieve icon and description |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<div style="width: 33%; margin: 10px; border: 1px solid #ccc; border-radius: 5px; padding: 10px; 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: 50px; height: 50px; margin-right: 10px;">[[File:{{{ | <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; | }} | }}">{{{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;">{{{ | <div style="font-size: 1em;font-style: italic;margin-top: 5px;">{{#invoke:PerksData|getShortDescriptionByTitle|{{{title}}}}}</div> | ||
</div> | </div> | ||
</div> | </div> | ||
| Line 15: | Line 15: | ||
<pre> | <pre> | ||
{{Perk | {{Perk | ||
| | |title= High Value Target | ||
}} | }} | ||
</pre> | </pre> | ||
| Line 24: | Line 22: | ||
{{Perk | {{Perk | ||
| | |title= High Value Target | ||
}} | }} | ||
| Line 33: | Line 29: | ||
<pre> | <pre> | ||
{{Perk | {{Perk | ||
| | |title=High Value Target Icon | ||
|case=starting_perk | |case=starting_perk | ||
}} | }} | ||
| Line 43: | Line 37: | ||
{{Perk | {{Perk | ||
| | |title=High Value Target | ||
|case=starting_perk | |case=starting_perk | ||
}} | }} | ||
<br> | <br> | ||
[{{fullurl:{{ns:Template}}:{{PAGENAME}}}}?action=purge Click here to refresh the preview above] | [{{fullurl:{{ns:Template}}:{{PAGENAME}}}}?action=purge Click here to refresh the preview above] | ||
</noinclude> | </noinclude> | ||
Revision as of 15:21, 9 October 2025
Usage & preview
Type in this:
{{Perk
|title= High Value Target
}}
to see this:
[[File:|50px]]
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:|50px]]
HIGH VALUE TARGET


