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

Template:Car: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
(Created page with "{{card|=           |background={{{colour|grey}}}}}<noinclude> This template uses Template:Card to create a rectangle that represents a car, for example a train car in Ticket to Ride. </noinclude>")
 
(redesign)
 
Line 1: Line 1:
{{card|=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|background={{{colour|grey}}}}}<noinclude>
<span style="display:inline-grid;place-items:center;place-content:center;background:{{{c|grey}}};box-shadow:1px 1px 2px 2px rgba(0,0,0,0.2);border:solid {{{b|2}}}px {{{bc|#fff}}};border-radius:2px;width:{{{width|50}}}px;font-family:Roboto,Arial,sans-serif;font-weight:700;font-size:16px;white-space:nowrap;"><span style="display:{{{w|n}}}one;color:white;text-shadow:0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black,0 0 2px black;">{{{1|&#8203;}}}</span><span style="display:{{{w|n}}}none;color:black;text-shadow:0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white,0 0 2px white;">{{{1|&#8203;}}}</span></span><noinclude>


This template uses [[Template:Card]] to create a rectangle that represents a car, for example a train car in Ticket to Ride.
== Parameters ==
<div style="display:grid;grid-template-columns:repeat(4,max-content) 2fr;gap:0.5rem;overflow:auto;text-overflow:ellipsis;">
  <div style="font-weight:bold;width:8rem;">Id</div>
  <div style="font-weight:bold;width:8rem;">Name</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;">Description</div>
  <div><code>1</code></div>
  <div><code>text</code></div>
  <div><code>&amp;ZeroWidthSpace;</code></div>
  <div><code><nowiki>|12</nowiki></code></div>
  <div>'''''Optional:''''' specify a text value e.g. <code>12</code>.</div>
  <div><code>c</code></div>
  <div><code>color</code></div>
  <div><code>grey</code></div>
  <div><code><nowiki>|c=green</nowiki></code></div>
  <div>'''''Optional:''''' specify a background color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color] e.g. <code>green</code>.</div>
  <div><code>w</code></div>
  <div><code>white text</code></div>
  <div><code>n</code></div>
  <div><code><nowiki>|w=</nowiki></code></div>
  <div>'''''Optional:''''' specify white text.</div>
  <div><code>b</code></div>
  <div><code>border</code></div>
  <div><code>2</code></div>
  <div><code><nowiki>|b=0</nowiki></code></div>
  <div>'''''Optional:''''' specify the border width in px units.</div>
  <div><code>bc</code></div>
  <div><code>borderColor</code></div>
  <div><code>white</code></div>
  <div><code><nowiki>|bc=green</nowiki></code></div>
  <div>'''''Optional:''''' specify a the border color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color] e.g. <code>green</code>.</div>
  <div><code>width</code></div>
  <div><code>width</code></div>
  <div><code>50</code></div>
  <div><code><nowiki>|width=80</nowiki></code></div>
  <div>'''''Optional:''''' specify the width in px units.</div>
</div>


== Examples ==
=== [[Gamehelplinkage|Linkage]] ===
{{car|6|b=0|c=blue|w=}} <code><nowiki>{{car|6|b=0|c=blue|w=}}</nowiki></code>
{{car|6|b=0|c=white}} <code><nowiki>{{car|6|b=0|c=white}}</nowiki></code>
{{car|6|b=0|c=red}} <code><nowiki>{{car|6|b=0|c=red}}</nowiki></code>
{{car|6|b=0|c=yellow}} <code><nowiki>{{car|6|b=0|c=yellow}}</nowiki></code>
=== [[Gamehelptickettoride|Ticket to Ride]] ===
{{car|14|c=linear-gradient(to right,#d77,#fdf,#77d,#7d7,#d70,#dd7)}} <code><nowiki>{{car|14|c=linear-gradient(to right,#d77,#fdf,#77d,#7d7,#d70,#dd7)}}</nowiki></code>
{{car|12|c=#fdf}} <code><nowiki>{{car|12|c=#fdf}}</nowiki></code>
{{car|12|c=#44f|w=}} <code><nowiki>{{car|12|c=#44f|w=}}</nowiki></code>
{{car|12|c=#f70}} <code><nowiki>{{car|12|c=#f70}}</nowiki></code>
{{car|12|c=#eee}} <code><nowiki>{{car|12|c=#eee}}</nowiki></code>
{{car|12|c=#7f7}} <code><nowiki>{{car|12|c=#7f7}}</nowiki></code>
{{car|12|c=#ff7}} <code><nowiki>{{car|12|c=#ff7}}</nowiki></code>
{{car|12|c=#444|w=}} <code><nowiki>{{car|12|c=#444|w=}}</nowiki></code>
{{car|12|c=#f77}} <code><nowiki>{{car|12|c=#f77}}</nowiki></code>


</noinclude>
</noinclude>

Latest revision as of 17:29, 15 January 2024

Parameters

Id
Name
Default value
Example
Description
1
text
&ZeroWidthSpace;
|12
Optional: specify a text value e.g. 12.
c
color
grey
|c=green
Optional: specify a background color as a CSS color e.g. green.
w
white text
n
|w=
Optional: specify white text.
b
border
2
|b=0
Optional: specify the border width in px units.
bc
borderColor
white
|bc=green
Optional: specify a the border color as a CSS color e.g. green.
width
width
50
|width=80
Optional: specify the width in px units.

Examples

Linkage

66 {{car|6|b=0|c=blue|w=}}

66 {{car|6|b=0|c=white}}

66 {{car|6|b=0|c=red}}

66 {{car|6|b=0|c=yellow}}

Ticket to Ride

1414 {{car|14|c=linear-gradient(to right,#d77,#fdf,#77d,#7d7,#d70,#dd7)}}

1212 {{car|12|c=#fdf}}

1212 {{car|12|c=#44f|w=}}

1212 {{car|12|c=#f70}}

1212 {{car|12|c=#eee}}

1212 {{car|12|c=#7f7}}

1212 {{car|12|c=#ff7}}

1212 {{car|12|c=#444|w=}}

1212 {{car|12|c=#f77}}