Template:Chessboard
Jump to navigation
Jump to search
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 |
[edit] [ ] Template documentation
Instructions
Default template is thus:
{{chessboard|img=gif |rb|nb|bb|qb|kb|bb|nb|rb |pb|pb|pb|pb|pb|pb|pb|pb | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |pw|pw|pw|pw|pw|pw|pw|pw |rw|nw|bw|qw|kw|bw|nw|rw }}
Appears as:
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 |
Note:
- Now supports both PNG and GIF. Try to use GIF except for personal usage (a game between two users who both agreen png looks better), as gif is more universally supported by browsers.
- Now supports different sizes. Changing the first line to
{{chessboard|img=gif|size=22
- will create a chessboard half the size. Default size is 44px.
History
Past versions required "End each line with |= to prevent the next number parameter being implemented."
This is no longer necessary: because Template:Trim is used, newlines don't mess up the rendering. In fact, ending lines with |=
should be avoided, lest this be tracked as an error in the hidden maintenance category Category:Pages using duplicate arguments in template calls.