틀:Progress bar: 두 판 사이의 차이

imported>R'n'B
Add optional "total" parameter to calculate percentage on the fly
imported>TheGoodAndHolyLord
Added condition to prevent bar from displaying more than 100% width
 
(사용자 7명의 중간 판 13개는 보이지 않습니다)
1번째 줄: 1번째 줄:
<div style="width:{{{width|75%}}}; margin:auto; text-align:center;">
<div style="
<p><big>'''<!--
  width:{{{width|75%}}};
-->{{#if:{{{total|}}}<!--
{{#ifeq: {{{center|yes}}} | yes |
   -->|{{#expr:( {{{1|0}}} / {{{total}}} ) * 100 round 1}}<!--
  margin:auto;
   -->|{{{1|<noinclude>2</noinclude>0}}}<!--
  text-align:center;}}">
-->}}%'''</big> {{{text|completed <small>(estimate)</small>}}}</p>
{{#ifeq: {{{header|yes}}} | yes
<p style="border:1px solid black; padding:1px; overflow:hidden;"><span style="width:{{{1|<noinclude>2</noinclude>0}}}%; height:{{{height|2}}}px; background:#7fff00; float:left;">&nbsp;</span><span style="width:{{#expr: 100-{{{1|<noinclude>2</noinclude>0}}}}}%; height:{{{height|2}}}px; background:#ff7f50; float:left;">&nbsp;</span></p>
| <p>
   {{Big|1=
  '''{{#expr: ( {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}}) * 100 round 1}}%'''
   }}
  {{{text|completed <small>(estimate)</small>}}}
  </p>
}}
<p style="border:{{{border|1px solid #c8ccd1}}}; padding:{{{padding|1px}}}; overflow:hidden;">
  <span style=" <!-- if percentage is higher than 100%, show all green bar -->
    width: {{#ifexpr: {{#expr:{{{1|0}}}/{{{total|100}}}}}>1 | 100 | {{#expr: {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}}}%;
    height: {{{height|2}}}px;
    background:{{{color1|#00af32}}};
    float:left;
    ">&nbsp;</span>
  <span style=" <!-- if percentage is higher than 100%, show no grey bar -->
    width: {{#ifexpr: {{#expr:{{{1|0}}}/{{{total|100}}}}}>1 | 0 | {{#expr: 100 - {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}}}%;
    height: {{{height|2}}}px;
    background:{{{color2|#eaecf0}}};
    float:left;
    ">&nbsp;</span>
</p>
</div><noinclude>{{Documentation}}</noinclude>
</div><noinclude>{{Documentation}}</noinclude>

2021년 5월 19일 (수) 02:14 기준 최신판

20% completed (estimate)

   

모듈:TNT 158번째 줄에서 Lua 오류: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab.

최근 바뀜

더 보기