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

Template:Cardholder4: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
(Created page with "<div style="position:relative;display:grid;grid:repeat(3, auto) / repeat(4,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;"> <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}}...")
 
m (Template:Card update)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="position:relative;display:grid;grid:repeat(3, auto) / repeat(4,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;">
<div style="position:relative;display:grid;grid:repeat(3,auto) / repeat(4,auto);gap:0rem {{{gap|2}}}px;background:{{{background|#fff0}}};border-radius:{{{corner|0.2}}}rem {{{corner|0.2}}}rem 0 0;padding:0.5rem 0.5rem 1.1rem;line-height:0.1;width:max-content;align-items:end;">
<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:{{{clue1Color|#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:{{{color|#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>
<div style="background:{{{clue2Color|#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:{{{color|#000}}};font-size:calc({{{size|2}}}rem - 0.75rem);line-height:1.2;">{{{clue2|}}}</div>
<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:{{{clue3Color|#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:{{{color|#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>
<div style="background:{{{clue4Color|#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:{{{color|#000}}};font-size:calc({{{size|2}}}rem - 0.75rem);line-height:1.2;">{{{clue4|}}}</div>
<div>{{card|={{{card1|&nbsp;&nbsp;}}}|background={{{card1Background|{{{cardBackground|#302141}}}}}}|colour={{{card1Colour|#fff}}}|size={{{size|2}}}}}</div>
<div>{{card|{{{card1|&nbsp;&nbsp;}}}|background={{{card1Background|{{{cardBackground|#302141}}}}}}|color={{{card1Color|#fff}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card2|&nbsp;&nbsp;}}}|background={{{card2Background|{{{cardBackground|#302141}}}}}}|colour={{{card2Colour|#fff}}}|size={{{size|2}}}}}</div>
<div>{{card|{{{card2|&nbsp;&nbsp;}}}|background={{{card2Background|{{{cardBackground|#302141}}}}}}|color={{{card2Color|#fff}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card3|&nbsp;&nbsp;}}}|background={{{card3Background|{{{cardBackground|#302141}}}}}}|colour={{{card3Colour|#fff}}}|size={{{size|2}}}}}</div>
<div>{{card|{{{card3|&nbsp;&nbsp;}}}|background={{{card3Background|{{{cardBackground|#302141}}}}}}|color={{{card3Color|#fff}}}|size={{{size|2}}}}}</div>
<div>{{card|={{{card4|&nbsp;&nbsp;}}}|background={{{card4Background|{{{cardBackground|#302141}}}}}}|colour={{{card4Colour|#fff}}}|size={{{size|2}}}}}</div>
<div>{{card|{{{card4|&nbsp;&nbsp;}}}|background={{{card4Background|{{{cardBackground|#302141}}}}}}|color={{{card4Color|#fff}}}|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:{{{color|#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]]
 
See '''[[:Template:cardholder]]''' for documentation.
== Available parameters ==
 
<div style="display:grid;grid-template-columns:repeat(2,min-content) repeat(3,auto);gap:1rem;">
  <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>{{cardholder4 |card1=1 |card2=2}}</nowiki></code></div>
  <div>{{cardholder4 |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>{{cardholder4 |card1=1 |card1Colour=green |card2=2 |card2Colour=green}}</nowiki></code></div>
  <div>{{cardholder4 |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>card<b>#</b>Background</code></div>
  <div><code><nowiki>{{{cardBackground|#fafafa}}}</nowiki></code></div>
  <div><code><nowiki>{{cardholder4 |card1Background=green |card2Background=green}}</nowiki></code></div>
  <div>{{cardholder4 |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>{{cardholder4 |cardBackground=green}}</nowiki></code></div>
  <div>{{cardholder4 |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>?</code></div>
  <div><code><nowiki>{{cardholder4 |clue1=1 |clue2=2}}</nowiki></code></div>
  <div>{{cardholder4 |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>{{cardholder4 |clue1Colour=green |clue2Colour=green}}</nowiki></code></div>
  <div>{{cardholder4|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>{{cardholder4 |gap=10}}</nowiki></code></div>
  <div>{{cardholder4|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>{{cardholder4 |background=green}}</nowiki></code></div>
  <div>{{cardholder4|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>{{cardholder4 |player=Amy}}</nowiki></code></div>
  <div>{{cardholder4|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>{{cardholder4 |arrow=}}</nowiki></code></div>
  <div>{{cardholder4|arrow=}}</div>
  <div><b><i>Optional:</i></b> hide the arrow or use another symbol.</div>
</div>
 
== Examples ==
 
=== Hanabi ===
 
{{cardholder4
|clue1=1 |clue1Colour={{w}}
|clue2=2 |clue2Colour={{g}}
|clue3=3 |clue3Colour={{y}}
|clue4=4 |clue4Colour={{r}}
|clue5=5 |clue5Colour={{b}}
 
|card1=1 |card1Colour={{w}}
|card2=2 |card2Colour={{g}}
|card3=3 |card3Colour={{y}}
|card4=4 |card4Colour={{r}}
|card5=5 |card5Colour={{b}}
}}
<pre>
{{cardholder4
|clue1=1 |clue1Colour={{w}}
|clue2=2 |clue2Colour={{g}}
|clue3=3 |clue3Colour={{g}}
|clue4=4 |clue4Colour={{r}}
|clue5=5 |clue5Colour={{b}}
 
|card1=1 |card1Colour={{w}}
|card2=2 |card2Colour={{g}}
|card3=3 |card3Colour={{y}}
|card4=4 |card4Colour={{r}}
|card5=5 |card5Colour={{b}}
}}
</pre>
</noinclude>
</noinclude>

Latest revision as of 21:40, 18 February 2024

  
  
  
  
A 🡲

See Template:cardholder for documentation.