Difference between revisions of "Template:Calendar"
From Twilight Heroes Wiki
m |
m |
||
Line 13: | Line 13: | ||
{{#vardefine:cb|{{#switch:{{{bg|?}}}||?=white|#default={{{bg}}}}}}} | {{#vardefine:cb|{{#switch:{{{bg|?}}}||?=white|#default={{{bg}}}}}}} | ||
{{#vardefine:ct|{{#switch:{{{tx|?}}}||?=black|#default={{{tx}}}}}}} | {{#vardefine:ct|{{#switch:{{{tx|?}}}||?=black|#default={{{tx}}}}}}} | ||
+ | {{#vardefine:n|{{#expr:-{{#var:st}}+2}}}} | ||
+ | {{#vardefine:my|{{{month}}} {{{year}}}}} | ||
<!-- Actual thing --> | <!-- Actual thing --> | ||
Line 18: | Line 20: | ||
{| cellpadding="5" cellspacing="1" border="1" align="center" style="text-align:center" | {| cellpadding="5" cellspacing="1" border="1" align="center" style="text-align:center" | ||
|- | |- | ||
− | ! colspan="6" style="background:{{#var:mb}}; color:{{#var:mt}}" | {{ | + | ! colspan="6" style="background:{{#var:mb}}; color:{{#var:mt}}" | {{#var:my}} |
|- style="background:{{#var:db}}; color:{{#var:dt}}" | |- style="background:{{#var:db}}; color:{{#var:dt}}" | ||
! style="width:75px" | Sunday | ! style="width:75px" | Sunday | ||
Line 27: | Line 29: | ||
! style="width:75px" | Frayday | ! style="width:75px" | Frayday | ||
|- | |- | ||
− | {{# | + | |{{#ifexpr:{{#var:n}} > 0 | {{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sn}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}} |{{CalCell||{{#var:my}}||{{#var:sn}} |{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{var:n}}+1}}}} |
+ | |{{#ifexpr:{{#var:n}} > 0 | {{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sn}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}} |{{CalCell||{{#var:my}}||{{#var:sn}} |{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{var:n}}+1}}}} | ||
+ | |{{#ifexpr:{{#var:n}} > 0 | {{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sn}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}} |{{CalCell||{{#var:my}}||{{#var:sn}} |{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{var:n}}+1}}}} | ||
+ | |{{#ifexpr:{{#var:n}} > 0 | {{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sn}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}} |{{CalCell||{{#var:my}}||{{#var:sn}} |{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{var:n}}+1}}}} | ||
+ | |{{#ifexpr:{{#var:n}} > 0 | {{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sn}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}} |{{CalCell||{{#var:my}}||{{#var:sn}} |{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sn}}|{{#var:st}}|{{#var:fcb}}{{#vardefine:n|{{#expr:{{var:n}}+1}}}} | ||
|}</includeonly> | |}</includeonly> |