Template:Iconbar: Difference between revisions

m 1 revision
 
Replaced content with "<includeonly>{{#invoke: iconbar | bar | min = {{{total|}}} }}</includeonly><noinclude> {{Documentation}} <!-- Put categories/interwiki on the documentation page --> </noin..."
 
Line 1: Line 1:
<includeonly>{{
<includeonly>{{#invoke: iconbar | bar | min = {{{total|}}} }}</includeonly><noinclude>
  #if: {{{value|}}}
{{Documentation}}
  | {{
<!-- Put categories/interwiki on the documentation page -->
    #iferror: {{ #expr: {{{value}}} }}
</noinclude>
    | <strong class="error">Error: the value must be a number!</strong><!-- any ideas for a better error message? -->
    | <span class="nowrap" title="{{ #if: {{{title|}}} | {{{title}}} | {{ #expr: floor( abs( {{{value}}} ) ) }} }}">{{
      #ifeq: {{ #expr: floor( abs( {{{value}}} ) ) }} | 0<!-- empty bar -->
      | {{
        #if: {{{empty|}}}
        | [[File:{{{empty}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]]
      }}
      | {{
        #if: {{{reverse|}}}<!-- reversed bar, if we have an odd number of units -->
        | {{
          #iferror: {{ #expr: {{{total}}} }} || {{
            #ifexpr: {{{total}}} - {{{value}}} >= 1 | {{
              padright:
              | {{
                #expr: floor( abs( {{{total}}} - {{{value}}} ) / 2 ) * {{ #len: [[File:{{{empty}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]] }}
              }}
              | [[File:{{{empty}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]]
            }}
          }}
        }}{{
          #ifexpr: floor( abs( {{{value}}} ) ) mod 2 = 1
          | [[File:{{{half}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]]
        }}
      }}{{<!--
              here be magic
              attribution: this is adapted from [[wikia:c:yugioh:Template:Repeat]] (a concept by others that I spun out and perfected =D )
        -->
        padleft:
        | {{
          #expr: floor( abs( {{{value}}} ) / 2 ) * {{ #len: [[File:{{{full}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]] }}
        }}
        | [[File:{{{full}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]]
      }}{{
        #if: {{{reverse|}}}<!-- non-reversed bar, if we have an odd number of units -->
        || {{
          #ifexpr: floor( abs( {{{value}}} ) ) mod 2 = 1
          | [[File:{{{half}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]]
        }}{{
          #iferror: {{ #expr: {{{total}}} }} || {{
            #ifexpr: {{{total}}} - {{{value}}} >= 1 | {{
              padleft:
              | {{
                #expr: floor( abs( {{{total}}} - {{{value}}} ) / 2 ) * {{ #len: [[File:{{{empty}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]] }}
              }}
              | [[File:{{{empty}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]]
            }}
          }}
        }}
      }}
    }}</span>
  }}
  | [[File:{{{empty}}}{{ #if: {{{size|}}} | {{!}}{{{size}}}{{ #iferror: {{ #expr: {{{size}}} }} || px }} }}]]
}}</includeonly><noinclude>
{{/doc}}
 
[[Category:Image templates|I]]

Latest revision as of 13:33, 3 August 2015

Lua error: callParserFunction: function "#dplvar" was not found.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis