Difference between revisions of "CompanyTimeline"

From Sega Retro

(Created page with "<includeonly>{{TODO}} Replacement for Template:Timeline. I might be able to automate the dates - won't that be fun. -~~~~ {{#vardefine:starttime|{{#time: U | {{{startdate...")
 
Line 8: Line 8:
 
{{#vardefine:count|0}}{{#vardefine:i|{{{startdate|}}}}}{{#while:
 
{{#vardefine:count|0}}{{#vardefine:i|{{{startdate|}}}}}{{#while:
 
| {{#ifexpr:{{#var:i}} < {{{enddate|}}}|true}}
 
| {{#ifexpr:{{#var:i}} < {{{enddate|}}}|true}}
| {{#vardefine:labeldate|{{#var:i}}-01-01}}
+
| {{#vardefine:labelstartdate|{{#var:i}}-01-01}}{{#vardefine:labelenddate|{{#var:i}}-06-01}}
{{#vardefine:pos|{{#expr:(({{#time: U |{{#var:labeldate}}}}-{{#var:starttime}}) / {{#var:totaltime}}) * 100}}}}
+
 
<div style="position:relative; left:{{#var:pos}}%; top:{{#expr:{{#var:count}}*2}}px; width:1%; height:2px; background-color:#0000FF; margin-top:-2px;"></div>{{incvar|i}}{{incvar|count}}
+
{{CompanyTimelineLine
 +
|startdate={{#var:labelstartdate}}
 +
|enddate={{#var:labelenddate}}
 +
|y={{#expr:{{#var:count}}*2}}
 +
}}
 +
 
 +
{{incvar|i}}{{incvar|count}}
 
}}{{clearvar|i}}</div>
 
}}{{clearvar|i}}</div>
  

Revision as of 16:29, 27 July 2022


Clock.svg
This task is unfinished
This is a wiki task that requires more thought or peer review. An important issue that needs to be solved, which will appear at the top of Sega Retro:Todo until this message is removed.

Replacement for Template:Timeline. I might be able to automate the dates - won't that be fun. -Black Squirrel (talk) 14:34, 27 July 2022 (EDT)