Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!

Difference between revisions of "Template:Horizontal scale"

From DFO World Wiki
Jump to: navigation, search
(Created page with "<noinclude>{{documentation}}</noinclude><includeonly>{{#ifeq:{{#expr:{{{increment}}}*0}}|0|{{#ifexpr: {{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|increment=...")
 
m (Protected "Template:Horizontal scale": Don't change the algorithm ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{documentation}}</noinclude><includeonly>{{#ifeq:{{#expr:{{{increment}}}*0}}|0|{{#ifexpr:
+
<noinclude>{{documentation}}
  {{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|increment={{{increment}}}|loop={{{loop}}} }}
+
</noinclude><includeonly>{{#ifeq:{{#expr:{{{increment}}}*0}}|0|{{#ifexpr:
 +
  {{Horizontal scale/Current Number|from={{{from}}}|to={{{to}}}|increment={{{increment}}}|loop={{{loop}}} }}
 
  <= {{{to}}} - {{{increment}}}|<!-- Print all but last label in this fashion:
 
  <= {{{to}}} - {{{increment}}}|<!-- Print all but last label in this fashion:
 
.if so, then--><div style="float:left; overflow:visible; width:{{#expr:  
 
.if so, then--><div style="float:left; overflow:visible; width:{{#expr:  
Line 14: Line 15:
 
   )
 
   )
 
)
 
)
}}%;">{{!}}<div name=Number style="font-size:86%; position:relative; left:-1.8em; width:3.6em; overflow:visible; text-align:center">{{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|increment={{{increment}}}|loop={{{loop}}} }}</div></div>|<!--
+
}}%;">{{!}}<div name=Number style="font-size:86%; position:relative; left:-1.8em; width:3.6em; overflow:visible; text-align:center">{{Horizontal scale/Current Number|from={{{from}}}|to={{{to}}}|increment={{{increment}}}|loop={{{loop}}} }}</div></div>|<!--
 
.else-->{{#ifexpr:
 
.else-->{{#ifexpr:
  {{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|increment={{{increment}}}|loop={{{loop}}} }}
+
  {{Horizontal scale/Current Number|from={{{from}}}|to={{{to}}}|increment={{{increment}}}|loop={{{loop}}} }}
 
  <= {{{to}}}|<!--
 
  <= {{{to}}}|<!--
.Last tick only --><div style="float:left; overflow:visible; width:0;">{{!}}<div name=Number style="font-size:86%; position:relative; left:-2em; width:4em; text-align:center">{{Horizontal scale/Current number|from={{{from}}}|to={{{to}}}|increment={{{increment}}}|loop={{{loop}}} }}</div></div>}}
+
.Last tick only --><div style="float:left; overflow:visible; width:0;">{{!}}<div name=Number style="font-size:86%; position:relative; left:-2em; width:4em; text-align:center">{{Horizontal scale/Current Number|from={{{from}}}|to={{{to}}}|increment={{{increment}}}|loop={{{loop}}} }}</div></div>}}
 
}}|<br>Please delete the line <code>increment=</code>. It's preventing the template from working.}}</includeonly>
 
}}|<br>Please delete the line <code>increment=</code>. It's preventing the template from working.}}</includeonly>

Latest revision as of 10:54, 15 August 2018

Template Documentation view

As used in {{Horizontal timeline}}.

Example

{{Horizontal scale
 |from=1
 |to=100
 |increment=1
 |loop=5
}}

produces

|
6