模板:Navbox subgroup/doc:修订间差异
创建页面,内容为“<!-- 在本行下編輯模板說明 --> {{tl|Navbox}}的輔助模版,支援子項目生成,現支援40個子項目生成。 可以同一行多次引用。 常…” |
小无编辑摘要 |
||
| 第1行: | 第1行: | ||
<includeonly>{{Esoteric}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> | |||
<!-- 在本行下編輯模板說明 --> | <!-- 在本行下編輯模板說明 --> | ||
{{Navbox suite}} | {{Navbox suite}} | ||
| 第93行: | 第84行: | ||
--> | --> | ||
== 设置分组的宽度 == | == 设置分组的宽度 == | ||
若有多个{{ | 若有多个{{t1|Navbox subgroup}}模板被用在父级{{t1|Navbox}}的内部,如果这些分组的宽度比较协调的话,通常看起来会更美观,为了做到这一点,使用者必须设定<code>groupstyle</code>参数来控制想要的宽度,以及设定<code>liststyle</code>参数来获得width:auto(由于HTML/CSS的原因)。例如,放置以下代码到每个{{t1|Navbox subgroup}}中来调整宽度: | ||
:<code>groupstyle = width:10em;</code> | :<code>groupstyle = width:10em;</code> | ||
:<code>liststyle = width:auto;</code> | :<code>liststyle = width:auto;</code> | ||
<!-- | <!-- | ||
If multiple {{ | If multiple {{t1|Navbox subgroup}} templates are used inside of a parent {{t1|Navbox}}, it generally looks better if the width of the groups matches up. In order to do this, one must set the <code>groupstyle</code> parameters to contain the desired width, and the <code>liststyle</code> parameters to have width:auto (due to HTML/CSS reasons). For example, place the following code in each {{t1|Navbox subgroup}} to adjust the widths: | ||
:<code>groupstyle = width:10em;</code> | :<code>groupstyle = width:10em;</code> | ||
:<code>liststyle = width:auto;</code> | :<code>liststyle = width:auto;</code> | ||
| 第103行: | 第94行: | ||
If you also use the <code>image</code> or <code>imageleft</code> parameters, then you will most likely also need to set their width manually using the <code>imagestyle</code> and <code>imageleftstyle</code> parameters. | If you also use the <code>image</code> or <code>imageleft</code> parameters, then you will most likely also need to set their width manually using the <code>imagestyle</code> and <code>imageleftstyle</code> parameters. | ||
--> | --> | ||
== 举例 == | == 举例 == | ||
=== 例1 === | === 例1 === | ||
| 第112行: | 第102行: | ||
{{Navbox | {{Navbox | ||
| state = uncollapsed | | state = uncollapsed | ||
| name = | | name = Navbox subgroup | ||
| title = Protected Areas of Colorado | | title = Protected Areas of Colorado | ||
| group1 = National Park Service | | group1 = National Park Service | ||
| 第118行: | 第108行: | ||
{{Navbox subgroup | {{Navbox subgroup | ||
| group1 = National Parks | | group1 = National Parks | ||
| list1 = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{ | | list1 = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[Mesa Verde National Park|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]] | ||
| group2 = National Monuments | | group2 = National Monuments | ||
| list2 = [[Colorado National Monument|Colorado]]{{ | | list2 = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]] | ||
| group3 = National Historic Sites | | group3 = National Historic Sites | ||
| list3 = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{ | | list3 = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]] | ||
| group4 = National Recreation Area | | group4 = National Recreation Area | ||
| list4 = [[Curecanti National Recreation Area|Curecanti]] | | list4 = [[Curecanti National Recreation Area|Curecanti]] | ||
}} | }} | ||
| group2 = National Forests | | group2 = National Forests | ||
| list2 = [[Arapaho National Forest|Arapaho]]{{ | | list2 = [[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} [[Roosevelt National Forest|Roosevelt]]{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} [[San Juan National Forest|San Juan]]{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]] | ||
}} | }} | ||
| 第138行: | 第128行: | ||
{{Navbox subgroup | {{Navbox subgroup | ||
|group1 = National Parks | |group1 = National Parks | ||
|list1 = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{ | |list1 = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[Mesa Verde National Park|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]] | ||
|group2 = National Monuments | |group2 = National Monuments | ||
|list2 = [[Colorado National Monument|Colorado]]{{ | |list2 = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]] | ||
|group3 = National Historic Sites | |group3 = National Historic Sites | ||
|list3 = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{ | |list3 = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]] | ||
|group4 = National Recreation Area | |group4 = National Recreation Area | ||
|list4 = [[Curecanti National Recreation Area|Curecanti]] | |list4 = [[Curecanti National Recreation Area|Curecanti]] | ||
}} | }} | ||
| group2 = National Forests | | group2 = National Forests | ||
| list2 = [[Arapaho National Forest|Arapaho]]{{ | | list2 = [[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} [[Roosevelt National Forest|Roosevelt]]{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} [[San Juan National Forest|San Juan]]{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]] | ||
}} | }} | ||
</pre> | </pre> | ||
| 第158行: | 第148行: | ||
{{Navbox | {{Navbox | ||
| state = expanded | | state = expanded | ||
| name = | | name = Navbox subgroup | ||
| title = Roman Emperors | | title = Roman Emperors | ||
| group1 = Crisis 235 AD - 284 AD | | group1 = Crisis 235 AD - 284 AD | ||
| list1 = [[Maximinus Thrax]]{{ | | 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 = Dominate | | group2 = Dominate | ||
| list2 = | | list2 = | ||
| 第167行: | 第157行: | ||
|list1style = background:#ddf; | |list1style = background:#ddf; | ||
|list1 = '''284 AD - 395 AD''' | |list1 = '''284 AD - 395 AD''' | ||
|list2 = [[Diocletian]]{{ | |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; | |list3style = background:#ddf; | ||
|list3 = '''Western Empire (393 AD - 476 AD)''' | |list3 = '''Western Empire (393 AD - 476 AD)''' | ||
|list4 = [[Honorius (emperor)|Honorius]]{{ | |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]] | ||
}} | }} | ||
}} | }} | ||
| 第179行: | 第169行: | ||
| title = Roman Emperors | | title = Roman Emperors | ||
| group1 = Crisis 235 AD - 284 AD | | group1 = Crisis 235 AD - 284 AD | ||
| list1 = [[Maximinus Thrax]]{{ | | 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 = Dominate | | group2 = Dominate | ||
| list2 = | | list2 = | ||
| 第185行: | 第175行: | ||
|list1style = background:#ddf; | |list1style = background:#ddf; | ||
|list1 = '''284 AD - 395 AD''' | |list1 = '''284 AD - 395 AD''' | ||
|list2 = [[Diocletian]]{{ | |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; | |list3style = background:#ddf; | ||
|list3 = '''Western Empire (393 AD - 476 AD)''' | |list3 = '''Western Empire (393 AD - 476 AD)''' | ||
|list4 = [[Honorius (emperor)|Honorius]]{{ | |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]] | ||
}} | }} | ||
}} | }} | ||
| 第196行: | 第186行: | ||
* {{tl|Navbox}} – 基本的导航模板。 | * {{tl|Navbox}} – 基本的导航模板。 | ||
* {{ | * {{t1|Navbox with columns}} – 允许分列(columns)代替分组/列表(groups/lists)。 | ||
* {{ | * {{t1|Navbox with collapsible groups}} – 另一个变体。 | ||
* {{ | * {{t1|Nobold}} – 用于在缺省字体宽度是粗体的上下文环境中,例如表格中的标题单元格中,用普通字体宽度来显示文字。 | ||
{{Navigational templates}} | |||
<includeonly> | <includeonly> | ||
<!-- 本行下加入模板的分類 --> | <!-- 本行下加入模板的分類 --> | ||
[[Category:導航模板]] | [[Category:導航模板|{{PAGENAME}}]] | ||
[[Category:格式模板]] | [[Category:格式模板|{{PAGENAME}}]] | ||
</includeonly> | </includeonly> | ||