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
mNo edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="position:relative;display:grid;grid:repeat(3, auto) / repeat({{{n|5}}},auto);gap:0rem {{{gap|2}}}px;background:{{{background|#fff0}}};border-radius:{{{corner|0.2}}}rem {{{corner|0.2}}}rem 0 0;padding:0.5rem;line-height:0.1;width:max-content;align-items:end;">
<span style="display:inline-flex;flex-direction:column;"><span style="display:flex;justify-content:space-evenly;gap:0 {{{g|2}}}px;margin:0 4px;white-space:nowrap">{{{1}}}</span><span style="position:relative;top:-4px;z-index:2;background:{{{c|#000}}};color:{{{3|#fff}}};font:500 14px/1.4 Roboto;padding:0 4px;border-radius:4px 4px 1px 1px">{{{2|&#8203;}}}</span></span><noinclude>
<div style="background:{{{clue1Colour|#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;">{{{clue1|}}}</div>
 
<div style="background:{{{clue2Colour|#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;">{{{clue2|}}}</div>
== Examples ==
<div style="background:{{{clue3Colour|#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;">{{{clue3|}}}</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>
{{cardholder|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |Alice}}
<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|={{{card2|&nbsp;&nbsp;}}}|background={{{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|={{{card4|&nbsp;&nbsp;}}}|background={{{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 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]]


== Available parameters ==
<code><nowiki>{{cardholder|</nowiki>'''<span style="background:#fdd;"><nowiki>{{diamond|A}}</nowiki></span><span style="background:#eee;"><nowiki>{{club|A}}</nowiki></span><span style="background:#fdd;"><nowiki>{{heart|A}}</nowiki></span><span style="background:#eee;"><nowiki>{{spade|A}}</nowiki>'''</span> |'''Alice'''<nowiki> }}</nowiki></code>


<div style="display:grid;grid-template-columns:repeat(2,min-content) repeat(3,auto);gap:1rem;">
=== [[Gamehelphanabi|Hanabi]] ===
  <div style="font-weight:bold;">Parameter</div>
  <div style="font-weight:bold;">Default value</div>
  <div style="font-weight:bold;">Example</div>
  <div style="font-weight:bold;">Result</div>
  <div style="font-weight:bold;">Description</div>
  <div><code>card<b>#</b></code></div>
  <div><code>&amp;nbsp;&amp;nbsp;</code> (two non-breaking spaces)</div>
  <div><code><nowiki>{{cardholder |card1=1 |card2=2}}</nowiki></code></div>
  <div>{{cardholder |card1=1 |card2=2}}</div>
  <div><b><i>Optional:</i></b> specify cards as text where <code><b>#</b></code> is the card number from left to right.</div>
  <div><code>card<b>#</b>Colour</code></div>
  <div><code><nowiki>#000</nowiki></code></div>
  <div><code><nowiki>{{cardholder |card1=1 |card1Colour=green |card2=2 |card2Colour=green}}</nowiki></code></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><code>clue<b>#</b></code></div>
  <div><code>?</code></div>
  <div><code><nowiki>{{cardholder |clue1=1 |clue2=2}}</nowiki></code></div>
  <div>{{cardholder |clue1=1 |clue2=2}}</div>
  <div><b><i>Optional:</i></b> specify clues as text</b> where <code><b>#</b></code> is the card number from left to right.</div>
  <div><code>clue<b>#</b>Colour</code></div>
  <div><code>#fff0</code> (transparent)</div>
  <div><code><nowiki>{{cardholder |clue1Colour=green |clue2Colour=green}}</nowiki></code></div>
  <div>{{cardholder|clue1Colour=green|clue2Colour=green}}</div>
  <div><b><i>Optional:</i></b> specify clue 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>gap</code></div>
  <div><code>2</code></div>
  <div><code><nowiki>{{cardholder |gap=10}}</nowiki></code></div>
  <div>{{cardholder|gap=10}}</div>
  <div><b><i>Optional:</i></b> specify the gap between cards in px units.</div>
  <div><code>background</code></div>
  <div><code>#fff0</code> (transparent)</div>
  <div><code><nowiki>{{cardholder |background=green}}</nowiki></code></div>
  <div>{{cardholder|background=green}}</div>
  <div><b><i>Optional:</i></b> specify the background colour as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour].</div>
  <div><code>player</code></div>
  <div><code>A</code></div>
  <div><code><nowiki>{{cardholder |player=Amy}}</nowiki></code></div>
  <div>{{cardholder|player=Amy}}</div>
  <div><b><i>Optional:</i></b> specify the player name as text.</div>
  <div><code>arrow</code></div>
  <div><code>➞</code></div>
  <div><code><nowiki>{{cardholder |arrow=}}</nowiki></code></div>
  <div>{{cardholder|arrow=}}</div>
  <div><b><i>Optional:</i></b> hide the arrow or use another symbol.</div>
</div>


== Examples ==
{{cardholder|{{Hr|1|n|c}}{{Hy|2|n=|c}}{{Hg|3|n|c=}}{{Hb|4|n=|c=}} |Alice 🡲}}
{{cardholder|{{Hw|5|n|c}}{{Hm|1|{{g}}|2|0|n|c=}}{{Hm|2|{{m}}|5|0|n=|c=}}{{Hk|3|n=}} |Bob 🡲}}


=== Hanabi ===
<code><nowiki>{{cardholder|</nowiki>'''<span style="background:#fdd;"><nowiki>{{Hr|1}}</nowiki></span><span style="background:#ffd;"><nowiki>{{Hy|2|n=}}</nowiki></span><span style="background:#dfd;"><nowiki>{{Hg|3|c=}}</nowiki></span><span style="background:#ddf;"><nowiki>{{Hb|4|n=|c=}}</nowiki></span>''' <nowiki>|</nowiki>'''Alice 🡲'''<nowiki>}}</nowiki></code>


{{cardholder |background=#dfd |cardBackground=#324
<code><nowiki>{{cardholder|</nowiki>'''<span style="background:#fff;"><nowiki>{{Hw|5|n=}}</nowiki></span><span style="background:#eef;"><nowiki>{{Hm|1|{{g}}|2|0|c=}}</nowiki></span><span style="background:#edf;"><nowiki>{{Hm|2|{{m}}|5|0|n=|c=}}</nowiki></span><span style="background:#ddd;"><nowiki>{{Hk|3|n=}}</nowiki></span>''' <nowiki>|</nowiki>'''Bob 🡲'''<nowiki>}}</nowiki></code>
|clue1=1 |clue1Colour=white
|clue2=2 |clue2Colour=lightgreen
|clue3=3 |clue3Colour=yellow
|clue4=4 |clue4Colour=red
|clue5=5 |clue5Colour=deepskyblue


|card1=1 |card1Colour=white
== Available parameters ==
|card2=2 |card2Colour=lightgreen
<div style="display:grid;grid-template-columns:repeat(5,min-content) 2fr;gap:0.5rem;overflow:auto;text-overflow:ellipsis;">
|card3=3 |card3Colour=yellow
  <div style="font-weight:bold;width:8rem;">Parameter Id</div>
|card4=4 |card4Colour=red
  <div style="font-weight:bold;width:8rem;">Parameter Name</div>
|card5=5 |card5Colour=deepskyblue
  <div style="font-weight:bold;width:8rem;">Default value</div>
}}
  <div style="font-weight:bold;width:8rem;">Example</div>
<pre>
  <div style="font-weight:bold;width:8rem;">Result</div>
{{cardholder |background=#dfd |cardBackground=#324
  <div style="font-weight:bold;width:8rem;">Description</div>
|clue1=1 |clue1Colour=white
  <div><code>1</code></div>
|clue2=2 |clue2Colour=lightgreen
  <div><code>cards</code></div>
|clue3=3 |clue3Colour=yellow
  <div><code>null</code></div>
|clue4=4 |clue4Colour=red
  <div><code><nowiki>|{{spade|1}}</nowiki></code><code><nowiki>{{spade|2}}</nowiki></code><code><nowiki>{{spade|3}}</nowiki></code><code><nowiki>{{spade|4}}</nowiki></code></div>
|clue5=5 |clue5Colour=deepskyblue
  <div>{{cardholder|{{spade|1}}{{spade|2}}{{spade|3}}{{spade|4}} }}</div>
  <div>'''''Required''''': specify cards.</div>
  <div><code>2</code></div>
  <div><code>label</code></div>
  <div><code>&amp;ZeroWidthSpace;</code></div>
  <div><code><nowiki>|Alice</nowiki></code></div>
  <div>{{cardholder|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |Alice}}</div>
  <div>'''''Optional''''': specify a label.</div>
  <div><code>3</code></div>
  <div><code>labelColor</code></div>
  <div><code>#fff</code>
(white)</div>
  <div><code><nowiki>|green</nowiki></code></div>
  <div>{{cardholder|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |Alice|green|c=lightgrey}}</div>
  <div>'''''Optional''''': specify the label color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
  <div><code>c</code></div>
  <div><code>color</code></div>
  <div><code>#000</code>
(black)</div>
  <div><code><nowiki>|c=green</nowiki></code></div>
  <div>{{cardholder|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |c=green}}</div>
  <div>'''''Optional''''': specify the color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
  <div><code>g</code></div>
  <div><code>gap</code></div>
  <div><code>2</code></div>
  <div><code><nowiki>|g=8</nowiki></code></div>
  <div>{{cardholder|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |g=8}}</div>
  <div>'''''Optional''''': specify the gap between cards in px units.</div>
</div>


|card1=1 |card1Colour=white
[[Category:HanabiCards]]
|card2=2 |card2Colour=lightgreen
[[Category:Card templates]]
|card3=3 |card3Colour=yellow
|card4=4 |card4Colour=red
|card5=5 |card5Colour=deepskyblue
}}
</pre>
</noinclude>
</noinclude>

Latest revision as of 01:17, 8 October 2024

{{{1}}}

Examples

A♦A♣A♥A♠ Alice

{{cardholder|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |Alice }}

Hanabi

red1
,with a
red1clue,
yellow2
,with a
yellow2clue,
green3
,with a
green3clue,
blue4
,with a
blue4clue,
Alice 🡲
white5
,with a
white5clue,
multicolour1
,with a
21clue,
multicolour2
,with a
52clue,
black powder3
,with a
black powder3clue,
Bob 🡲

{{cardholder|{{Hr|1}}{{Hy|2|n=}}{{Hg|3|c=}}{{Hb|4|n=|c=}} |Alice 🡲}}

{{cardholder|{{Hw|5|n=}}{{Hm|1|{{g}}|2|0|c=}}{{Hm|2|{{m}}|5|0|n=|c=}}{{Hk|3|n=}} |Bob 🡲}}

Available parameters

Parameter Id
Parameter Name
Default value
Example
Result
Description
1
cards
null
|{{spade|1}}{{spade|2}}{{spade|3}}{{spade|4}}
1♠2♠3♠4♠
Required: specify cards.
2
label
&ZeroWidthSpace;
|Alice
A♦A♣A♥A♠ Alice
Optional: specify a label.
3
labelColor
#fff (white)
|green
A♦A♣A♥A♠ Alice
Optional: specify the label color as a CSS color.
c
color
#000 (black)
|c=green
A♦A♣A♥A♠
Optional: specify the color as a CSS color.
g
gap
2
|g=8
A♦A♣A♥A♠
Optional: specify the gap between cards in px units.