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
m (Template:Card update)
(remove default parameter values)
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|{{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}}}}}</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|A}}}</span></span><noinclude>
<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>


<code><nowiki>{{cardholder|</nowiki>'''A'''<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>
== Examples ==


== Examples ==
{{cardholder|Alice|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} }}
 
<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>


=== [[Gamehelphanabi|Hanabi]] ===
=== [[Gamehelphanabi|Hanabi]] ===
Line 22: Line 24:
   <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>A</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}}</div>
   <div>{{cardholder|Alice|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}}}}</div>
   <div>'''''Optional''''': specify holder text.</div>
   <div>'''''Optional''''': specify holder text.</div>
   <div><code>cards</code></div>
   <div><code>cards</code></div>
   <div><code><nowiki>|cards=</nowiki></code><code><nowiki>{{diamond|A}}</nowiki></code><code><nowiki>{{club|A}}</nowiki></code><code><nowiki>{{heart|A}}</nowiki></code><code><nowiki>{{spade|A}}</nowiki></code></div>
   <div>null</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><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>{{cardholder|A|cards={{spade|1}}{{spade|2}}{{spade|3}}{{spade|4}}}}</div>
   <div>{{cardholder|cards={{spade|1}}{{spade|2}}{{spade|3}}{{spade|4}}}}</div>
   <div>'''''Required''''': specify cards.</div>
   <div>'''''Required''''': specify cards.</div>
   <div><code>holderColor</code></div>
   <div><code>holderColor</code></div>
Line 35: Line 37:
(black)</div>
(black)</div>
   <div><code><nowiki>|holderColor=green</nowiki></code></div>
   <div><code><nowiki>|holderColor=green</nowiki></code></div>
   <div>{{cardholder|A|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |holderColor=green}}</div>
   <div>{{cardholder|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |holderColor=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 holder color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color].</div>
   <div><code>textColor</code></div>
   <div><code>textColor</code></div>
Line 41: Line 43:
(white)</div>
(white)</div>
   <div><code><nowiki>|textColor=green</nowiki></code></div>
   <div><code><nowiki>|textColor=green</nowiki></code></div>
   <div>{{cardholder|holderColor=lightgrey|cards={{diamond|A}}{{club|A}}{{heart|A}}{{spade|A}} |textColor=green}}</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>'''''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>background</code></div>

Revision as of 16:37, 25 September 2024

{{{cards}}}

Examples

A♦A♣A♥A♠Alice

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

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|Alice 🡲|cards={{Hr|1|n|c}}{{Hy|2|n=|c}}{{Hg|3|n|c=}}{{Hb|4|n=|c=}} }}

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

Available parameters

Parameter
Default value
Example
Result
Description
1
&ZeroWidthSpace;
|Alice
A♦A♣A♥A♠Alice
Optional: specify holder text.
cards
null
|cards={{spade|1}}{{spade|2}}{{spade|3}}{{spade|4}}
1♠2♠3♠4♠
Required: specify cards.
holderColor
#000 (black)
|holderColor=green
A♦A♣A♥A♠
Optional: specify the holder color as a CSS color.
textColor
#fff (white)
|textColor=green
A♦A♣A♥A♠textColor
Optional: specify the holder text color as a CSS color.
background
#fff0 (transparent)
|background=green
A♦A♣A♥A♠
Optional: specify the background color as a CSS color.
gap
2
|gap=8
A♦A♣A♥A♠
Optional: specify the gap between cards in px units.