Difference between revisions of "Template:Calendar"
From Twilight Heroes Wiki
(Testing) |
m (Learned a new trick to avoid whitespace) |
||
(27 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
− | <!-- Variable definitions --> | + | <!-- Variable definitions -->{{ |
− | {{#vardefine: | + | #vardefine:sr|{{#switch:{{{start|?}}}||?=1|#default={{{start}}}}}}}{{ |
− | {{#vardefine:len|{{#switch:{{{mlen|?}}}||?=31|#default={{{mlen}}}}}}} | + | #vardefine:len|{{#switch:{{{mlen|?}}}||?=31|#default={{{mlen}}}}}}}{{ |
− | {{#vardefine:mb|{{#switch:{{{mbg|?}}}||?=white|#default={{{mbg}}}}}}} | + | #vardefine:mb|{{#switch:{{{mbg|?}}}||?=white|#default={{{mbg}}}}}}}{{ |
− | {{#vardefine:mt|{{#switch:{{{mtx|?}}}||?=black|#default={{{mtx}}}}}}} | + | #vardefine:mt|{{#switch:{{{mtx|?}}}||?=black|#default={{{mtx}}}}}}}{{ |
− | {{#vardefine:db|{{#switch:{{{dbg|?}}}||?=white|#default={{{dbg}}}}}}} | + | #vardefine:db|{{#switch:{{{dbg|?}}}||?=white|#default={{{dbg}}}}}}}{{ |
− | {{#vardefine:dt|{{#switch:{{{dtx|?}}}||?= | + | #vardefine:dt|{{#switch:{{{dtx|?}}}||?=black|#default={{{dtx}}}}}}} |
− | {{#vardefine:fb|{{#switch:{{{fbg|?}}}||?=white|#default={{{fbg}}}}}}} | + | {{#vardefine:fb|{{#switch:{{{fbg|?}}}||?=white|#default={{{fbg}}}}}}}{{ |
− | {{#vardefine:ft|{{#switch:{{{ftx|?}}}||?= | + | #vardefine:ft|{{#switch:{{{ftx|?}}}||?=black|#default={{{ftx}}}}}}}{{ |
− | {{#vardefine:sb|{{#switch:{{{sbg|?}}}||?=white|#default={{{sbg}}}}}}} | + | #vardefine:sb|{{#switch:{{{sbg|?}}}||?=white|#default={{{sbg}}}}}}}{{ |
− | {{#vardefine:st|{{#switch:{{{stx|?}}}||?= | + | #vardefine:st|{{#switch:{{{stx|?}}}||?=black|#default={{{stx}}}}}}}{{ |
− | {{#vardefine:cb|{{#switch:{{{bg|?}}}||?=white|#default={{{bg}}}}}}} | + | #vardefine:cb|{{#switch:{{{bg|?}}}||?=white|#default={{{bg}}}}}}}{{ |
− | {{#vardefine:ct|{{#switch:{{{tx|?}}}||?= | + | #vardefine:ct|{{#switch:{{{tx|?}}}||?=black|#default={{{tx}}}}}}}{{ |
− | + | #vardefine:n|{{#expr:-{{#var:sr}}+2}}}}{{#vardefine:my|{{{month}}} {{{year}}}}} | |
<!-- Actual thing --> | <!-- Actual thing --> | ||
− | |||
{| 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 | + | |- style="background:{{#var:db}}; color:{{#var:dt}}" |
! style="width:75px" | Sunday | ! style="width:75px" | Sunday | ||
! style="width:75px" | Moonday | ! style="width:75px" | Moonday | ||
Line 27: | Line 26: | ||
! style="width:75px" | Frayday | ! style="width:75px" | Frayday | ||
|- | |- | ||
− | {{# | + | |{{CalCell|{{#ifexpr:{{#var:n}}>0|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} |
− | |}</includeonly> | + | |{{CalCell|{{#ifexpr:{{#var:n}}>0|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} |
+ | |{{CalCell|{{#ifexpr:{{#var:n}}>0|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}>0|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}>0|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:fb}}|{{#var:ft}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |- | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:fb}}|{{#var:ft}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |- | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:fb}}|{{#var:ft}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |- | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:fb}}|{{#var:ft}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |- | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#var:n}}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:fb}}|{{#var:ft}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |- | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:cb}}|{{#var:ct}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |{{CalCell|{{#ifexpr:{{#var:n}}<={{#var:len}}|{{#var:n}}| }}|{{#var:my}}||{{#var:sb}}|{{#var:st}}|{{#var:fb}}|{{#var:ft}}}}{{#vardefine:n|{{#expr:{{#var:n}}+1}}}} | ||
+ | |}</includeonly><noinclude>[[Category:Utility Templates|{{PAGENAME}}]]</noinclude> |