Difference between revisions of "CompanyTimeline"
From Sega Retro
Line 4: | Line 4: | ||
{{#vardefine:starttime|{{#time: U | {{{startdate|0}}}-01-01}}}}{{#vardefine:totaltime|{{#expr:{{#time: U | {{{enddate|0}}}-01-01}} - {{#var:starttime}}}}}} | {{#vardefine:starttime|{{#time: U | {{{startdate|0}}}-01-01}}}}{{#vardefine:totaltime|{{#expr:{{#time: U | {{{enddate|0}}}-01-01}} - {{#var:starttime}}}}}} | ||
+ | {{#vardefine:height|{{#expr:({{{enddate|}}}-{{{startdate|}}})*2}}}} | ||
− | <div style="width:100%; background-color:#FF0000; padding:2px; line-height:0px; height:{{# | + | <div style="width:100%; background-color:#FF0000; padding:2px; line-height:0px; height:{{#var:height}}px"> |
{{#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:labelstartdate|{{#var:i}}-01-01}}{{#vardefine: | + | | {{#vardefine:labelstartdate|{{#var:i}}-01-01}}{{#vardefine:labelx|{{#expr:(({{#time: U |{{#var:labelstartdate}}}}-{{#var:starttime}}) / {{#var:totaltime}}) * 100}}}} |
− | + | <div style="position:relative; left:{{#var:labelx}}%; height:{{#var:height}}px; width:0px; border-left:1px solid #00FF00; {{#ifexpr:{{#var:count}}>0|margin-top:-80px;}}"></div> | |
− | {{ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
{{incvar|i}}{{incvar|count}} | {{incvar|i}}{{incvar|count}} | ||
− | }}{{clearvar|i}}</div> | + | }}{{clearvar|i}}{{{1|}}} |
+ | </div> | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
− | {{CompanyTimeline | + | {{CompanyTimeline| |
+ | {{CompanyTimelineLine | ||
+ | |startdate=1984-01-01 | ||
+ | |enddate=1986-01-01 | ||
+ | |y=0 | ||
+ | }} | ||
+ | {{CompanyTimelineLine | ||
+ | |startdate=1984-01-01 | ||
+ | |enddate=1986-01-01 | ||
+ | |y=20 | ||
+ | }} | ||
| startdate=1983 | | startdate=1983 | ||
| enddate=2023 | | enddate=2023 |
Revision as of 15:48, 27 July 2022
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)