Template:CalCell: Difference between revisions

From Twilight Heroes Wiki
Jump to navigation Jump to search
Dfmchfhf (talk | contribs)
No edit summary
Dfmchfhf (talk | contribs)
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 22: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|10|June 2025||black|blue|lime|red}}
|{{CalCell|11|June 2025|Description|black|blue|lime|red}}
|{{CalCell|12|June 2025||black|blue|lime|red}}
|{{CalCell|13|June 2025||black|blue|red|lime}}
|{{CalCell|14|June 2025|Description<br>with line break|black|bluelime|red}}
|}
returns:

10
11
Description
12
Today
13
14
Description
with line break