Спорт-вики — википедия научного бодибилдинга

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

Материал из SportWiki энциклопедии
Перейти к: навигация, поиск
м (Ars переименовал страницу Шаблон:Progress в Шаблон:Progress bar без оставления перенаправления)
Строка 1: Строка 1:
<includeonly><div title="{{{title|{{{progression|<!--
+
<includeonly>{{
  -->{{#ifeq:{{{mode|}}}|value|{{{current|0}}}|<!--
+
#vardefine: lpbCurrent |
      -->{{#ifexpr:({{{current|0}}}-{{{min|0}}}&gt;=0) and ({{{max|100}}}-{{{min|0}}}&gt;0)|<!--
+
{{#ifexpr: {{{current|0}}} - {{{max|100}}} &gt; 0 |
        -->{{#expr:(({{{current|0}}}-{{{min|0}}})/({{{max|100}}}-{{{min|0}}}))*100 round 1}}%|0%}}}}}}} {{{desc|}}}}}}"
+
{{{max|100}}} |
                        style="background: {{{box-background|}}};
+
{{{current|0}}}
                                border: {{{box-border|0px solid black}}};
+
}}
                                margin: {{{box-margin|1px}}};
+
}}{{
                                padding: {{{box-padding|1px}}};
+
#vardefine: lpbProgression |
                                width: {{{box-width|100%}}};
+
{{{progression |
                                color: {{{text-color|#ffffff}}};
+
{{#ifexpr: ({{#var:lpbCurrent}} - {{{min|0}}} &gt;= 0) and ({{{max|100}}} - {{{min|0}}} &gt; 0) |
                                text-shadow: 1px 1px #000000;
+
{{#expr: (({{#var:lpbCurrent}} - {{{min|0}}}) / ({{{max|100}}} - {{{min|0}}})) * 100 round 1}}% |
                                font-size: {{{text-size|small}}};
+
0%
                                font-weight: {{{text-weight|bold}}};
+
}}
                                line-height: 1.25em;
+
}}}
                                {{{box-style|}}}"><!--
+
}}{{
                --><div style="margin: 0;
+
#vardefine: lpbTooltipDisplayMode |
                                padding:0;
+
{{{tooltip-display-mode |
                                position:relative;"><!--
+
{{#if: {{#var:pb-tooltip-display-mode}} |
                --><div style="margin: 0;
+
{{#var:pb-tooltip-display-mode}} |
                                padding: 0;
+
percentage
                                width: 100%;
+
}}
                                position: absolute;
+
}}}
                                top: 0;
+
}}{{
                                z-index: 1;
+
#vardefine: lpbTooltipText |
                                background: transparent;
+
{{#switch: {{#var:lpbTooltipDisplayMode}} |
                                -ms-linear-gradient(top, #4b4b4b 0%, #919191 45%, #aeaeae 50%, #939393 55%, #aaaaaa 100%);
+
percentage = {{formatnum:{{#var:lpbProgression}}}}&nbsp; |
                                linear-gradient(to bottom, #4b4b4b 0%, #919191 45%, #aeaeae 50%, #939393 55%, #aaaaaa 100%);
+
current    = {{formatnum:{{{current|0}}}}}&nbsp; |
                                border-radius: 5px;
+
remaining  = {{formatnum:{{#expr: {{{max|100}}} - {{{current|0}}}}}}}&nbsp; |
                                -webkit-border-radius: 5px;
+
ratio      = {{formatnum:{{{current|0}}}}} / {{formatnum:{{{max|100}}}}}&nbsp; |
                                -moz-border-radius: 5px;
+
}}{{{tooltip-text |
                                text-align: center;"><!--
+
{{#if: {{#var:pb-tooltip-text}} |
                -->{{{progression-text|{{{progression|<!--
+
{{#var:pb-tooltip-text}} |
                    -->{{#ifeq:{{{mode|}}}|value|{{{current|0}}}|<!--
+
}}
                    -->{{#ifexpr:({{{current|0}}}-{{{min|0}}}&gt;=0) and ({{{max|100}}}-{{{min|0}}}&gt;0)|<!--
+
}}}
                      -->{{#expr:(({{{current|0}}}-{{{min|0}}})/({{{max|100}}}-{{{min|0}}}))*100 round 1}}%|0%}}}}}}} <!--
+
}}{{
                          -->{{{desc|}}}}}}</div><!--
+
#vardefine: lpbBarDisplayMode |
                --><div style="margin: 0;
+
{{{bar-display-mode |
                                padding: 0;
+
{{#if: {{#var:pb-bar-display-mode}} |
                                width: {{{progression|<!--
+
{{#var:pb-bar-display-mode}} |
                                  -->{{#ifexpr:({{{current|0}}}-{{{min|0}}}&gt;=0) and ({{{max|100}}}-{{{min|0}}}&gt;0)|<!--
+
percentage
                                  -->{{#expr:(({{{current|0}}}-{{{min|0}}})/({{{max|100}}}-{{{min|0}}}))*100 round 1}}%|0%}}}}};
+
}}
                                background: {{{bar-background|transparent}}};
+
}}}
                                border-radius: 5px;
+
}}{{
                                -webkit-border-radius: 5px;
+
#vardefine: lpbBarText |
                                -moz-border-radius: 5px;
+
{{#switch: {{#var:lpbBarDisplayMode}} |
                                height: 1.25em;
+
percentage = {{formatnum:{{#var:lpbProgression}}}}&nbsp; |
                                {{{bar-style|}}}">&nbsp;</div></div></div></includeonly><noinclude>
+
current    = {{formatnum:{{{current|0}}}}}&nbsp; |
 +
remaining  = {{formatnum:{{#expr: {{{max|0}}} - {{{current|0}}}}}}}&nbsp; |
 +
ratio      = {{formatnum:{{{current|0}}}}} / {{formatnum:{{{max|100}}}}}&nbsp; |
 +
}}{{{bar-text |
 +
{{#if: {{#var:pb-bar-text}} |
 +
{{#var:pb-bar-text}} |
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbBarBackground |
 +
{{{bar-background |
 +
{{#if: {{#var:pb-bar-background}} |
 +
{{#var:pb-bar-background}} |
 +
#AAD5FF
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbBarCustomStyle |
 +
{{{bar-custom-style |
 +
{{#if: {{#var:pb-bar-custom-style}} |
 +
{{#var:pb-bar-custom-style}} |
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbBoxBackground |
 +
{{{box-background |
 +
{{#if: {{#var:pb-box-background}} |
 +
{{#var:pb-box-background}} |
 +
white
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbBoxBorder |
 +
{{{box-border |
 +
{{#if: {{#var:pb-box-border}} |
 +
{{#var:pb-box-border}} |
 +
1px solid black
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbBoxMargin |
 +
{{{box-margin |
 +
{{#if: {{#var:pb-box-margin}} |
 +
{{#var:pb-box-margin}} |
 +
1px
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbBoxPadding |
 +
{{{box-padding |
 +
{{#if: {{#var:pb-box-padding}} |
 +
{{#var:pb-box-padding}} |
 +
1px
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbBoxWidth |
 +
{{{box-width |
 +
{{#if: {{#var:pb-box-width}} |
 +
{{#var:pb-box-width}} |
 +
100%
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbBoxCustomStyle |
 +
{{{box-custom-style |
 +
{{#if: {{#var:pb-box-custom-style}} |
 +
{{#var:pb-box-custom-style}} |
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbTextColor |
 +
{{{text-color |
 +
{{#if: {{#var:pb-text-color}} |
 +
{{#var:pb-text-color}} |
 +
black
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbTextSize |
 +
{{{text-size |
 +
{{#if: {{#var:pb-text-size}} |
 +
{{#var:pb-text-size}} |
 +
small
 +
}}
 +
}}}
 +
}}{{
 +
#vardefine: lpbTextWeight |
 +
{{{text-weight |
 +
{{#if: {{#var:pb-text-weight}} |
 +
{{#var:pb-text-weight}} |
 +
bold
 +
}}
 +
}}}
 +
}}{{
 +
#if: {{{title|}}} | <span style="font-size:{{#var:lpbTextSize}};font-weight:{{#var:lpbTextWeight}}">{{{title|}}}</span> |
 +
}}<div role="progressbar" aria-valuemin="{{{min|0}}}" aria-valuemax="{{{max|100}}}" aria-valuenow="{{{current|{{{progression|0}}}}}}" aria-valuetext="{{#var:lpbBarText}}" title="{{#var:lpbTooltipText}}" style="background:{{#var:lpbBoxBackground}};border:{{#var:lpbBoxBorder}};margin:{{#var:lpbBoxMargin}};padding:{{#var:lpbBoxPadding}};width:{{#var:lpbBoxWidth}};color:{{#var:lpbTextColor}};font-size:{{#var:lpbTextSize}};font-weight:{{#var:lpbTextWeight}};line-height:1.25em;{{#var:lpbBoxCustomStyle}}"><div style="margin:0;padding:0;position:relative;"><div style="margin:0;padding:0;width:{{#var:lpbProgression}};background:{{#var:lpbBarBackground}};height:1.25em;{{#var:lpbBarCustomStyle}}">&nbsp;</div><div style="margin:0;padding:0;width:100%;position:absolute;top:0;z-index:1;background-color:transparent;text-align:center;">{{#var:lpbBarText}}</div></div></div></includeonly><noinclude>

Версия 11:23, 22 января 2017