Шаблон:Progression: различия между версиями

Материал из Куклопедии
Нет описания правки
Нет описания правки
 
Строка 1: Строка 1:
<includeonly>{{#vardefine: %
<div style="
| {{#ifexpr: {{{1|0}}} >= {{{2|0}}} | 100 | {{#expr: 100 * {{{1|0}}} / {{{2|0}}} round 2 }} }}%
  width:{{{width|75%}}};
}}<div style="margin: 0 auto; width: {{#if: {{{width|}}} | {{{width}}} | 50% }}; text-align: center; {{{style|}}}">
{{#ifeq: {{{center|yes}}} | yes |
{{#if: {{{notext|}}}
  margin:auto;
|
  text-align:center;}}">
| <p style="margin: 0; {{{textstyle|}}}">{{
{{#ifeq: {{{header|yes}}} | yes
   #if: {{{text|}}}
| <p>
  | {{#replace: {{#replace: {{#replace: {{{text}}} | $1 | {{{1|0}}} }} | $2 | {{{2|0}}} }} | $% | {{#var: % }} }}
   '''{{#expr: ( {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}}) * 100 round 1}}%'''
  | {{{1|0}}} of {{{2|0}}} {{#if: {{{type|}}} | {{{type}}} | pages }} have been completed
  {{{text|завершено <small>}}}
   }}</p>
   </p>
}}
}}
<div style="border: 1px solid #808080; background-color: #E2E2E2; padding: 1px; {{{barstyle|}}}" title="{{#var: % }}">
<p style="border:{{{border|1px solid #c8ccd1}}}; padding:{{{padding|1px}}}; overflow:hidden;">
<div style="background-color: #5FDB00; height: 6px; width: {{#var: % }}; {{{completedstyle|}}}"><br></div>
  <span style="
</div>
    width: {{#expr: {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%;
</div></includeonly><noinclude>
    height: {{{height|2}}}px;
    background:{{{color1|#00af32}}};
    float:left;
    ">&nbsp;</span>
  <span style="
    width:{{#expr: 100 - {{{1|<noinclude>2</noinclude>0}}} / {{{total|100}}} * 100}}%;
    height:{{{height|2}}}px;
    background:{{{color2|#eaecf0}}};
    float:left;
    ">&nbsp;</span>

Текущая версия от 19:07, 1 марта 2020

{{#ifeq: yes | yes

|

{{#expr: ( 20 / 100) * 100 round 1}}% завершено

}}