Шаблон:NavBox/doc

Материал из Энциклопедия StarCraft
Перейти к навигацииПерейти к поиску

Usage[править]

Template:NavBox, Template:NavBox/row, Template:NavBox/head and Template:NavBox/empty are used in unison to construct navigation boxes.

Template:NavBox is the box's base. Any value in show expands the box automatically upon page load. Replace {{{1}}} with any number and combination of Template:NavBox/row, Template:NavBox/head and Template:NavBox/empty. Add additional CSS properties to the box using style.

{{NavBox
|bgcolor=
|fgcolor=
|style=
|name=
|show=
|{{{1}}}
}}

Template:NavBox/head creates area with a background colour inside Template:NavBox or Template:NavBox. Enter the text to be displayed in {{{1}}}.

{{NavBox/head
|bgcolor=
|fgcolor=
|{{{1}}}
}}

Template:NavBox/empty creates area with a black background colour inside Template:NavBox or Template:NavBox. Enter the text to be displayed in its single field.

{{NavBox/empty
|bgcolor=
|fgcolor=
|{{{1}}}
}}

Template:NavBox/row generates a two-column row. Replace field {{{1}}} with the row's title, which is displayed in the left column. Replace field {{{2}}} with any number and combination of Template:NavBox/row, Template:NavBox/head and Template:NavBox/empty.

{{NavBox/row
|{{{1}}}
|{{{2}}}
}}

To avoid extraneous newlines, observe the arrangement of the closing braces on the last line in the example below.

When web links, it may be necessary to escape = characters with =.

Optional Fields[править]

The following are some notes on optional fields.

  • bgcolor
    • Manually sets the background color of the header text.
    • If using hex triplet (ex. #000000) the # must be replaced with #.
  • fgcolor
    • Manually sets the foreground color of the header text.
    • If using hex triplet (ex. #000000) the # must be replaced with #.

Example[править]

{{NavBox
|name=Test
|{{NavBox/empty
|Argh!
}}
{{NavBox/head
|Polka Dots
}}
{{NavBox/row
|Dressup
|{{NavBox/head
|Polka Dots 2
}}
{{NavBox/empty
|Argh 2!
}}
{{NavBox/row
|Dressup 2
|{{NavBox/head
|Polka Dots 3
}}
{{NavBox/empty
|Argh 3!
}}
{{NavBox/row
|Dressup 3
|{{NavBox/head
|Polka Dots 4
}}
{{NavBox/empty
|Argh 4!
}} }} }} }} }}