Difference between revisions of "Template:CalCell"

From Twilight Heroes Wiki
Jump to: navigation, search
m (Changed demo colours)
Line 14: Line 14:
 
==Sample==
 
==Sample==
 
<nowiki>{|-</nowiki><br><nowiki>
 
<nowiki>{|-</nowiki><br><nowiki>
|{{CalCell|</nowiki>{{#time: j| {{THDay}} -2 day}}|{{#time: F Y|{{THDay}} -2 day}}<nowiki>||black|white|lime|red}}</nowiki><br><nowiki>
+
|{{CalCell|</nowiki>{{#time: j| {{THDay}} -2 day}}|{{#time: F Y|{{THDay}} -2 day}}<nowiki>||black|blue|lime|red}}</nowiki><br><nowiki>
|{{CalCell|</nowiki>{{#time: j| {{THDay}} -1 day}}|{{#time: F Y|{{THDay}} -1 day}}<nowiki>|Description|black|white|lime|red}}</nowiki><br><nowiki>
+
|{{CalCell|</nowiki>{{#time: j| {{THDay}} -1 day}}|{{#time: F Y|{{THDay}} -1 day}}<nowiki>|Description|black|blue|lime|red}}</nowiki><br><nowiki>
|{{CalCell|</nowiki>{{#time: j| {{THDay}}}}|{{#time: F Y|{{THDay}}}}<nowiki>||black|white|lime|red}}</nowiki><br><nowiki>
+
|{{CalCell|</nowiki>{{#time: j| {{THDay}}}}|{{#time: F Y|{{THDay}}}}<nowiki>||black|blue|lime|red}}</nowiki><br><nowiki>
|{{CalCell|</nowiki>{{#time: j| {{THDay}} +1 day}}|{{#time: F Y|{{THDay}} +1 day}}<nowiki>||black|white|red|lime}}</nowiki><br><nowiki>
+
|{{CalCell|</nowiki>{{#time: j| {{THDay}} +1 day}}|{{#time: F Y|{{THDay}} +1 day}}<nowiki>||black|blue|red|lime}}</nowiki><br><nowiki>
|{{CalCell|</nowiki>{{#time: j| {{THDay}} +2 day}}|{{#time: F Y|{{THDay}} +2 day}}<nowiki>|Description<br>with line break|black|white|lime|red}}</nowiki><br><nowiki>
+
|{{CalCell|</nowiki>{{#time: j| {{THDay}} +2 day}}|{{#time: F Y|{{THDay}} +2 day}}<nowiki>|Description<br>with line break|black|bluelime|red}}</nowiki><br><nowiki>
 
|}</nowiki><br>
 
|}</nowiki><br>
 
returns:<br>
 
returns:<br>
 
{|-
 
{|-
|{{CalCell|{{#time: j| {{THDay}} -2 day}}|{{#time: F Y|{{THDay}} -2 day}}||black|white|lime|red}}
+
|{{CalCell|{{#time: j| {{THDay}} -2 day}}|{{#time: F Y|{{THDay}} -2 day}}||black|blue|lime|red}}
|{{CalCell|{{#time: j| {{THDay}} -1 day}}|{{#time: F Y|{{THDay}} -1 day}}|Description|black|white|lime|red}}
+
|{{CalCell|{{#time: j| {{THDay}} -1 day}}|{{#time: F Y|{{THDay}} -1 day}}|Description|black|blue|lime|red}}
|{{CalCell|{{#time: j| {{THDay}}}}|{{#time: F Y|{{THDay}}}}|Today|black|white|lime|red}}
+
|{{CalCell|{{#time: j| {{THDay}}}}|{{#time: F Y|{{THDay}}}}|Today|black|blue|lime|red}}
|{{CalCell|{{#time: j| {{THDay}} +1 day}}|{{#time: F Y|{{THDay}} +1 day}}||black|white|red|lime}}
+
|{{CalCell|{{#time: j| {{THDay}} +1 day}}|{{#time: F Y|{{THDay}} +1 day}}||black|blue|red|lime}}
|{{CalCell|{{#time: j| {{THDay}} +2 day}}|{{#time: F Y|{{THDay}} +2 day}}|Description<br>with line break|black|white|lime|red}}
+
|{{CalCell|{{#time: j| {{THDay}} +2 day}}|{{#time: F Y|{{THDay}} +2 day}}|Description<br>with line break|black|blue|lime|red}}
 
|}
 
|}
 
</noinclude>
 
</noinclude>

Revision as of 14:36, 30 November 2008

Usage

This template formats a cell.
Syntax:
{{CalCell|Day|Month Year|Description|DayBorder|DayText|Background|TextColor}}
Day: The number of the day
Month Year: The month and year; the first letter of the month should be capitalised.
Description: Content of the cell
DayText: The colour of the cell text when it is that date
DayBorder: The border of the cell when it is that date
Background: The colour of the cell
TextColor: The colour of the text, normally

Sample

{|-
|{{CalCell|22|November 2024||black|blue|lime|red}}
|{{CalCell|23|November 2024|Description|black|blue|lime|red}}
|{{CalCell|24|November 2024||black|blue|lime|red}}
|{{CalCell|25|November 2024||black|blue|red|lime}}
|{{CalCell|26|November 2024|Description<br>with line break|black|bluelime|red}}
|}
returns:

22
23
Description
24
Today
25
26
Description
with line break