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 empty chessboard and chess starting position in comments for easy copy & paste)
(added size and colour variables)
Line 2: Line 2:
copy empty chessboard:
copy empty chessboard:


{{chessboard
{{chessboard | 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 15: Line 15:
copy chess starting position:
copy chess starting position:


{{chessboard
{{chessboard | numbersColumnWidth=20px | squareSize=45px | lightSquareColour=#fff | darkSquareColour=#ddd
| 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}}
Line 29: Line 29:
{| style="text-align:center;"
{| style="text-align:center;"
|-
|-
| style="width: 20px; height: 20px;"|
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{numbersColumnWidth|20px}}};"|
| style="width: 45px; height: 20px;"| A
| style="width: {{{squareSize|45px}}}; height: {{{numbersColumnWidth|20px}}};"| A
| style="width: 45px; height: 20px;"| B
| style="width: {{{squareSize|45px}}}; height: {{{numbersColumnWidth|20px}}};"| B
| style="width: 45px; height: 20px;"| C
| style="width: {{{squareSize|45px}}}; height: {{{numbersColumnWidth|20px}}};"| C
| style="width: 45px; height: 20px;"| D
| style="width: {{{squareSize|45px}}}; height: {{{numbersColumnWidth|20px}}};"| D
| style="width: 45px; height: 20px;"| E
| style="width: {{{squareSize|45px}}}; height: {{{numbersColumnWidth|20px}}};"| E
| style="width: 45px; height: 20px;"| F
| style="width: {{{squareSize|45px}}}; height: {{{numbersColumnWidth|20px}}};"| F
| style="width: 45px; height: 20px;"| G
| style="width: {{{squareSize|45px}}}; height: {{{numbersColumnWidth|20px}}};"| G
| style="width: 45px; height: 20px;"| H
| style="width: {{{squareSize|45px}}}; height: {{{numbersColumnWidth|20px}}};"| H
| style="width: 20px; height: 20px;"|
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{numbersColumnWidth|20px}}};"|
|-
|-
| style="width: 20px; height: 45px;| 8  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};| 8  
| style="background: #fff;"| {{{a8|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{a8|}}}
| style="background: #ddd;"| {{{b8|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{b8|}}}
| style="background: #fff;"| {{{c8|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{c8|}}}
| style="background: #ddd;"| {{{d8|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{d8|}}}
| style="background: #fff;"| {{{e8|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{e8|}}}
| style="background: #ddd;"| {{{f8|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{f8|}}}
| style="background: #fff;"| {{{g8|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{g8|}}}
| style="background: #ddd;"| {{{h8|}}}
| style="background: #ddd;"| {{{h8|}}}
| 8
| 8
|-
|-
| style="width: 20px; height: 45px;"| 7  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 7  
| style="background: #ddd;"| {{{a7|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{a7|}}}
| style="background: #fff;"| {{{b7|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{b7|}}}
| style="background: #ddd;"| {{{c7|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{c7|}}}
| style="background: #fff;"| {{{d7|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{d7|}}}
| style="background: #ddd;"| {{{e7|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{e7|}}}
| style="background: #fff;"| {{{f7|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{f7|}}}
| style="background: #ddd;"| {{{g7|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{g7|}}}
| style="background: #fff;"| {{{h7|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{h7|}}}
| 7
| 7
|-
|-
| style="width: 20px; height: 45px;"| 6  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 6  
| style="background: #fff;"| {{{a6|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{a6|}}}
| style="background: #ddd;"| {{{b6|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{b6|}}}
| style="background: #fff;"| {{{c6|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{c6|}}}
| style="background: #ddd;"| {{{d6|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{d6|}}}
| style="background: #fff;"| {{{e6|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{e6|}}}
| style="background: #ddd;"| {{{f6|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{f6|}}}
| style="background: #fff;"| {{{g6|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{g6|}}}
| style="background: #ddd;"| {{{h6|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{h6|}}}
| 6
| 6
|-
|-
| style="width: 20px; height: 45px;"| 5  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 5  
| style="background: #ddd;"| {{{a5|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{a5|}}}
| style="background: #fff;"| {{{b5|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{b5|}}}
| style="background: #ddd;"| {{{c5|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{c5|}}}
| style="background: #fff;"| {{{d5|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{d5|}}}
| style="background: #ddd;"| {{{e5|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{e5|}}}
| style="background: #fff;"| {{{f5|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{f5|}}}
| style="background: #ddd;"| {{{g5|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{g5|}}}
| style="background: #fff;"| {{{h5|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{h5|}}}
| 5
| 5
|-
|-
| style="width: 20px; height: 45px;"| 4  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 4  
| style="background: #fff;"| {{{a4|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{a4|}}}
| style="background: #ddd;"| {{{b4|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{b4|}}}
| style="background: #fff;"| {{{c4|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{c4|}}}
| style="background: #ddd;"| {{{d4|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{d4|}}}
| style="background: #fff;"| {{{e4|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{e4|}}}
| style="background: #ddd;"| {{{f4|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{f4|}}}
| style="background: #fff;"| {{{g4|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{g4|}}}
| style="background: #ddd;"| {{{h4|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{h4|}}}
| 4
| 4
|-
|-
| style="width: 20px; height: 45px;"| 3  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 3  
| style="background: #ddd;"| {{{a3|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{a3|}}}
| style="background: #fff;"| {{{b3|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{b3|}}}
| style="background: #ddd;"| {{{c3|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{c3|}}}
| style="background: #fff;"| {{{d3|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{d3|}}}
| style="background: #ddd;"| {{{e3|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{e3|}}}
| style="background: #fff;"| {{{f3|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{f3|}}}
| style="background: #ddd;"| {{{g3|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{g3|}}}
| style="background: #fff;"| {{{h3|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{h3|}}}
| 3
| 3
|-
|-
| style="width: 20px; height: 45px;"| 2  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 2  
| style="background: #fff;"| {{{a2|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{a2|}}}
| style="background: #ddd;"| {{{b2|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{b2|}}}
| style="background: #fff;"| {{{c2|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{c2|}}}
| style="background: #ddd;"| {{{d2|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{d2|}}}
| style="background: #fff;"| {{{e2|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{e2|}}}
| style="background: #ddd;"| {{{f2|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{f2|}}}
| style="background: #fff;"| {{{g2|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{g2|}}}
| style="background: #ddd;"| {{{h2|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{h2|}}}
| 2
| 2
|-
|-
| style="width: 20px; height: 45px;"| 1  
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{squareSize|45px}}};"| 1  
| style="background: #ddd;"| {{{a1|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{a1|}}}
| style="background: #fff;"| {{{b1|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{b1|}}}
| style="background: #ddd;"| {{{c1|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{c1|}}}
| style="background: #fff;"| {{{d1|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{d1|}}}
| style="background: #ddd;"| {{{e1|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{e1|}}}
| style="background: #fff;"| {{{f1|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{f1|}}}
| style="background: #ddd;"| {{{g1|}}}
| style="background: {{{darkSquareColour |#ddd}}};"| {{{g1|}}}
| style="background: #fff;"| {{{h1|}}}
| style="background: {{{lightSquareColour|#fff}}};"| {{{h1|}}}
| 1
| 1
|-
|-
| style="width: 20px; height: 20px;"|   
| style="width: {{{numbersColumnWidth|20px}}}; height: {{{numbersColumnWidth|20px}}};"|   
| A  
| A  
| B  
| B  

Revision as of 19:10, 22 November 2021

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