This is a documentation subpage for Template:Signpost/Crossword. It may contain usage information, categories and other content that is not part of the original template page. |
This template uses TemplateStyles: |
Crossword templates
editHeader template
editThis will open a table for the crossword and import the stylesheet. Use it at the beginning.
Row template
editThis is for making individual rows in the table.
Cell template
editProvides a row for a crossword cell. You don't need to use this one directly, it's called by the row template.
Usage
editUse the crossword template to start the table and load the styles, then use the row template to construct rows. Supply parameters like this:
.
: Unfillable cell, no input box, background color.0
: Fillable cell with no number.1–42
: Fillable cell with number in background of cell.
It should look like this:
{{Signpost/Crossword}}
{{Signpost/Crossword row|1 |2 |0 |4 |5 }}
{{Signpost/Crossword row|6 |0 |. |7 |0 }}
{{Signpost/Crossword row|8 |0 |0 |0 |0 }}
{{Signpost/Crossword row|9 |0 |. |10|0 }}
{{Signpost/Crossword row|11|0 |0 |0 |0 }}
|}
1
|
2
|
4
|
5
| |
6
|
7
|
|||
8
|
||||
9
|
10
|
|||
11
|
This example has five columns but you can have as many as you want, up to 42 (of course it can be made bigger if we end up with a crossword wider than 42 squares, the code would be very simple).
Blank, to copy:
Blank 5x5 to copy
|
---|
With all blank squares: {{Signpost/Crossword}}
{{Signpost/Crossword row|. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. }}
|}
With all empty squares: {{Signpost/Crossword}}
{{Signpost/Crossword row|0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 }}
|}
|
Blank 10x10 to copy
|
---|
With all blank squares:
{{Signpost/Crossword}}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
{{Signpost/Crossword row|. |. |. |. |. |. |. |. |. |. }}
|}
With all empty squares: {{Signpost/Crossword}}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
{{Signpost/Crossword row|0 |0 |0 |0 |0 |0 |0 |0 |0 |0 }}
|}
|
Note for extreme nerds
| ||||||
---|---|---|---|---|---|---|
You can also do this old-school style, with individual cell templates. I don't know why you'd want to do this, but it's technically possible. {{Signpost/Crossword}}
{{Signpost/Crossword cell|.}}
{{Signpost/Crossword cell|1}}
{{Signpost/Crossword cell|0}}
|-
{{Signpost/Crossword cell|2}}
{{Signpost/Crossword cell|0}}
{{Signpost/Crossword cell|0}}
|}
|
Clue templates
editClues are formatted in a table, with three columns (number, clue, and answer).
{{Template:Signpost/Crossword clues begin}}
- Opens a table for the crossword clues.
{{Template:Signpost/Crossword clues|Across}}
- Give a header (styled as a
h4
) for the "across" section of clues.
{{Template:Signpost/Crossword clues|Down}}
- Give a header (styled as a
h4
) for the "down" section of clues.
{{Template:Signpost/Crossword clue }}
- Template for a crossword clue (same template is used for ACROSS and DOWN clues). Parameters are positional, and given as follows:
1
: Number.2
: Clue text.3
: Answer.
|}
- Necessary to close the table. Don't forget this!
Usage
editSomething like this:
{{Signpost/Crossword clues begin}}
{{Signpost/Crossword clues}}
{{Signpost/Crossword clues|Across}}
{{Signpost/Crossword clue | 1|Popular orange vegetable|CARROT}}
{{Signpost/Crossword clue | 3|Bone filling|MARROW}}
{{Signpost/Crossword clue | 5|Popular white flower|YARROW}}
{{Signpost/Crossword clues}}
{{Signpost/Crossword clues|Down}}
{{Signpost/Crossword clue | 2|Reminiscent of bow ammunition|ARROWY}}
{{Signpost/Crossword clue | 4|Characteristic of improper technique|ERRORY}}
{{Signpost/Crossword clue | 451|Mechanical model of the solar system|ORRERY}}
|}
Produces this:
Across | ||
1 | Popular orange vegetable | CARROT |
3 | Popular white flower | YARROW |
5 | Popular wheeled conveyance for 1-across and 3-across in the garden | BARROW |
7 | Bone filling | MARROW |
Down | ||
2 | Reminiscent of bow ammunition | ARROWY |
4 | Characteristic of improper technique | ERRORY |
451 | Mechanical model of the solar system | ORRERY |
XXXXXX
Classes and styles
editsignpost-crossword
- The entire table that constitutes the crossword
signpost-crossword-cell
- Individual cell
signpost-crossword-bgtext-wrap
- Wrapper for the bgtext div as well as the actual inputbox
signpost-crossword-bgtext-span
- Background text for the cell (either the cell's number, or nothing)
signpost-crossword-inputbox
- Div to wrap the actual inputbox in the cell (which is
.signpost-crossword-inputbox .commentboxInput
).mw-ui-button
- The button created by the inputbox tag -- we're using CSS to set this not to display
signpost-crossword-cluetable
- Class for the table of clues
signpost-crossword-cluetable-answer
- Answer -- formatted as monospace text with the same color as background. This causes some accessibility issues but per phab:T31118 they won't let us use
<details>
and<summary>