Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a258a0136b552877

Jump to content

Template:Signpost/Crossword/doc

From Wikipedia, the free encyclopedia

Crossword templates

[edit]

Header template

[edit]
Template:Signpost/Crossword

This will open a table for the crossword and import the stylesheet. Use it at the beginning.

Row template

[edit]
Template:Signpost/Crossword row

This is for making individual rows in the table.

Cell template

[edit]
Template:Signpost/Crossword cell

Provides a row for a crossword cell. You don't need to use this one directly, it's called by the row template.

Usage

[edit]

Use 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:

Clue templates

[edit]

Clues are formatted in a table, with three columns (number, clue, and answer).

{{Signpost/Crossword clues begin}}

Opens a table for the crossword clues.

{{Signpost/Crossword clues|Across}}

Give a header (styled as a h4) for the "across" section of clues.

{{Signpost/Crossword clues|Down}}

Give a header (styled as a h4) for the "down" section of clues.

{{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

[edit]

Something 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 

Classes and styles

[edit]
  • signpost-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>


Check them out

[edit]