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:Scale row/doc"

From DFO World Wiki
Jump to: navigation, search
(Created page with "<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --> As used in {{tl|Horizontal timeline}}. ==Parameters== Set <code>to</code> and <code>from</code> to the start and end da...")
 
m
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
 
{{scale row|from=10|to=30}}
 
{{scale row|from=10|to=30}}
  
After substitution:
+
while <nowiki>{{scale row|from=10|to=30|increment=6}}</nowiki> gives:
  
<div name=line style="clear:both; width:99.3%; max-width:99.1%; border-top:0.1em solid black; height:1em;"></div line><div id=Scale style="width:100%; clear:both; position:relative; top:-1.4em; padding:0px; height:2.5em; left:-0.2em;"><div style="float:left; overflow:visible; width:{{#expr:abs(
+
{{scale row|from=10|to=30|increment=6}}
  99.100<!--IE can't handle 100%--> *
 
  (((10*10) mod ({{calculate increment|10|30}}*10))/10)
 
  / (10 - 30))
 
}}%;">&ensp;</div>{{#if:1030|{{for loop||0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30
 
| pv=loop
 
| pc1n=from|pc1v=10
 
| pc2n=to|pc2v=30
 
| pc3n=increment|pc3v={{calculate increment|10|30}}
 
| call=horizontal scale
 
}}|You need to specify <code>from=</code> and <code>to=</code> where you've used the template "Scale row".}}</div Scale>
 

Latest revision as of 10:32, 15 August 2018


As used in {{Horizontal timeline}}.

Parameters

Set to and from to the start and end dates of your timeline; the increment will be calculated automatically. You can override this using increment, but be sure to test its appearance at small screen sizes!

Example

{{scale row|from=10|to=30}} gives:

|
10
|
12
|
14
|
16
|
18
|
20
|
22
|
24
|
26
|
28
|
30

while {{scale row|from=10|to=30|increment=6}} gives:

|
10
|
16
|
22
|
28