Wolna encyklopedia

To jest podstrona dokumentacji dla strony Szablon:Navbox podgrupa.
Zawiera ona informacje na temat użycia tej strony, jej kategoryzację i inną zawartość niebędącą częścią oryginalnej strony.

Szablon:Navbox suite

This template is designed to be used with {{Navbox}} or other navigational templates that allow creating lists of links with groups headers or titles. This template allows the creation of subgroups that can be assigned to a list item within {{Navbox}}. A subgroup may contain up to 20 list items.

Spis treści

Pusty szablon

{{Navbox subgroup
| groupstyle = 
| liststyle  = 

| group1 = 
| list1  = 
| group2 = 
| list2  = 
...
| group20 = 
| list20  = 
}}

Parameters

This template employs all parameters of {{Navbox}}. Please see the documentation there for more complete descriptions. In fact, the only differences between this template and {{Navbox}} are as follows:

Everything else is exactly the same as {{Navbox}}.

Only the most common parameters are listed below.

Cells

listn
(i.e. list1, list2, ... list20) The body of the template, usually a list of links. Format is inline. At least one list parameter is required; each additional list is displayed in a separate row of the table. Each listn may be preceded by a corresponding groupn parameter, if provided (see below). The background color of the list items (and the entire table) defaults to transparent, therefore it displays the same background color used in the parent navigation box.
groupn
(i.e. group1, group2, ..., group20) If specified, text appears in a header cell displayed to the left of listn. If omitted, listn uses the full width of the table. The background color defaults to #ddf (a truncated form of #ddddff), but can be changed via the groupstyle parameter (see below).

Style

bodystyle
Specifies CSS styles to apply to the template body. Examples:
background:#nnnnnn;
text-align:[right/center/left/justified];
groupstyle
CSS styles to apply to the groupn cells. This option overrides any styles that are applied to the entire table. Examples:
background:#nnnnnn;
text-align:[left/center/right];
vertical-align:[top/middle/bottom];
white-space:nowrap;
liststyle
CSS styles to apply to all lists. Overridden by the oddstyle and evenstyle parameters (if specified) below.
oddstyle
evenstyle
CSS styles to apply to the odd-numbered list items (list1, list3, etc) or even-numbered list items (list2, list4, etc), respectively. Typically used to set background color (background:#nnnnnn;) in order to achieve an alternating background color between odd and even-numbered lists.
evenodd [swap, even, odd, off]
If set to swap, then the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. Setting to even or odd sets all rows to have that striping color. Setting to off disables automatic row striping.

Ustawianie szerokości grup

If multiple {{Navbox subgroup}} templates are used inside of a parent {{Navbox}}, it generally looks better if the width of the groups matches up. In order to do this, one must set the groupstyle parameters to contain the desired width, and the liststyle parameters to have width:auto (due to HTML/CSS reasons). For example, place the following code in each {{Navbox subgroup}} to adjust the widths:

groupstyle = width:10em;
liststyle = width:auto;

If you also use the image or imageleft parameters, then you will most likely also need to set their width manually using the imagestyle and imageleftstyle parameters.

Przykłady

Przykład 1

Przykład użycia szablonu navbox podgrupa zastosowanego wewnątrz szablonu Navbox The following is an example of Navbox subgroup used within a Navbox template.

{{Navbox
| state  = uncollapsed
| name   = Państwa świata
| title  = Państwa świata
| group1 = Europa
| list1  =
  {{Navbox podgrupa
  | group1 = Skandynawia
  | list1  = [[Szwecja]] • [[Finlandia]]
  | group2 = Bałkany
  | list2  = [[Serbia]] • [[Albania]]
  | group3 = Europa Zachodnia
  | list3  = [[Francja]] • [[Niemcy]]
  }}
| group2 = Azja
| list2  = [[Japonia]] • [[Chiny]] • [[Korea Północna]]
}}

Przykład 2

Przykładowa lista stosująca poziome nagłówki grup przez przypisanie nagłówków do list1 i list3 i linków do list2 and list4), i stosująca list1style i list3style do ustawienia tła nagłówków.

{{Navbox
| state = expanded
| name  = Cesarze rzymscy
| title = Cesarze rzymscy
| group1 = Kryzys 235 AD - 284 AD
| list1  = [[Maximinus Thrax]] • [[Gordian I]] • [[Gordian II]] • [[Pupienus]] and [[Balbinus]] • [[Gordian III]] • [[Philip the Arab]] • [[Decius]] • [[Trebonianus Gallus]] • [[Aemilianus]] • [[Valerian (emperor)|Valerian]] • [[Gallienus]] • [[Claudius II]] • [[Quintillus]] • [[Aurelian]] • [[Marcus Claudius Tacitus]] • [[Florianus]] • [[Probus]] • [[Carus]] • [[Numerian]] • [[Carinus]]
| group2 = Dominacja
| list2  = 
  {{Navbox podgrupa
   |list1style = background:#ddf;
   |list1 = '''284 AD - 395 AD'''
   |list2 = [[Diocletian]] • [[Maximian]] • [[Constantius Chlorus|Constantius I]] • [[Galerius]] • [[Flavius Valerius Severus|Severus II]] • [[Maxentius]] • [[Maximinus]] • [[Licinius]] • [[Constantine I]] • [[Constantine II (emperor)|Constantine II]] • [[Constans|Constans I]] • [[Constantius II]] • [[Julian the Apostate]] • [[Jovian]] • [[Valentinian I]] • [[Valens]] • [[Gratian]] • [[Valentinian II]] • [[Eugenius]] • [[Theodosius I]]
   |list3style = background:#ddf;
   |list3 = '''Imperium zachodnie (393 AD - 476 AD)'''
   |list4 = [[Flavius Honorius]] • [[Constantius III]] • [[Joannes]] • [[Valentinian III]] • [[Petronius Maximus]] • [[Avitus]] • [[Majorian]] • [[Libius Severus]] • [[Anthemius]] • [[Olybrius]] • [[Glycerius]] • [[Julius Nepos]] • [[Romulus Augustus]]
  }}
}}

Zobacz też