This is a documentation for Board Game Arena: play board games online !

Template:Cardholder: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
No edit summary
(cardBackground)
Line 5: Line 5:
<div style="background:{{{clue4Colour|#fff0}}};margin-left:5%;padding-left:10%;height:1.4rem;width:75%;border-radius:{{{corner|0.2}}}rem {{{corner|0.2}}}rem 0 0;color:{{{colour|#000}}};font-size:calc({{{size|2}}}rem - 0.75rem);line-height:1.2;">{{{clue4|}}}</div>
<div style="background:{{{clue4Colour|#fff0}}};margin-left:5%;padding-left:10%;height:1.4rem;width:75%;border-radius:{{{corner|0.2}}}rem {{{corner|0.2}}}rem 0 0;color:{{{colour|#000}}};font-size:calc({{{size|2}}}rem - 0.75rem);line-height:1.2;">{{{clue4|}}}</div>
<div style="background:{{{clue5Colour|#fff0}}};margin-left:5%;padding-left:10%;height:1.4rem;width:75%;border-radius:{{{corner|0.2}}}rem {{{corner|0.2}}}rem 0 0;color:{{{colour|#000}}};font-size:calc({{{size|2}}}rem - 0.75rem);line-height:1.2;">{{{clue5|}}}</div>
<div style="background:{{{clue5Colour|#fff0}}};margin-left:5%;padding-left:10%;height:1.4rem;width:75%;border-radius:{{{corner|0.2}}}rem {{{corner|0.2}}}rem 0 0;color:{{{colour|#000}}};font-size:calc({{{size|2}}}rem - 0.75rem);line-height:1.2;">{{{clue5|}}}</div>
<div>{{card|={{{card1|&nbsp;&nbsp;}}}|background={{{cardBackground|#fafafa}}}|colour={{{card1Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card1|&nbsp;&nbsp;}}}|background={{{card1Background|{{{cardBackground|#fafafa}}}}}}|colour={{{card1Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card2|&nbsp;&nbsp;}}}|background={{{cardBackground|#fafafa}}}|colour={{{card2Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card2|&nbsp;&nbsp;}}}|background={{{card2Background|{{{cardBackground|#fafafa}}}}}}|colour={{{card2Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card3|&nbsp;&nbsp;}}}|background={{{cardBackground|#fafafa}}}|colour={{{card3Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card3|&nbsp;&nbsp;}}}|background={{{card3Background|{{{cardBackground|#fafafa}}}}}}|colour={{{card3Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card4|&nbsp;&nbsp;}}}|background={{{cardBackground|#fafafa}}}|colour={{{card4Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card4|&nbsp;&nbsp;}}}|background={{{card4Background|{{{cardBackground|#fafafa}}}}}}|colour={{{card4Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card5|&nbsp;&nbsp;}}}|background={{{cardBackground|#fafafa}}}|colour={{{card5Colour|#000}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card5|&nbsp;&nbsp;}}}|background={{{card5Background|{{{cardBackground|#fafafa}}}}}}|colour={{{card5Colour|#000}}}|size={{{size|2}}}}}</div>
<div style="position:absolute;grid-row-start:-1;top:-0.2rem;background:#000;color:{{{colour|#fff}}};font-size:{{{size|1}}}rem;width:calc(100% - 0.8rem);height:25%;padding:0.5rem;border-radius:0.2rem 0.2rem 0 0;">{{{player|A}}} {{{arrow|➞}}}</div></div><noinclude>
<div style="position:absolute;grid-row-start:-1;top:-0.2rem;background:#000;color:{{{colour|#fff}}};font-size:{{{size|1}}}rem;width:calc(100% - 0.8rem);height:25%;padding:0.5rem;border-radius:0.2rem 0.2rem 0 0;">{{{player|A}}} {{{arrow|➞}}}</div></div><noinclude>
[[Category:Card templates]]
[[Category:Card templates]]
Line 31: Line 31:
   <div>{{cardholder |card1=1 |card1Colour=green |card2=2 |card2Colour=green}}</div>
   <div>{{cardholder |card1=1 |card1Colour=green |card2=2 |card2Colour=green}}</div>
   <div><b><i>Optional:</i></b> specify card colours as [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colours] where <code><b>#</b></code> is the card number from left to right.</div>
   <div><b><i>Optional:</i></b> specify card colours as [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colours] where <code><b>#</b></code> is the card number from left to right.</div>
  <div><code>card<b>#</b>Background</code></div>
  <div><code><nowiki>{{{cardBackground|#fafafa}}}</nowiki></code></div>
  <div><code><nowiki>{{cardholder |card1Background=green |card2Background=green}}</nowiki></code></div>
  <div>{{cardholder |card1Background=green |card2Background=green}}</div>
  <div><b><i>Optional:</i></b> specify card background colours as [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colours] where <code><b>#</b></code> is the card number from left to right. This overrides the <code>cardBackground</code> parameter.</div>
  <div><code>cardBackground</code></div>
  <div><code>#fafafa</code> (almost white)</div>
  <div><code><nowiki>{{cardholder |cardBackground=green}}</nowiki></code></div>
  <div>{{cardholder |cardBackground=green}}</div>
  <div><b><i>Optional:</i></b> specify all card background colours as [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colours].</div>
   <div><code>clue<b>#</b></code></div>
   <div><code>clue<b>#</b></code></div>
   <div><code>?</code></div>
   <div><code>?</code></div>
Line 67: Line 77:
=== Hanabi ===
=== Hanabi ===


{{cardholder |background=#dfd |cardBackground=#324
{{cardholder |cardBackground=#324
|clue1=1 |clue1Colour=white
|clue1=1 |clue1Colour=white
|clue2=2 |clue2Colour=lightgreen
|clue2=2 |clue2Colour=lightgreen
Line 81: Line 91:
}}
}}
<pre>
<pre>
{{cardholder |background=#dfd |cardBackground=#324
{{cardholder |cardBackground=#324
|clue1=1 |clue1Colour=white
|clue1=1 |clue1Colour=white
|clue2=2 |clue2Colour=lightgreen
|clue2=2 |clue2Colour=lightgreen

Revision as of 19:24, 16 March 2022

   
   
   
   
   
A ➞

Available parameters

Parameter
Default value
Example
Result
Description
card#
&nbsp;&nbsp; (two non-breaking spaces)
{{cardholder |card1=1 |card2=2}}
   
   
   
   
   
A ➞
Optional: specify cards as text where # is the card number from left to right.
card#Colour
#000
{{cardholder |card1=1 |card1Colour=green |card2=2 |card2Colour=green}}
   
   
   
   
   
A ➞
Optional: specify card colours as CSS colours where # is the card number from left to right.
card#Background
{{{cardBackground|#fafafa}}}
{{cardholder |card1Background=green |card2Background=green}}
   
   
   
   
   
A ➞
Optional: specify card background colours as CSS colours where # is the card number from left to right. This overrides the cardBackground parameter.
cardBackground
#fafafa (almost white)
{{cardholder |cardBackground=green}}
   
   
   
   
   
A ➞
Optional: specify all card background colours as CSS colours.
clue#
?
{{cardholder |clue1=1 |clue2=2}}
1
2
   
   
   
   
   
A ➞
Optional: specify clues as text where # is the card number from left to right.
clue#Colour
#fff0 (transparent)
{{cardholder |clue1Colour=green |clue2Colour=green}}
   
   
   
   
   
A ➞
Optional: specify clue colours as CSS colours where # is the card number from left to right.
gap
2
{{cardholder |gap=10}}
   
   
   
   
   
A ➞
Optional: specify the gap between cards in px units.
background
#fff0 (transparent)
{{cardholder |background=green}}
   
   
   
   
   
A ➞
Optional: specify the background colour as a CSS colour.
player
A
{{cardholder |player=Amy}}
   
   
   
   
   
Amy ➞
Optional: specify the player name as text.
arrow
{{cardholder |arrow=}}
   
   
   
   
   
A
Optional: hide the arrow or use another symbol.

Examples

Hanabi

1
2
3
4
5
   
   
   
   
   
A ➞
{{cardholder |cardBackground=#324
|clue1=1 |clue1Colour=white
|clue2=2 |clue2Colour=lightgreen
|clue3=3 |clue3Colour=yellow
|clue4=4 |clue4Colour=red
|clue5=5 |clue5Colour=deepskyblue

|card1=1 |card1Colour=white
|card2=2 |card2Colour=lightgreen
|card3=3 |card3Colour=yellow
|card4=4 |card4Colour=red
|card5=5 |card5Colour=deepskyblue
}}