Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Composition bar: Difference between revisions

Template page
Antonfr (talk | contribs)
No edit summary
Antonfr (talk | contribs)
No edit summary
Line 1: Line 1:
<div style="border: {{{border-width|1px}}} solid {{{border-color|#000000}}}; background-color: {{{background-color|#f0f0f0}}}; width: {{{width|100}}}px; height: 1.5em; position:relative; top: -{{{border-width|1px}}}"><div style="position: absolute; background-color:{{#if:{{both|{{{4|}}}|{{{5|}}}}} |rgb({{#expr:255*{{{3|255}}}}},{{#expr:255*{{{4|0}}}}},{{#expr:255*{{{5|0}}}}}) |{{{hex|{{{3|#CCCCCC}}}}}} }}; width: {{#expr:floor({{{width|100}}}*{{{1|{{#expr:{{{width|100}}}/2}}}}}/{{{2|{{{width|100}}}}}})}}px; height: 1.5em;"></div><div style="position: absolute; font-weight: bold; width: {{{width|100}}}px; line-height: 1.5em; text-align: center; z-index: 5; color: {{{color|#000}}};">{{formatnum:{{{1|50}}}}}&nbsp;/&nbsp;{{formatnum:{{{2|100}}}}}{{#if:{{{per|}}}|&nbsp;&nbsp;&nbsp;<span style="{{{perstyle|}}}">({{#expr:(({{{1|50}}}/{{{2|100}}})*100)round 0}}&nbsp;%)</span>}}<noinclude>  
<div style="
</noinclude>
  border: 1px solid #a2a9b1;
  background-color: #eaecf0;
  width: {{{width|180}}}px;
  height: 1.6em;
  position: relative;
  margin: 4px 0;
">
 
  <!-- Filled portion -->
  <div style="
    background-color: #a0002a;
    width: {{#expr: floor(({{{1|0}}} / {{{2|1}}}) * {{{width|180}}}) }}px;
    height: 100%;
  "></div>
 
  <!-- Text -->
  <div style="
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    line-height: 1.6em;
    text-align: center;
    font-weight: bold;
    color: #000;
  ">
    {{formatnum:{{{1|0}}}}} / {{formatnum:{{{2|0}}}}}
  </div>
 
</div>

Revision as of 23:37, 31 December 2025

   0 / 0