Ло:Template navigation


Комплект
навигационных шаблонов
{{Navbox (beta)}}
{{Navbox long (beta)}}
{{Navbox subgroup (beta)}}
{{Navbox subgroup long (beta)}}
{{Navbox with columns (beta)}}
{{Navbox with collapsible groups (beta)}}
{{Navboxes (beta)}}

Данный навигационный шаблон идентичен шаблону Navbox with columns из англо-вики. Параметры — полностью аналогичны английскому варианту. Стили, заданные в английском Common.css и отсутствующие в нашем Common.css, перенесены из английского Common.css внутрь шаблона (за исключением ширины кнопки «скрыть/показать»). Для переноса шаблонов на основе Navbox with columns из англо-вики к нам нужно скопировать весь кода шаблона и лишь добавить (beta) после Navbox with columns (если есть вложенные шаблоны — добавить и у них).

Описание параметров

тоаде
colstyle
CSS style/s to apply across all columns; if used, usually background:color per titlestyle above.
oddcolstyle
evencolstyle
CSS style/s to apply to all odd/even-numbered columns, respectively.
colnstyle
CSS style/s to apply to the nth column only.
colheaderstyle
CSS style/s to apply to all column headers.
colnheaderstyle
CSS style/s to apply to the nth column header.
colnfooterstyle
CSS style/s to apply to the nth column footer cell.

Columns parameters

тоаде
colwidth
Width, preferably in a proportional unit such as 'em', or as a percentage, used for each column whose width not specified by colNwidth below. Defaults to 10em. Examples:
colwidth = 15em
colwidth = 25%
fullwidth
If set to anything, then the total width of the columns are scaled linearly to make the sum of the widths 100%. A rather advanced parameter, this usually need not be used and should be left blank. If a colheader or colfooter is used, then fullwidth is used automatically. Example:
fullwidth = true
padding
Padding before first column, preferably in a proportional unit. Defaults to 5em. Padding is disabled by setting it to 0 (or 0em, or 0%).
colnwidth
The nth column's width (overrides colwidth above).
coln
The content of the nth column. If any columns are used, then col1 is required. There can be a maximum of 20 columns.
colnheader
A header cell for the nth column that appears above the column. See below for examples.
colnfooter
A footer cell that appears below the nth column.
colnheadercolspan
A number specifying how many columns the nth column header should span. It defaults to 1. If it is greater than one, then do not specify column headers that it covers. For example, if col1headercolspan = 3, then leave col2header and col3header blank.
colnfootercolspan
A number specifying how many columns the nth column footer should span. It defaults to 1. If it is greater than one, then do not specify column footers that it covers. For example, if col1footercolspan = 3, then leave col2footer and col3footer blank.



Примеры

тоаде

Основной пример

тоаде
{{Navbox with columns (beta)
|name    = East Asia Summit (EAS)
|title   = Member states of the [[East Asia Summit|East Asia Summit (EAS)]]
|width   = 18.25em
|padding = 10em

|above = ''This is where the {{{above}}} would appear.''

|col1 = {{AUS}}<br> {{BRU}}<br> {{flag|CHN|name=PR China}}<br> {{CAM}}
|col2 = {{IND}}<br> {{IDN}}<br> {{JPN}}<br> {{LAO}}
|col3 = {{MAS}}<br> {{MMR}}<br> {{NZL}}<br> {{PHI}}
|col4width = 17em
|col4 = {{SIN}}<br> {{KOR}}<br> {{THA}}<br> {{VIE}}

|below = '''Potential future members'''{{spaces|6}}{{TLS}}{{spaces|3}}{{RUS}}
}}

Ло:Navbox with columns (beta)


Example with percentage widths

тоаде
{{Navbox with columns (beta)
| name = Plastics
| title = [[Plastic]]s
| colwidth = 33%
| colstyle = text-align: center
| col1 = [[Polyethylene]] (PE)<br> [[Polyethylene terephthalate]] (PET or PETE)<br> [[Polyvinyl chloride]] (PVC)<br> [[Polyvinylidene chloride]] (PVDC)<br> [[Polylactic acid]] (PLA)
| col2 = [[Polypropylene]] (PP)<br> [[Polyamide]] (PA)<br> [[Polycarbonate]] (PC)<br> [[Polytetrafluoroethylene]] (PTFE)<br> [[Polyurethane]] (PU)
| col3 = [[Polystyrene]] (PS)<br> [[Polyester]]<br> [[Acrylonitrile butadiene styrene]] (ABS)<br> [[Acrylic glass|Polymethyl methacrylate]] (PMMA)<br> [[Polyoxymethylene]] (POM)
}}

Ло:Navbox with columns (beta)


Example with colnheader and colnfooter

тоаде

The gray background for the columns is added for illustration only. Ло:Navbox with columns (beta)


Example with colnheader using colnheadercolspan

тоаде

The gray background for the columns is added for illustration only. This example shows the colnheadercolspan parameter being used, but you may also use colnfootercolspan to adjust the span of the footer cells.

Ло:Navbox with columns (beta)

Пример

тоаде

The gray background and centered text for the columns is for illustration only. The columns default to an off-white background and left text alignment. This example shows how you can use up to six additional groups/lists after the columns.

Ло:Navbox with columns (beta)

Использование вложенных шаблонов

тоаде

All three types of navbox templates, namely Ло:T1, Ло:T1, and Ло:T1, can be nested inside of one another using the border parameter (which is common to all three). For complex templates, it may be necessary to use nesting to achieve a desired look.

Вложение в самого себя

тоаде

This example shows how one can nest multiple Ло:T1 templates to get the right look. Edit this page to see the code. There is a main Ло:T1 and two additional Ло:T1 templates, with the "child" option set (see code).

Ло:Navbox with columns (beta)

Взаимное вложение различных шаблонов

тоаде

This example shows Ло:T1, Ло:T1 and Ло:T1 all working together. Edit this page to see the code. Note that each of the child navboxes has the first parameter set to child.