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
(remove default parameter values)
(compressed Template:HCard Template:cardholder, +cardHolderLabel parameters)
Line 1: Line 1:
<span style="display:inline-grid;grid-template-rows:auto 8px 16px;background:{{{background|#fff0}}};padding:0.25rem 0.25rem 0 0.25rem;border-radius:0.25rem;justify-content:space-evenly;margin:0.25rem;"><span style="grid-row-start:1;grid-row-end:-2;place-self:center;display:inline-grid;grid-auto-flow:column;gap:0 {{{gap|2}}}px;white-space:nowrap;">{{{cards}}}</span><span style="grid-row-start:-2;grid-row-end:-1;place-self:center;background:{{{holderColor|#000}}};color:{{{textColor|#fff}}};font-size:0.875rem;font-family:Roboto,Arial,sans-serif;font-weight:500;height:min-content;width:104%;padding:0 0.25rem;border-radius:0.25rem 0.25rem 0 0;">{{{1|&#8203;}}}</span></span><noinclude>
<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>


== Examples ==
== Examples ==


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


<code><nowiki>{{cardholder|</nowiki>'''Alice'''<nowiki>|cards=</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>'''<nowiki> }}</nowiki></code>
<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>'''Alice'''</span>'''<nowiki> }}</nowiki></code>


=== [[Gamehelphanabi|Hanabi]] ===
=== [[Gamehelphanabi|Hanabi]] ===


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


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


<code><nowiki>{{cardholder|</nowiki>'''Bob 🡲'''<nowiki>|cards=</nowiki>'''<span style="background:#fff;"><nowiki>{{Hw|5|n=|c}}</nowiki></span><span style="background:#eef;"><nowiki>{{Hm|1|{{g}}|2|0|n|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></code>
<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>


== Available parameters ==
== Available parameters ==
<div style="display:grid;grid-template-columns:repeat(4,min-content) 2fr;gap:0.5rem;overflow:auto;text-overflow:ellipsis;">
<div style="display:grid;grid-template-columns:repeat(5,min-content) 2fr;gap:0.5rem;overflow:auto;text-overflow:ellipsis;">
   <div style="font-weight:bold;width:8rem;">Parameter</div>
   <div style="font-weight:bold;width:8rem;">Parameter Id</div>
  <div style="font-weight:bold;width:8rem;">Parameter Name</div>
   <div style="font-weight:bold;width:8rem;">Default value</div>
   <div style="font-weight:bold;width:8rem;">Default value</div>
   <div style="font-weight:bold;width:8rem;">Example</div>
   <div style="font-weight:bold;width:8rem;">Example</div>
Line 24: Line 25:
   <div style="font-weight:bold;width:8rem;">Description</div>
   <div style="font-weight:bold;width:8rem;">Description</div>
   <div><code>1</code></div>
   <div><code>1</code></div>
  <div><code>cards</code></div>
  <div><code>null</code></div>
  <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>
  <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>&amp;ZeroWidthSpace;</code></div>
   <div><code><nowiki>|Alice</nowiki></code></div>
   <div><code><nowiki>|Alice</nowiki></code></div>
   <div>{{cardholder|Alice|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}}}}</div>
   <div>{{cardholder|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |Alice}}</div>
   <div>'''''Optional''''': specify holder text.</div>
   <div>'''''Optional''''': specify a label.</div>
   <div><code>cards</code></div>
   <div><code>3</code></div>
  <div>null</div>
   <div><code>labelColor</code></div>
   <div><code><nowiki>|cards=</nowiki></code><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>
  <div><code>#fff</code>
   <div>{{cardholder|cards={{spade|1}}{{spade|2}}{{spade|3}}{{spade|4}}}}</div>
(white)</div>
   <div>'''''Required''''': specify cards.</div>
  <div><code><nowiki>|green</nowiki></code></div>
   <div><code>holderColor</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>
   <div><code>#000</code>
(black)</div>
(black)</div>
   <div><code><nowiki>|holderColor=green</nowiki></code></div>
   <div><code><nowiki>|c=green</nowiki></code></div>
   <div>{{cardholder|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |holderColor=green}}</div>
   <div>{{cardholder|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |c=green}}</div>
  <div>'''''Optional''''': specify the holder color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
   <div>'''''Optional''''': specify the color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
  <div><code>textColor</code></div>
   <div><code>g</code></div>
  <div><code>#fff</code>
(white)</div>
  <div><code><nowiki>|textColor=green</nowiki></code></div>
  <div>{{cardholder|textColor|holderColor=lightgrey|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |textColor=green}}</div>
   <div>'''''Optional''''': specify the holder text color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
   <div><code>background</code></div>
  <div><code>#fff0</code>
(transparent)</div>
  <div><code><nowiki>|background=green</nowiki></code></div>
  <div>{{cardholder|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |background=green}}</div>
  <div>'''''Optional''''': specify the background color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
   <div><code>gap</code></div>
   <div><code>gap</code></div>
   <div><code>2</code></div>
   <div><code>2</code></div>
   <div><code><nowiki>|gap=8</nowiki></code></div>
   <div><code><nowiki>|g=8</nowiki></code></div>
   <div>{{cardholder|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |gap=8}}</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>'''''Optional''''': specify the gap between cards in px units.</div>
</div>
</div>

Revision as of 20:05, 26 September 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.