Template:AMP/Component: Difference between revisions

Template page
(new component display)
 
(hide percent if not provided)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="display: flex; align-items: center; gap: 10px;">
<div style="display: flex; align-items: center; gap: 10px;">
<div style="width: 64px; height: 64px">
<div style="width: 64px; height: 64px">
{{ifexist: File:Icon {{{name}}}.png
{{#ifexist: File:Icon {{{name}}}.png
|[[File:Icon {{{name}}}.png|border|frameless|64x64px]]
|<p style="margin: 0px;">[[File:Icon {{{name}}}.png|border|frameless|64x64px]]</p>
}}
}}
</div>
</div>
<div>
<div style="display: flex; flex-direction: column; align-items: middle;">
<p style="margin: 0px;"><big>{{{name}}}</big></p>
<p style="margin: 0px;">{{{name}}}</p>
<p style="margin: 0px;">'''{{{pct}}}%'''</p>
{{#if: {{{pct|}}}|<p style="margin: 0px;"><small>'''{{{pct}}}%''' {{#ifeq: {{{pct}}}|3
| → <span style="color: #AAFFAA;">6%</span>
|{{#ifeq: {{{pct}}}|6
| → <span style="color: #AAFFAA;">10%</span>
|{{#ifeq: {{{pct}}}|10
| → <span style="color: #AAFFAA;">16%</span>
|{{#ifeq: {{{pct}}}|15
| → <span style="color: #AAFFAA;">20%</span>
|{{#ifeq: {{{pct}}}|20
| → 20%
|{{#ifeq: {{{pct}}}|32
| → <span style="color: #FFAAAA;">27%</span>
|{{#ifeq: {{{pct}}}|38
| → <span style="color: #FFAAAA;">32%</span>
}}}}}}}}}}}}}}</small></p>}}
</div>
</div>
</div>
</div>

Latest revision as of 16:59, 3 August 2024

{{{name}}}