Difference between revisions of "Template:Card"

From Dvorak - A Blank-Card Game
Jump to navigationJump to search
(I have become wiser than all gods and scientists)
 
(34 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<div style="float:left; margin:4px; padding:1px; border:1px solid #000;
<div style="float:left; margin:4px; padding:1px; border:1px solid #000;
{{ #if:  {{{minicard|}}} | width:125px; min-height:200px; font-size:80%; | width:200px; min-height:300px; }}">
{{ #if:  {{{minicard|}}} | width:125px; min-height:200px; font-size:80%; | width:200px; min-height:300px; }}">
<div style="background:#{{{bgcolor|999}}}; text-align:center; font-size:14pt; color:#FFF;
<div style="background:#{{{bgcolor|{{#switch: {{{type}}} | Action = 600 | Thing = 006 | 666 }}}}}; text-align:center; font-size:14pt; color:#{{ #switch: {{{bgcolor}}} | FFF | fff | ffffff | FFFFFF=000 | FFF}};
{{ #if:  {{{minicard|}}} | height:20px |
{{ #if:  {{{minicard|}}} | height:20px |
{{ #if:  {{{longtitle|}}} | height:65px; | height:35px; }}
{{ #if:  {{{longtitle|}}} | height:65px; | height:35px; }}
}}
}}
font-family:arial narrow,arial; padding:6px 0px 0px 0px">
font-family:'Trebuchet MS','arial narrow',arial; padding:6px 0px 0px 0px">
{{ #if:  {{{cornervalue|}}} |  
{{ #if:  {{{cornervalue|}}} |  
<div style="float:right; margin:4px;{{ #if:  {{{longtitle|}}} | height:65px; | height:35px; }}"><span style="background:#fff; color:#000; padding:4px; border:1px solid #000;">{{{cornervalue}}}</span></div> }}
<div style="float:right; margin:4px;{{ #if:  {{{longtitle|}}} | height:65px; | height:35px; }}"><span style="background:#fff; color:#000; padding:0px 2px 0px 2px; border:1px solid #000;">{{{cornervalue}}}</span></div> }}
{{{title|Card Title}}}</div>
{{{title|Card Title}}}</div>
<div style="background:#{{{bgcolor|999}}}; text-align:center; font-size:14pt; color:#FFF;
<div style="background:#{{{bgcolor|{{#switch: {{{type}}} | Action = 600 | Thing = 006 | 666 }}}}}; text-align:center; font-size:14pt; color:#{{ #switch: {{{bgcolor}}} | FFF | fff | ffffff | FFFFFF=000 | FFF}};
font-family:arial narrow,arial; padding:2px; font-size:0.8em">{{{type|Type}}}</div>
font-family:'Trebuchet MS','arial narrow',arial; padding:2px; font-size:0.8em">{{{type|Type}}}</div>
<div style="
{{ #if:  {{{image|}}} |
<div style="text-align:center; background:#{{{imgback|fff}}};">[[Image:{{{image}}}‎]]</div>
}}
<div style="font-family:'Trebuchet MS';
{{ #if:  {{{minicard|}}} | height:150px; |
{{ #if:  {{{minicard|}}} | height:150px; |
{{ #if:  {{{image|}}} | height:100px; |
{{ #if:  {{{longtitle|}}} | height:170px; | height:200px; }}
{{ #if:  {{{longtitle|}}} | height:170px; | height:200px; }}
}}
}}
{{ #if:  {{{longtext|}}} | font-size:0.8em; }}
}}
  padding:4px 8px 0px 8px">{{ #if:  {{{text|}}} | {{{text}}} }}</div>
{{ #if:  {{{longtext|}}} | font-size:0.8em; }}  
{{ #if:  {{{creator|}}} | <div style="background:#eee; border-width:1px 0px 0px 0px; border-style:solid; border-color:#000; text-align:right; font-size:0.7em;">Card by {{{creator|creator}}}</div> }}
  padding:4px 8px 0px 8px">{{ #if:  {{{text|}}} | {{{text}}} }} {{ #if:  {{{flavortext|}}} | {{ #if: {{{text|}}} | <hr/> }}<span style="font-style: italic; font-family:'Trebuchet MS';">{{{flavortext}}}</span> }}</div>
{{ #if:  {{{number|}}} | <div style="float:left; margin:2px;"><span style=" font-size:0.7em; color:#000; padding:0px 0px 0px 0px;">#{{{number}}}</span></div> }}{{#if:  {{{creator|}}} | <div style="background:#eee; border-width:1px 0px 0px 0px; border-style:solid; border-color:#000; text-align:right; font-family:'Trebuchet MS'; font-size:0.7em;">Card by {{ #ifexist: User:{{{creator}}}|[[User:{{{creator}}}|{{{creator}}}]]|{{{creator}}}}}</div> }}
</div><noinclude>
</div><noinclude>
==Usage==
==Usage==
Line 29: Line 34:
| bgcolor =
| bgcolor =
| cornervalue =
| cornervalue =
| image =
| imgback =
| flavortext =
| creator =
| creator =
| number =
| minicard =
| minicard =
}}</pre>
}}</pre>
Line 35: Line 44:
'''title''' is the title of the card.
'''title''' is the title of the card.


'''longtitle''' can be set to 'true' if the card title takes up more than a line, and can be omitted otherwise.
'''longtitle''' doubles the size of the title area when set to 'true'.


'''type''' is the card type - usually just "Action" or "Thing", but if you've got a more complex deck you can use "Thing - Crew", "Interrupt" or whatever you're using.
'''type''' is the card type - usually just "Action" or "Thing", but if you've got a more complex deck you can use "Thing - Crew", "Interrupt" or whatever you're using.
Line 43: Line 52:
'''longtext''' can be set to 'true' if the card text is too long to fit on a normal card, and can be omitted otherwise.
'''longtext''' can be set to 'true' if the card text is too long to fit on a normal card, and can be omitted otherwise.


'''bgcolor''' is the colour of the card header background, as a hex value (eg. "f00" for red.) If omitted, it defaults to grey.
'''bgcolor''' is the colour of the card header background, as a hex value (eg. "f00" for red). If omitted, it defaults to "600" if the card is of type "Action", "006" if the card is of type "Thing", and "666" otherwise.


'''cornervalue''' is the value that will be printed in a box in the top right of the card, if one is required. If omitted, no box is printed on the card.
'''cornervalue''' is the value that will be printed in a box in the top right of the card, if one is required. If omitted, no box is printed on the card.
'''image''' is the filename of an image for the card, which should be uploaded to the wiki.
'''imgback''' is the colour to be shown behind the card image, as a hex value. If omitted, it defaults to white.
'''flavortext''' is the flavor text of the card, if any.  It appears below the body text in italics, separated by a horizontal rule.


'''creator''' is the player who created the card, which is given in a box at the bottom of the card. If omitted, no box is printed.
'''creator''' is the player who created the card, which is given in a box at the bottom of the card. If omitted, no box is printed.
'''number''' is the card's number.


'''minicard''' can be set to 'true' if you want a half-size card for use in example texts.
'''minicard''' can be set to 'true' if you want a half-size card for use in example texts.
</noinclude>
</noinclude>

Latest revision as of 20:25, 31 January 2023

Card Title
Type

Usage

{{Card
| title =
| longtitle =
| text =
| longtext =
| type =
| bgcolor =
| cornervalue =
| image =
| imgback =
| flavortext = 
| creator =
| number =
| minicard =
}}

title is the title of the card.

longtitle doubles the size of the title area when set to 'true'.

type is the card type - usually just "Action" or "Thing", but if you've got a more complex deck you can use "Thing - Crew", "Interrupt" or whatever you're using.

text is the body text of the card, if any.

longtext can be set to 'true' if the card text is too long to fit on a normal card, and can be omitted otherwise.

bgcolor is the colour of the card header background, as a hex value (eg. "f00" for red). If omitted, it defaults to "600" if the card is of type "Action", "006" if the card is of type "Thing", and "666" otherwise.

cornervalue is the value that will be printed in a box in the top right of the card, if one is required. If omitted, no box is printed on the card.

image is the filename of an image for the card, which should be uploaded to the wiki.

imgback is the colour to be shown behind the card image, as a hex value. If omitted, it defaults to white.

flavortext is the flavor text of the card, if any. It appears below the body text in italics, separated by a horizontal rule.

creator is the player who created the card, which is given in a box at the bottom of the card. If omitted, no box is printed.

number is the card's number.

minicard can be set to 'true' if you want a half-size card for use in example texts.