Template:Infobox

From Moeverse Wiki

General purpose Infobox, can be used as a base for other Infobox Templates or custom Infoboxes which Template existence is not justified.

Usage

An Infobox consists of a title, an image, and the data in a key-value form, which may also be organized with headers. There can also be a footnote. Everything is optional, but if a key if used, its value must also be set. Setting a value without its key will do nothing.

The title is set with the header0 parameter and the image with the image parameter, which value must be the file name of an existing image (without File: prefix). images is an alternative that offers more flexibility for the representation of the subject, in particular it allows the insertion of a Tabbed Gallery. It may also be used for purposes other than displaying images.

50 fields/headers are available for the data. Headers can be set with header1, header2, ..., header50 while data are set with key1 and its respective value1, up to key50/value50. The lines will be presented from top to bottom as the number increase, and it is not necessary to use consecutive numbers.

The use of a given header will disable its corresponding key/value, so if header10 was used, then key10 and value10 will do nothing.

A footnote can be provided with the footnote parameter.

The Infobox' background can be changed with the background parameter, which must be a valid value for the CSS property background-color. The border color can also be changed with the border parameter, and must be a valid color for the CSS property border.

Examples

header0
header1
key2value2
key3value3
header4
key5value5
key6value6
key7value7
{{Infobox
|background = #000020
|border  = #000080
|header0 = header0
|image   = No Image.svg
|header1 = header1
|key2    = key2
|value2  = value2
|key3    = key3
|value3  = value3
|header4 = header4
|key5    = key5
|value5  = value5
|key6    = key6
|value6  = value6
|key7    = key7
|value7  = value7
}}
header0
header1
key2value2
key5value5
header10
key11value11
key13value13
key17value17

Numbers do not have to be contiguous, this may be useful for future proofing, for example if one desires to add something between 2 and 5 with key3/value3 later without having to change 5, 10, 11, 13 and 17.

{{Infobox
|header0  = header0
|image    = No Image.svg
|header1  = header1
|key2     = key2
|value2   = value2
|key5     = key5
|value5   = value5
|header10 = header10
|key11    = key11
|value11  = value11
|key13    = key13
|value13  = value13
|key17    = key17
|value17  = value17
}}
header0
key1value1
key2value2
{{Infobox
|background = linear-gradient(45deg, rgba(255, 255, 0, 0.25) 0%, rgba(128, 128, 0, 0.25) 100%)
|border   = rgba(255, 255, 0, 0.5)
|header0  = header0
|key1     = key1
|value1   = value1
|key2     = key2
|value2   = value2
|footnote = [[Template:Infobox|How to make your own Infobox]]
}}