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

Template:Chessboard: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
(Added visible documentation)
(Simplified & added optional highlight squares)
Line 2: Line 2:
== Basic empty chessboard ==
== Basic empty chessboard ==
</noinclude>
</noinclude>
{| style="text-align:center;"
{| style="text-align:center; max-width:{{{maxWidth|400px}}};"
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{numbersColumnWidth|20px}}};"|
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{numbersColumnWidth|20px}}};"|
Line 16: Line 16:
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};| 8  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};| 8  
| style="background: {{{lightSquareColour|#fff}}};"| {{{a8|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{a8|{{emptySquare}}}}}</div>{{{highlighta8|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{b8|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{b8|{{emptySquare}}}}}</div>{{{highlightb8|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{c8|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{c8|{{emptySquare}}}}}</div>{{{highlightc8|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{d8|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{d8|{{emptySquare}}}}}</div>{{{highlightd8|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{e8|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{e8|{{emptySquare}}}}}</div>{{{highlighte8|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{f8|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{f8|{{emptySquare}}}}}</div>{{{highlightf8|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{g8|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{g8|{{emptySquare}}}}}</div>{{{highlightg8|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{h8|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{h8|{{emptySquare}}}}}</div>{{{highlighth8|{{emptySquare}}}}}</div>
| 8
| 8
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 7  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 7  
| style="background: {{{darkSquareColour |#ddd}}};"| {{{a7|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{a7|{{emptySquare}}}}}</div>{{{highlighta7|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{b7|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{b7|{{emptySquare}}}}}</div>{{{highlightb7|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{c7|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{c7|{{emptySquare}}}}}</div>{{{highlightc7|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{d7|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{d7|{{emptySquare}}}}}</div>{{{highlightd7|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{e7|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{e7|{{emptySquare}}}}}</div>{{{highlighte7|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{f7|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{f7|{{emptySquare}}}}}</div>{{{highlightf7|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{g7|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{g7|{{emptySquare}}}}}</div>{{{highlightg7|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{h7|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{h7|{{emptySquare}}}}}</div>{{{highlighth7|{{emptySquare}}}}}</div>
| 7
| 7
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 6  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 6  
| style="background: {{{lightSquareColour|#fff}}};"| {{{a6|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{a6|{{emptySquare}}}}}</div>{{{highlighta6|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{b6|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{b6|{{emptySquare}}}}}</div>{{{highlightb6|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{c6|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{c6|{{emptySquare}}}}}</div>{{{highlightc6|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{d6|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{d6|{{emptySquare}}}}}</div>{{{highlightd6|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{e6|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{e6|{{emptySquare}}}}}</div>{{{highlighte6|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{f6|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{f6|{{emptySquare}}}}}</div>{{{highlightf6|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{g6|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{g6|{{emptySquare}}}}}</div>{{{highlightg6|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{h6|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{h6|{{emptySquare}}}}}</div>{{{highlighth6|{{emptySquare}}}}}</div>
| 6
| 6
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 5  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 5  
| style="background: {{{darkSquareColour |#ddd}}};"| {{{a5|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{a5|{{emptySquare}}}}}</div>{{{highlighta5|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{b5|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{b5|{{emptySquare}}}}}</div>{{{highlightb5|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{c5|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{c5|{{emptySquare}}}}}</div>{{{highlightc5|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{d5|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{d5|{{emptySquare}}}}}</div>{{{highlightd5|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{e5|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{e5|{{emptySquare}}}}}</div>{{{highlighte5|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{f5|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{f5|{{emptySquare}}}}}</div>{{{highlightf5|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{g5|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{g5|{{emptySquare}}}}}</div>{{{highlightg5|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{h5|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{h5|{{emptySquare}}}}}</div>{{{highlighth5|{{emptySquare}}}}}</div>
| 5
| 5
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 4  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 4  
| style="background: {{{lightSquareColour|#fff}}};"| {{{a4|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{a4|{{emptySquare}}}}}</div>{{{highlighta4|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{b4|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{b4|{{emptySquare}}}}}</div>{{{highlightb4|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{c4|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{c4|{{emptySquare}}}}}</div>{{{highlightc4|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{d4|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{d4|{{emptySquare}}}}}</div>{{{highlightd4|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{e4|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{e4|{{emptySquare}}}}}</div>{{{highlighte4|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{f4|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{f4|{{emptySquare}}}}}</div>{{{highlightf4|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{g4|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{g4|{{emptySquare}}}}}</div>{{{highlightg4|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{h4|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{h4|{{emptySquare}}}}}</div>{{{highlighth4|{{emptySquare}}}}}</div>
| 4
| 4
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 3  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 3  
| style="background: {{{darkSquareColour |#ddd}}};"| {{{a3|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{a3|{{emptySquare}}}}}</div>{{{highlighta3|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{b3|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{b3|{{emptySquare}}}}}</div>{{{highlightb3|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{c3|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{c3|{{emptySquare}}}}}</div>{{{highlightc3|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{d3|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{d3|{{emptySquare}}}}}</div>{{{highlightd3|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{e3|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{e3|{{emptySquare}}}}}</div>{{{highlighte3|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{f3|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{f3|{{emptySquare}}}}}</div>{{{highlightf3|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{g3|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{g3|{{emptySquare}}}}}</div>{{{highlightg3|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{h3|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{h3|{{emptySquare}}}}}</div>{{{highlighth3|{{emptySquare}}}}}</div>
| 3
| 3
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 2  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 2  
| style="background: {{{lightSquareColour|#fff}}};"| {{{a2|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{a2|{{emptySquare}}}}}</div>{{{highlighta2|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{b2|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{b2|{{emptySquare}}}}}</div>{{{highlightb2|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{c2|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{c2|{{emptySquare}}}}}</div>{{{highlightc2|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{d2|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{d2|{{emptySquare}}}}}</div>{{{highlightd2|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{e2|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{e2|{{emptySquare}}}}}</div>{{{highlighte2|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{f2|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{f2|{{emptySquare}}}}}</div>{{{highlightf2|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{g2|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{g2|{{emptySquare}}}}}</div>{{{highlightg2|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{h2|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{h2|{{emptySquare}}}}}</div>{{{highlighth2|{{emptySquare}}}}}</div>
| 2
| 2
|-
|-
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 1  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 1  
| style="background: {{{darkSquareColour |#ddd}}};"| {{{a1|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{a1|{{emptySquare}}}}}</div>{{{highlighta1|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{b1|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{b1|{{emptySquare}}}}}</div>{{{highlightb1|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{c1|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{c1|{{emptySquare}}}}}</div>{{{highlightc1|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{d1|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{d1|{{emptySquare}}}}}</div>{{{highlightd1|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{e1|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{e1|{{emptySquare}}}}}</div>{{{highlighte1|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{f1|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{f1|{{emptySquare}}}}}</div>{{{highlightf1|{{emptySquare}}}}}</div>
| style="background: {{{darkSquareColour |#ddd}}};"| {{{g1|{{emptySquare}}}}}
| style="background: {{{darkSquareColour |#ddd}}};"| <div style="position:relative;"><div style="position:absolute;">{{{g1|{{emptySquare}}}}}</div>{{{highlightg1|{{emptySquare}}}}}</div>
| style="background: {{{lightSquareColour|#fff}}};"| {{{h1|{{emptySquare}}}}}
| style="background: {{{lightSquareColour|#fff}}};"| <div style="position:relative;"><div style="position:absolute;">{{{h1|{{emptySquare}}}}}</div>{{{highlighth1|{{emptySquare}}}}}</div>
| 1
| 1
|-
|-
Line 115: Line 115:
|}
|}
<noinclude>
<noinclude>
Simply copy & paste the template below into your wiki page.
Simply copy & paste the chessboard template below into a BGA wiki page.
The default parameter values are as shown:
 
{|  
Game Help pages (e.g. '[[Gamehelpchess|GameHelpChess]]') also display on BGA's Rules Summary pages
| style="padding-right: 2em;"| <code>numbersColumnWidth=20px</code>
 
| style="padding-right: 2em;"| <code>squareSize=45px</code> ''45px is the minimum square size''
e.g. https://boardgamearena.com/gamepanel?game=chess under HOW TO PLAY? > See More > RULES SUMMARY
| style="padding-right: 2em;"| <code>lightSquareColour=#fff</code> ''white''
| style="padding-right: 2em;"| <code>darkSquareColour=#ddd</code> ''light grey''
|}
<pre>
<pre>
{{chessboard | numbersColumnWidth=20px | squareSize=45px | lightSquareColour=#fff | darkSquareColour=#ddd
{{chessboard | maxWidth=400px | numbersColumnWidth=20px | squareSize=45px | lightSquareColour=#fff | darkSquareColour=#ddd
| a8= | b8= | c8= | d8= | e8= | f8= | g8= | h8=  
| a8= | b8= | c8= | d8= | e8= | f8= | g8= | h8=  
| a7= | b7= | c7= | d7= | e7= | f7= | g7= | h7=  
| a7= | b7= | c7= | d7= | e7= | f7= | g7= | h7=  
Line 135: Line 132:
}}
}}
</pre>
</pre>
 
The default parameter values are as shown:
== Formatted for BGA's RULES SUMMARY pages ==
{|
 
| style="vertical-align: top;"| <code>maxWidth=400px</code>
{| class="wikitable" style="max-width: 440px; text-align:center;"
|-
| style="vertical-align: top;"| <code>numbersColumnWidth=20px</code>
|-
| style="vertical-align: top;"| <code>squareSize=45px</code>
|| 45px is the minimum square size
|-
| style="vertical-align: top;"| <code>lightSquareColour=#fff</code>
|| white
|-
|-
|
| style="vertical-align: top;"| <code>darkSquareColour=#ddd</code>
{{chessboard | numbersColumnWidth=20px | squareSize=45px | lightSquareColour=#efe | darkSquareColour=#cdc
|| light grey
| a8={{emptySquare}}| b8={{emptySquare}}| c8={{emptySquare}}| d8={{emptySquare}}| e8={{emptySquare}}| f8={{emptySquare}}| g8={{emptySquare}}| h8={{emptySquare}}
| a7={{emptySquare}}| b7={{emptySquare}}| c7={{emptySquare}}| d7={{emptySquare}}| e7={{emptySquare}}| f7={{emptySquare}}| g7={{emptySquare}}| h7={{emptySquare}}
| a6={{emptySquare}}| b6={{emptySquare}}| c6={{emptySquare}}| d6={{emptySquare}}| e6={{emptySquare}}| f6={{emptySquare}}| g6={{emptySquare}}| h6={{emptySquare}}
| a5={{emptySquare}}| b5={{emptySquare}}| c5={{emptySquare}}| d5={{emptySquare}}| e5={{emptySquare}}| f5={{emptySquare}}| g5={{emptySquare}}| h5={{emptySquare}}
| a4={{emptySquare}}| b4={{emptySquare}}| c4={{emptySquare}}| d4={{emptySquare}}| e4={{emptySquare}}| f4={{emptySquare}}| g4={{emptySquare}}| h4={{emptySquare}}
| a3={{emptySquare}}| b3={{emptySquare}}| c3={{emptySquare}}| d3={{emptySquare}}| e3={{emptySquare}}| f3={{emptySquare}}| g3={{emptySquare}}| h3={{emptySquare}}
| a2={{emptySquare}}| b2={{emptySquare}}| c2={{emptySquare}}| d2={{emptySquare}}| e2={{emptySquare}}| f2={{emptySquare}}| g2={{emptySquare}}| h2={{emptySquare}}
| a1={{emptySquare}}| b1={{emptySquare}}| c1={{emptySquare}}| d1={{emptySquare}}| e1={{emptySquare}}| f1={{emptySquare}}| g1={{emptySquare}}| h1={{emptySquare}}
}}
|}
Place the chessboard template in a wikitable with empty 45px squares to preserve dimensions for display on game RULES SUMMARY pages
 
e.g. https://boardgamearena.com/gamepanel?game=chess under HOW TO PLAY? > See More > RULES SUMMARY
<pre>
{| class="wikitable" style="max-width: 440px; text-align:center;"
|-
|-
|
| style="vertical-align: top;"| <code>highlighta8=</code>
{{chessboard | numbersColumnWidth=20px | squareSize=45px | lightSquareColour=#efe | darkSquareColour=#cdc
|| optionally highlight any square using: <code>highlight</code><code>[file]</code><code>[rank]</code><code>=</code><code><nowiki>{{redSquare}}</nowiki></code> or <code><nowiki>{{greenSquare}}</nowiki></code> or <code><nowiki>{{blueSquare}}</nowiki></code>
| a8={{emptySquare}}| b8={{emptySquare}}| c8={{emptySquare}}| d8={{emptySquare}}| e8={{emptySquare}}| f8={{emptySquare}}| g8={{emptySquare}}| h8={{emptySquare}}
| a7={{emptySquare}}| b7={{emptySquare}}| c7={{emptySquare}}| d7={{emptySquare}}| e7={{emptySquare}}| f7={{emptySquare}}| g7={{emptySquare}}| h7={{emptySquare}}
| a6={{emptySquare}}| b6={{emptySquare}}| c6={{emptySquare}}| d6={{emptySquare}}| e6={{emptySquare}}| f6={{emptySquare}}| g6={{emptySquare}}| h6={{emptySquare}}
| a5={{emptySquare}}| b5={{emptySquare}}| c5={{emptySquare}}| d5={{emptySquare}}| e5={{emptySquare}}| f5={{emptySquare}}| g5={{emptySquare}}| h5={{emptySquare}}
| a4={{emptySquare}}| b4={{emptySquare}}| c4={{emptySquare}}| d4={{emptySquare}}| e4={{emptySquare}}| f4={{emptySquare}}| g4={{emptySquare}}| h4={{emptySquare}}
| a3={{emptySquare}}| b3={{emptySquare}}| c3={{emptySquare}}| d3={{emptySquare}}| e3={{emptySquare}}| f3={{emptySquare}}| g3={{emptySquare}}| h3={{emptySquare}}
| a2={{emptySquare}}| b2={{emptySquare}}| c2={{emptySquare}}| d2={{emptySquare}}| e2={{emptySquare}}| f2={{emptySquare}}| g2={{emptySquare}}| h2={{emptySquare}}
| a1={{emptySquare}}| b1={{emptySquare}}| c1={{emptySquare}}| d1={{emptySquare}}| e1={{emptySquare}}| f1={{emptySquare}}| g1={{emptySquare}}| h1={{emptySquare}}
}}
|}
|}
</pre>


== Chess starting position ==
== Chess starting position ==


{{chessboard | numbersColumnWidth=20px | squareSize=45px | lightSquareColour=#efe | darkSquareColour=#cdc
{{chessboard | lightSquareColour=#efe | darkSquareColour=#cdc
| a8={{blackRook}}  | b8={{blackKnight}}| c8={{blackBishop}}| d8={{blackQueen}} | e8={{blackKing}}  | f8={{blackBishop}}| g8={{blackKnight}}| h8={{blackRook}}
| a8={{blackRook}}  | b8={{blackKnight}}| c8={{blackBishop}}| d8={{blackQueen}} | e8={{blackKing}}  | f8={{blackBishop}}| g8={{blackKnight}}| h8={{blackRook}}
| a7={{blackPawn}}  | b7={{blackPawn}}  | c7={{blackPawn}}  | d7={{blackPawn}}  | e7={{blackPawn}}  | f7={{blackPawn}}  | g7={{blackPawn}}  | h7={{blackPawn}}
| a7={{blackPawn}}  | b7={{blackPawn}}  | c7={{blackPawn}}  | d7={{blackPawn}}  | e7={{blackPawn}}  | f7={{blackPawn}}  | g7={{blackPawn}}  | h7={{blackPawn}}
| a6={{emptySquare}}| b6={{emptySquare}}| c6={{emptySquare}}| d6={{emptySquare}}| e6={{emptySquare}}| f6={{emptySquare}}| g6={{emptySquare}}| h6={{emptySquare}}
| a6=               | b6=               | c6=               | d6=               | e6=               | f6=               | g6=               | h6=              
| a5={{emptySquare}}| b5={{emptySquare}}| c5={{emptySquare}}| d5={{emptySquare}}| e5={{emptySquare}}| f5={{emptySquare}}| g5={{emptySquare}}| h5={{emptySquare}}
| a5=               | b5=               | c5=               | d5=               | e5=               | f5=               | g5=               | h5=              
| a4={{emptySquare}}| b4={{emptySquare}}| c4={{emptySquare}}| d4={{emptySquare}}| e4={{emptySquare}}| f4={{emptySquare}}| g4={{emptySquare}}| h4={{emptySquare}}
| a4=               | b4=               | c4=               | d4=               | e4=               | f4=               | g4=               | h4=              
| a3={{emptySquare}}| b3={{emptySquare}}| c3={{emptySquare}}| d3={{emptySquare}}| e3={{emptySquare}}| f3={{emptySquare}}| g3={{emptySquare}}| h3={{emptySquare}}
| a3=               | b3=               | c3=               | d3=               | e3=               | f3=               | g3=               | h3=              
| a2={{whitePawn}}  | b2={{whitePawn}}  | c2={{whitePawn}}  | d2={{whitePawn}}  | e2={{whitePawn}}  | f2={{whitePawn}}  | g2={{whitePawn}}  | h2={{whitePawn}}
| a2={{whitePawn}}  | b2={{whitePawn}}  | c2={{whitePawn}}  | d2={{whitePawn}}  | e2={{whitePawn}}  | f2={{whitePawn}}  | g2={{whitePawn}}  | h2={{whitePawn}}
| a1={{whiteRook}}  | b1={{whiteKnight}}| c1={{whiteBishop}}| d1={{whiteQueen}} | e1={{whiteKing}}  | f1={{whiteBishop}}| g1={{whiteKnight}}| h1={{whiteRook}}
| a1={{whiteRook}}  | b1={{whiteKnight}}| c1={{whiteBishop}}| d1={{whiteQueen}} | e1={{whiteKing}}  | f1={{whiteBishop}}| g1={{whiteKnight}}| h1={{whiteRook}}
}}
}}
<pre>
<pre>
{{chessboard | numbersColumnWidth=20px | squareSize=45px | lightSquareColour=#efe | darkSquareColour=#cdc
{{chessboard | lightSquareColour=#efe | darkSquareColour=#cdc
| a8={{blackRook}}  | b8={{blackKnight}}| c8={{blackBishop}}| d8={{blackQueen}} | e8={{blackKing}}  | f8={{blackBishop}}| g8={{blackKnight}}| h8={{blackRook}}
| a8={{blackRook}}  | b8={{blackKnight}}| c8={{blackBishop}}| d8={{blackQueen}} | e8={{blackKing}}  | f8={{blackBishop}}| g8={{blackKnight}}| h8={{blackRook}}
| a7={{blackPawn}}  | b7={{blackPawn}}  | c7={{blackPawn}}  | d7={{blackPawn}}  | e7={{blackPawn}}  | f7={{blackPawn}}  | g7={{blackPawn}}  | h7={{blackPawn}}
| a7={{blackPawn}}  | b7={{blackPawn}}  | c7={{blackPawn}}  | d7={{blackPawn}}  | e7={{blackPawn}}  | f7={{blackPawn}}  | g7={{blackPawn}}  | h7={{blackPawn}}
| a6={{emptySquare}}| b6={{emptySquare}}| c6={{emptySquare}}| d6={{emptySquare}}| e6={{emptySquare}}| f6={{emptySquare}}| g6={{emptySquare}}| h6={{emptySquare}}
| a6=               | b6=               | c6=               | d6=               | e6=               | f6=               | g6=               | h6=              
| a5={{emptySquare}}| b5={{emptySquare}}| c5={{emptySquare}}| d5={{emptySquare}}| e5={{emptySquare}}| f5={{emptySquare}}| g5={{emptySquare}}| h5={{emptySquare}}
| a5=               | b5=               | c5=               | d5=               | e5=               | f5=               | g5=               | h5=              
| a4={{emptySquare}}| b4={{emptySquare}}| c4={{emptySquare}}| d4={{emptySquare}}| e4={{emptySquare}}| f4={{emptySquare}}| g4={{emptySquare}}| h4={{emptySquare}}
| a4=               | b4=               | c4=               | d4=               | e4=               | f4=               | g4=               | h4=              
| a3={{emptySquare}}| b3={{emptySquare}}| c3={{emptySquare}}| d3={{emptySquare}}| e3={{emptySquare}}| f3={{emptySquare}}| g3={{emptySquare}}| h3={{emptySquare}}
| a3=               | b3=               | c3=               | d3=               | e3=               | f3=               | g3=               | h3=              
| a2={{whitePawn}}  | b2={{whitePawn}}  | c2={{whitePawn}}  | d2={{whitePawn}}  | e2={{whitePawn}}  | f2={{whitePawn}}  | g2={{whitePawn}}  | h2={{whitePawn}}
| a2={{whitePawn}}  | b2={{whitePawn}}  | c2={{whitePawn}}  | d2={{whitePawn}}  | e2={{whitePawn}}  | f2={{whitePawn}}  | g2={{whitePawn}}  | h2={{whitePawn}}
| a1={{whiteRook}}  | b1={{whiteKnight}}| c1={{whiteBishop}}| d1={{whiteQueen}} | e1={{whiteKing}}  | f1={{whiteBishop}}| g1={{whiteKnight}}| h1={{whiteRook}}
| a1={{whiteRook}}  | b1={{whiteKnight}}| c1={{whiteBishop}}| d1={{whiteQueen}} | e1={{whiteKing}}  | f1={{whiteBishop}}| g1={{whiteKnight}}| h1={{whiteRook}}

Revision as of 17:26, 6 December 2021

Basic empty chessboard

A B C D E F G H
8
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
8
7
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
7
6
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
6
5
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
5
4
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
4
3
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
3
2
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
2
1
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
1
A B C D E F G H

Simply copy & paste the chessboard template below into a BGA wiki page.

Game Help pages (e.g. 'GameHelpChess') also display on BGA's Rules Summary pages

e.g. https://boardgamearena.com/gamepanel?game=chess under HOW TO PLAY? > See More > RULES SUMMARY

{{chessboard | maxWidth=400px | numbersColumnWidth=20px | squareSize=45px | lightSquareColour=#fff | darkSquareColour=#ddd
| a8= | b8= | c8= | d8= | e8= | f8= | g8= | h8= 
| a7= | b7= | c7= | d7= | e7= | f7= | g7= | h7= 
| a6= | b6= | c6= | d6= | e6= | f6= | g6= | h6= 
| a5= | b5= | c5= | d5= | e5= | f5= | g5= | h5= 
| a4= | b4= | c4= | d4= | e4= | f4= | g4= | h4= 
| a3= | b3= | c3= | d3= | e3= | f3= | g3= | h3= 
| a2= | b2= | c2= | d2= | e2= | f2= | g2= | h2= 
| a1= | b1= | c1= | d1= | e1= | f1= | g1= | h1= 
}}

The default parameter values are as shown:

maxWidth=400px
numbersColumnWidth=20px
squareSize=45px 45px is the minimum square size
lightSquareColour=#fff white
darkSquareColour=#ddd light grey
highlighta8= optionally highlight any square using: highlight[file][rank]={{redSquare}} or {{greenSquare}} or {{blueSquare}}

Chess starting position

A B C D E F G H
8
Rook
Empty Square
Knight
Empty Square
Bishop
Empty Square
Queen
Empty Square
King
Empty Square
Bishop
Empty Square
Knight
Empty Square
Rook
Empty Square
8
7
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
7
6
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
6
5
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
5
4
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
4
3
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
Empty Square
3
2
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
Pawn
Empty Square
2
1
Rook
Empty Square
Knight
Empty Square
Bishop
Empty Square
Queen
Empty Square
King
Empty Square
Bishop
Empty Square
Knight
Empty Square
Rook
Empty Square
1
A B C D E F G H
{{chessboard | lightSquareColour=#efe | darkSquareColour=#cdc
| a8={{blackRook}}  | b8={{blackKnight}}| c8={{blackBishop}}| d8={{blackQueen}} | e8={{blackKing}}  | f8={{blackBishop}}| g8={{blackKnight}}| h8={{blackRook}}
| a7={{blackPawn}}  | b7={{blackPawn}}  | c7={{blackPawn}}  | d7={{blackPawn}}  | e7={{blackPawn}}  | f7={{blackPawn}}  | g7={{blackPawn}}  | h7={{blackPawn}}
| a6=               | b6=               | c6=               | d6=               | e6=               | f6=               | g6=               | h6=               
| a5=               | b5=               | c5=               | d5=               | e5=               | f5=               | g5=               | h5=               
| a4=               | b4=               | c4=               | d4=               | e4=               | f4=               | g4=               | h4=               
| a3=               | b3=               | c3=               | d3=               | e3=               | f3=               | g3=               | h3=               
| a2={{whitePawn}}  | b2={{whitePawn}}  | c2={{whitePawn}}  | d2={{whitePawn}}  | e2={{whitePawn}}  | f2={{whitePawn}}  | g2={{whitePawn}}  | h2={{whitePawn}}
| a1={{whiteRook}}  | b1={{whiteKnight}}| c1={{whiteBishop}}| d1={{whiteQueen}} | e1={{whiteKing}}  | f1={{whiteBishop}}| g1={{whiteKnight}}| h1={{whiteRook}}
}}