Actions

Template

Difference between revisions of "Timelinerow"

From NEC Retro

m (well this wont do)
(i think i figured it out)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>{{#vardefine:k|0}}{{incvar|tlcolor}}{{#if:{{{header|}}}|{{addvar|tlcolor|-1}}}}{{#ifeq:{{#var:tlcolor}}|8|{{#vardefine:tlcolor|1}}}}
 
<includeonly>{{#vardefine:k|0}}{{incvar|tlcolor}}{{#if:{{{header|}}}|{{addvar|tlcolor|-1}}}}{{#ifeq:{{#var:tlcolor}}|8|{{#vardefine:tlcolor|1}}}}
 
{{#vardefine:tlcolorx|{{#switch:{{#var:tlcolor}}
 
{{#vardefine:tlcolorx|{{#switch:{{#var:tlcolor}}
|1=colour-bg-red
+
|1=red
|2=colour-bg-orange
+
|2=orange
|3=colour-bg-yellow
+
|3=yellow
|4=colour-bg-green
+
|4=green
|5=colour-bg-cyan
+
|5=cyan
|6=colour-bg-blue
+
|6=blue
|7=colour-bg-magenta
+
|7=magenta
 
}}}}
 
}}}}
 
{{#fornumargs: i
 
{{#fornumargs: i
Line 22: Line 22:
 
{{#ifeq: {{#var:i}} | 0 | {{#ifexpr: {{#var:tlstart}} <> {{#var:vstart}} | colspan="{{#expr:{{#var:vstart}}-{{#var:tlstart}}}}" {{!}}  {{!}}{{!}} }} |  
 
{{#ifeq: {{#var:i}} | 0 | {{#ifexpr: {{#var:tlstart}} <> {{#var:vstart}} | colspan="{{#expr:{{#var:vstart}}-{{#var:tlstart}}}}" {{!}}  {{!}}{{!}} }} |  
 
{{#ifexpr: {{#var:vstart}}-{{#var:vprev}} > 1 | colspan="{{#expr:{{#var:vstart}}-{{#var:vprev}}-1}}" {{!}}  {{!}}{{!}} }}
 
{{#ifexpr: {{#var:vstart}}-{{#var:vprev}} > 1 | colspan="{{#expr:{{#var:vstart}}-{{#var:vprev}}-1}}" {{!}}  {{!}}{{!}} }}
}} style="border:1px solid grey; text-align:{{#if:{{{header|}}}|center; background:gainsboro; font-weight:bold|left}};" colspan="{{#expr:{{#var:vend}}-{{#var:vstart}}+1}}" {{!}} {{#var:val_{{#expr: ({{#var:i}}*3)+1 }}}} {{#ifexpr: {{#var:i}} < {{#expr:({{#var:k}}/3)-1}} | {{!}}{{!}} }}
+
}} style="border:1px solid grey; text-align:{{#if:{{{header|}}}|center; background:gainsboro; font-weight:bold|left;  background-color:{{WikiColour|BG|{{#var:tlcolorx}}}}}};" colspan="{{#expr:{{#var:vend}}-{{#var:vstart}}+1}}" {{!}} {{#var:val_{{#expr: ({{#var:i}}*3)+1 }}}} {{#ifexpr: {{#var:i}} < {{#expr:({{#var:k}}/3)-1}} | {{!}}{{!}} }}
 
}}
 
}}
 
{{!}}-style="font-size:12px;"</includeonly><noinclude>{{SegaRetroTemplate}}
 
{{!}}-style="font-size:12px;"</includeonly><noinclude>{{SegaRetroTemplate}}

Latest revision as of 18:37, 18 April 2024

Segaretro-round.svg This template has been manually copied from Sega Retro, specifically Template:Timelinerow
Technical restrictions prevent this template from being shared across multiple wikis. In the medium term, any changes should be made to the Sega Retro variant first, before manually copying the contents back here. As this is not an automatic process, this version of the template might also be out of date.

See Template:Timeline for usage.