موضيل:شريط/قسم/شرح
This template is designed to be used with {{شريط}} 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 {{شريط}}. A subgroup may contain up to 20 list items.
Blank template
[بدل لكود]{{شريط/قسم | نمط_مجموعة = | نمط_قائمة = | مجموعة1 = | قائمة1 = | مجموعة2 = | قائمة2 = ... | مجموعة20 = | قائمة20 = }}
المعلمات
[بدل لكود]This template employs all parameters of {{شريط}}. Please see the documentation there for more complete descriptions. In fact, the only differences between this template and {{شريط}} are as follows:
- The border parameter defaults to "child"
- The group padding defaults to 0.75em on the left/right, and can only be changed with the
grouppadding
parameter. This is done to prevent the Internet Explorer box model bug from effecting the width of groups.
Everything else is exactly the same as {{شريط}}.
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
#e6e6ff
, but can be changed via the groupstyle parameter (see below).
Styles
[بدل لكود]- 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;
- grouppadding
- CSS style to specify group padding. Should usually be specified using em units. It is recommended to leave this parameter alone and use the default padding. Examples:
grouppadding = 0em 1em;
(1em on left/right, 0em on top/bottom)grouppadding = 0em 0.5em 0em 1em;
(0em top, 0.5em right, 0em bottom, 1em left)
- 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 toeven
orodd
sets all rows to have that striping color. Setting tooff
disables automatic row striping. NOTE: Due to system limitations, do not use a semi-colon to close this command.
- evenodd
Setting the width of groups
[بدل لكود]If multiple {{شريط/قسم}} templates are used inside of a parent {{شريط}}, 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 {{شريط/قسم}} 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.
أمتيلا
[بدل لكود]Example 1
[بدل لكود]The following is an example of Navbox subgroup used within a Navbox template.
{{شريط |سمية=شريط/قسم/شرح | عنوان = Protected Areas of Colorado | مجموعة1 = National Park Service | قائمة1 = {{شريط/قسم |مجموعة1 = National Parks |قائمة1 = [[حديقة غنيسون الأسود|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[حديقة ميسا فيردي الوطنية|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]] |مجموعة2 = National Monuments |قائمة2 = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]] |مجموعة3 = National Historic Sites |قائمة3 = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]] |مجموعة4 = National Recreation Area |قائمة4 = [[Curecanti National Recreation Area|Curecanti]] }} | مجموعة2 = National Forests | قائمة2 = [[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} {{Ill-WD2|غابة روزفلت الوطنية|id=Q7366477}}{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} {{Ill-WD2|غابة سان خوان الوطنية|id=Q643618}}{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]] }}
Example 2
[بدل لكود]This example implements horizontal group headings by assigning the headings to list1
and list3
and the links to list2
and list4
), then using list1style
and list3style
to set the background color of the headings.
{{شريط |سمية=Roman Emperors | عنوان = Roman Emperors | مجموعة1 = Crisis 235 AD - 284 AD | قائمة1 = [[ماكسيمينوس ثراكس]]{{,}} [[جورديان الأول]]{{,}} [[كورديان الثاني|Gordian II]]{{,}} [[پاپينوس|Pupienus]] and [[بلبنوس]]{{,}} [[جورديان الأولII]]{{,}} [[فيليب العربي]]{{,}} [[ديكيوس]]{{,}} [[تريبونيانوس غالوس]]{{,}} [[إميليانوس]]{{,}} [[فاليريان|Valerian]]{{,}} [[غالينوس (إمبراطور)]]{{,}} [[كلاوديوس الثاني]]{{,}} [[كوينتلوس]]{{,}} [[أوريليان]]{{,}} [[ماركوس كلاوديوس تاسيتس]]{{,}} [[فلوريانوس]]{{,}} [[Probus]]{{,}} [[ماركوس أوريليوس كاروس]]{{,}} [[نومريان]]{{,}} [[كارينوس]] | مجموعة2 = Dominate | قائمة2 = {{شريط/قسم |list1style = background:#ddf; |قائمة1 = '''284 AD - 395 AD''' |قائمة2 = [[ديوكلتيانوس]]{{,}} [[مكسيميانوس]]{{,}} [[قسطنطيوس كلوروس]]{{,}} [[غاليريوس]]{{,}} [[فاليريوس سيفيروس|Severus II]]{{,}} [[مكسنتيوس]]{{,}} [[Maximinus]]{{,}} [[ليسينيوس]]{{,}} [[قسطنطين الأول]]{{,}} [[قسطنطين الثاني (إمبراطور)|Constantine II]]{{,}} [[قنسطنس|Constans I]]{{,}} [[قنسطانطيوس الثاني]]{{,}} [[يوليان المرتد]]{{,}} [[Jovian]]{{,}} [[فالنتينيان الأول]]{{,}} [[فالنس]]{{,}} [[كراتيان|Gratian]]{{,}} [[فالنتينيان الثاني]]{{,}} [[أوجينيوس]]{{,}} [[ثيودوسيوس الأول]] |نمط_قائمة3 = background:#ddf; |قائمة3 = '''Western Empire (393 AD - 476 AD)''' |قائمة4 = [[هونوريوس|Honorius]]{{,}} [[قسطنطينيوس الثالث]]{{,}} [[Joannes]]{{,}} [[فالنتينيان الثالث]]{{,}} [[بيترونيوس ماكسيموس]]{{,}} [[أفيتوس (إمبراطور روماني)]]{{,}} [[ماجوريان]]{{,}} [[ليبيوس سيفيروس]]{{,}} [[أنثيميوس]]{{,}} [[أوليبريوس]]{{,}} [[Glycerius]]{{,}} [[يوليوس نيبوس]]{{,}} [[رومولوس أوغستولوس]] }} }}
شوف تا
[بدل لكود]- {{شريط}} – Basic navbox
- {{شريط بأعمدة}} – Allows columns instead of groups/lists
- {{شريط مركب}} – Another variation.
- ويكيپيديا:Line break handling – The how-to guide about how to handle word wraps (line breaks) on Wikipedia, such as the wrapping of the link lists used in navboxes.
- {{بداية لا لف}} – The recommended format for adding bullets, pipes, or dashes between list items. The page describes how to go about using them with proper wrapping.
- {{Nobold}} – To display text at normal font-weight within a context where the default font-weight is bold, e.g. header cells in tables.