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

Template:HCard: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
m (HCard)
m ({{{1|1}}})
Line 1: Line 1:
<div style="display:inline-grid;grid:17px 4px calc(1px*{{{size|40}}}*{{{numberScale|0.8}}}) calc(1px*{{{size|40}}}*{{{symbolScale|0.5}}} + 4px)/calc(1px*{{{size|40}}}*{{{numberScale|0.8}}}*(1 - 0.15));width:min-content;"><div style="grid-area:1/1/3/1;width:93%;margin:0 1px;border-radius:3px 3px 0 0;color:{{{clueTextColour|black}}};background-color:lightgrey;display:{{{showClueNumber|none}}};"></div><div style="grid-area:1/1/3/1;width:93%;margin:0 1px;border-radius:3px 3px 0 0;color:{{{clueTextColour|black}}};background-color:{{{clueColour|}}};display:{{{showClueColour|none}}};"></div><div style="grid-area:1/1/2/1;display:{{{showClueNumber|none}}};place-self:center start;padding:0 3px;line-height:normal;font-family:Roboto,Arial,sans-serif;font-weight:500;font-size:16px;color:{{{clueTextColour|black}}};">{{{1|}}}</div><div style="grid-area:1/1/2/1;display:{{{showClueColour|none}}};place-self:center end;padding:0 2px;line-height:normal;">{{gameIcon|imageFileName=Hanabi_numbers_icons_280.png|scale={{{clueSymbolScale|0.35}}}|width={{{size|40}}}*{{{clueSymbolScale|0.35}}}|height={{{size|40}}}*{{{clueSymbolScale|0.35}}}|x={{{size|40}}}*{{{clueSymbolScale|0.35}}}*(5 + {{{clueDarkSymbol|0}}})|y={{{size|40}}}*{{{clueSymbolScale|0.35}}}*{{{y|0}}}}}</div><div alt="{{{colourName|}}} {{{1|}}}" style="grid-area:2/1/4/1;display:grid;place-items:center;background-color:#2F2342;border-radius:3px 3px 0 0;">{{gameIcon|imageFileName=Hanabi_numbers_icons_280.png|tooltip={{{colourName|}}} {{{1|}}}|scale={{{numberScale|0.8}}}|width={{{size|40}}}*{{{numberScale|0.8}}}*(1 - 0.15)|height={{{size|40}}}*{{{numberScale|0.8}}}|x={{{size|40}}}*{{{numberScale|0.8}}}*({{{1|2}}} - (1 - 0.1))|y={{{size|40}}}*{{{numberScale|0.8}}}*{{{y|0}}}}}</div><div style="grid-area:4/1/5/1;display:grid;place-items:start center;background-color:#2F2342;border-radius:0 0 3px 3px;">{{gameIcon|imageFileName=Hanabi_numbers_icons_280.png|scale={{{symbolScale|0.5}}}|width={{{size|40}}}*{{{symbolScale|0.5}}}|height={{{size|40}}}*{{{symbolScale|0.5}}}|x={{{size|40}}}*{{{symbolScale|0.5}}}*5|y={{{size|40}}}*{{{symbolScale|0.5}}}*{{{y|0}}}}}</div></div><noinclude>
<div style="display:inline-grid;grid:17px 4px calc(1px*{{{size|40}}}*{{{numberScale|0.8}}}) calc(1px*{{{size|40}}}*{{{symbolScale|0.5}}} + 4px)/calc(1px*{{{size|40}}}*{{{numberScale|0.8}}}*(1 - 0.15));width:min-content;"><div style="grid-area:1/1/3/1;width:93%;margin:0 1px;border-radius:3px 3px 0 0;color:{{{clueTextColour|black}}};background-color:lightgrey;display:{{{showClueNumber|none}}};"></div><div style="grid-area:1/1/3/1;width:93%;margin:0 1px;border-radius:3px 3px 0 0;color:{{{clueTextColour|black}}};background-color:{{{clueColour|}}};display:{{{showClueColour|none}}};"></div><div style="grid-area:1/1/2/1;display:{{{showClueNumber|none}}};place-self:center start;padding:0 3px;line-height:normal;font-family:Roboto,Arial,sans-serif;font-weight:500;font-size:16px;color:{{{clueTextColour|black}}};">{{{1|1}}}</div><div style="grid-area:1/1/2/1;display:{{{showClueColour|none}}};place-self:center end;padding:0 2px;line-height:normal;">{{gameIcon|imageFileName=Hanabi_numbers_icons_280.png|scale={{{clueSymbolScale|0.35}}}|width={{{size|40}}}*{{{clueSymbolScale|0.35}}}|height={{{size|40}}}*{{{clueSymbolScale|0.35}}}|x={{{size|40}}}*{{{clueSymbolScale|0.35}}}*(5 + {{{clueDarkSymbol|0}}})|y={{{size|40}}}*{{{clueSymbolScale|0.35}}}*{{{y|0}}}}}</div><div alt="{{{colourName|}}} {{{1|1}}}" style="grid-area:2/1/4/1;display:grid;place-items:center;background-color:#2F2342;border-radius:3px 3px 0 0;">{{gameIcon|imageFileName=Hanabi_numbers_icons_280.png|tooltip={{{colourName|}}} {{{1|1}}}|scale={{{numberScale|0.8}}}|width={{{size|40}}}*{{{numberScale|0.8}}}*(1 - 0.15)|height={{{size|40}}}*{{{numberScale|0.8}}}|x={{{size|40}}}*{{{numberScale|0.8}}}*({{{1|1}}} - (1 - 0.1))|y={{{size|40}}}*{{{numberScale|0.8}}}*{{{y|0}}}}}</div><div style="grid-area:4/1/5/1;display:grid;place-items:start center;background-color:#2F2342;border-radius:0 0 3px 3px;">{{gameIcon|imageFileName=Hanabi_numbers_icons_280.png|scale={{{symbolScale|0.5}}}|width={{{size|40}}}*{{{symbolScale|0.5}}}|height={{{size|40}}}*{{{symbolScale|0.5}}}|x={{{size|40}}}*{{{symbolScale|0.5}}}*5|y={{{size|40}}}*{{{symbolScale|0.5}}}*{{{y|0}}}}}</div></div><noinclude>


== Examples ==
== Examples ==

Revision as of 00:47, 19 December 2023

1
​
1
​

Examples

1
​
1
​
2
​
2
​
3
​
3
​
4
​
4
​
5
​
5
​
5
​
5
​
5
​
5
​
1
​
1
​
2
​
2
​
3
​
3
​
4
​
4
​
5
​
5
​
5
​
5
​
5
​
5
​

Available parameters

Parameter
Default value
Example
Description
null
null
|5
Required: specify the card rank (1/2/3/4/5).
y
0
|y=2
Required: specify the card colour as an integer: red ⇨0, yellow ⇨1, green ⇨2, blue ⇨3, white ⇨4, multicolour ⇨5, black powder ⇨6.
colourName
null
|colourName=green
Required: specify the colour word used for tooltips and screen readers.
clueColour
null
|clueColour={{g}}
Required: specify the clue colour: {{r}} {{y}} {{g}} {{b}} {{w}} {{m}}
clueTextColour
black
|clueTextColour=white
Required: specify the number clue text colour as a CSS colour.
clueDarkSymbol
0
|clueDarkSymbol=1
Required: specify the clue symbol shade: light ⇨0, dark ⇨1.
showClueNumber
none
|showClueNumber=
Optional: display the rank clue.
showClueColour
none
|showClueColour=
Optional: display the colour clue.
size
40
|size=30
Optional: specify the icon dimensions.
numberScale
0.8
|numberScale=1
Optional: specify the scale factor of the number image.
colourScale
0.5
|colourScale=1
Optional: specify the scale factor of the colour symbol image.
clueColourScale
0.35
|clueColourScale=0.5
Optional: specify the scale factor of the clue colour symbol image.