模板:Navbox subgroup/doc:修订间差异

创建页面,内容为“<!-- 在本行下編輯模板說明 --> {{tl|Navbox}}的輔助模版,支援子項目生成,現支援40個子項目生成。 可以同一行多次引用。 常…”
 
无编辑摘要
第1行: 第1行:
<!-- 在本行下編輯模板說明 -->
<includeonly>{{Esoteric}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
 
{{tl|Navbox}}的輔助模版,支援子項目生成,現支援40個子項目生成。
 
可以同一行多次引用。
 
常用參數封裝到{{tl|大家族模板子项}}中。
 
使用方法見於https://zh.wikipedia.org/wiki/Template:Navbox_subgroup
<!--<includeonly>{{Esoteric}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
<!-- 在本行下編輯模板說明 -->
<!-- 在本行下編輯模板說明 -->
{{Navbox suite}}
{{Navbox suite}}
第93行: 第84行:
  -->
  -->
== 设置分组的宽度 ==
== 设置分组的宽度 ==
若有多个{{tl|Navbox subgroup}}模板被用在父级{{tl|Navbox}}的内部,如果这些分组的宽度比较协调的话,通常看起来会更美观,为了做到这一点,使用者必须设定<code>groupstyle</code>参数来控制想要的宽度,以及设定<code>liststyle</code>参数来获得width:auto(由于HTML/CSS的原因)。例如,放置以下代码到每个{{tl|Navbox subgroup}}中来调整宽度:
若有多个{{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 {{tl|Navbox subgroup}} templates are used inside of a parent {{tl|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 {{tl|Navbox subgroup}} to adjust the widths:
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  = Protected Areas of Colorado
| 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]]{{w}}[[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{w}}[[Mesa Verde National Park|Mesa Verde]]{{w}}[[Rocky Mountain National Park|Rocky Mountain]]
   | 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]]{{w}}[[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{w}}[[Hovenweep National Monument|Hovenweep]]{{w}}[[Yucca House National Monument|Yucca House]]
   | 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]]{{w}}[[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   | 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]]{{w}}[[Grand Mesa National Forest|Grand Mesa]]{{w}}[[Gunnison National Forest|Gunnison]]{{w}}[[Pike National Forest|Pike]]{{w}}[[Rio Grande National Forest|Rio Grande]]{{w}}[[Roosevelt National Forest|Roosevelt]]{{w}}[[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{w}}[[San Isabel National Forest|San Isabel]]{{w}}[[San Juan National Forest|San Juan]]{{w}}[[Uncompahgre National Forest|Uncompahgre]]{{w}}[[White River National Forest|White River]]
| 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]]{{w}}[[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{w}}[[Mesa Verde National Park|Mesa Verde]]{{w}}[[Rocky Mountain National Park|Rocky Mountain]]
   |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]]{{w}}[[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{w}}[[Hovenweep National Monument|Hovenweep]]{{w}}[[Yucca House National Monument|Yucca House]]
   |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]]{{w}}[[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   |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]]{{w}}[[Grand Mesa National Forest|Grand Mesa]]{{w}}[[Gunnison National Forest|Gunnison]]{{w}}[[Pike National Forest|Pike]]{{w}}[[Rio Grande National Forest|Rio Grande]]{{w}}[[Roosevelt National Forest|Roosevelt]]{{w}}[[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{w}}[[San Isabel National Forest|San Isabel]]{{w}}[[San Juan National Forest|San Juan]]{{w}}[[Uncompahgre National Forest|Uncompahgre]]{{w}}[[White River National Forest|White River]]
| 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  = Roman Emperors
| name  = Navbox subgroup
| title = Roman Emperors
| title = Roman Emperors
| group1 = Crisis 235 AD - 284 AD
| group1 = Crisis 235 AD - 284 AD
| list1  = [[Maximinus Thrax]]{{w}}[[Gordian I]]{{w}}[[Gordian II]]{{w}}[[Pupienus]] and [[Balbinus]]{{w}}[[Gordian III]]{{w}}[[Philip the Arab]]{{w}}[[Decius]]{{w}}[[Trebonianus Gallus]]{{w}}[[Aemilianus]]{{w}}[[Valerian (emperor)|Valerian]]{{w}}[[Gallienus]]{{w}}[[Claudius II]]{{w}}[[Quintillus]]{{w}}[[Aurelian]]{{w}}[[Marcus Claudius Tacitus]]{{w}}[[Florianus]]{{w}}[[Probus]]{{w}}[[Carus]]{{w}}[[Numerian]]{{w}}[[Carinus]]
| 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]]{{w}}[[Maximian]]{{w}}[[Constantius Chlorus|Constantius I]]{{w}}[[Galerius]]{{w}}[[Flavius Valerius Severus|Severus II]]{{w}}[[Maxentius]]{{w}}[[Maximinus]]{{w}}[[Licinius]]{{w}}[[Constantine I]]{{w}}[[Constantine II (emperor)|Constantine II]]{{w}}[[Constans|Constans I]]{{w}}[[Constantius II]]{{w}}[[Julian the Apostate]]{{w}}[[Jovian]]{{w}}[[Valentinian I]]{{w}}[[Valens]]{{w}}[[Gratian]]{{w}}[[Valentinian II]]{{w}}[[Eugenius]]{{w}}[[Theodosius I]]
   |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]]{{w}}[[Constantius III]]{{w}}[[Joannes]]{{w}}[[Valentinian III]]{{w}}[[Petronius Maximus]]{{w}}[[Avitus]]{{w}}[[Majorian]]{{w}}[[Libius Severus]]{{w}}[[Anthemius]]{{w}}[[Olybrius]]{{w}}[[Glycerius]]{{w}}[[Julius Nepos]]{{w}}[[Romulus Augustus]]
   |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]]{{w}}[[Gordian I]]{{w}}[[Gordian II]]{{w}}[[Pupienus]] and [[Balbinus]]{{w}}[[Gordian III]]{{w}}[[Philip the Arab]]{{w}}[[Decius]]{{w}}[[Trebonianus Gallus]]{{w}}[[Aemilianus]]{{w}}[[Valerian (emperor)|Valerian]]{{w}}[[Gallienus]]{{w}}[[Claudius II]]{{w}}[[Quintillus]]{{w}}[[Aurelian]]{{w}}[[Marcus Claudius Tacitus]]{{w}}[[Florianus]]{{w}}[[Probus]]{{w}}[[Carus]]{{w}}[[Numerian]]{{w}}[[Carinus]]
| 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]]{{w}}[[Maximian]]{{w}}[[Constantius Chlorus|Constantius I]]{{w}}[[Galerius]]{{w}}[[Flavius Valerius Severus|Severus II]]{{w}}[[Maxentius]]{{w}}[[Maximinus]]{{w}}[[Licinius]]{{w}}[[Constantine I]]{{w}}[[Constantine II (emperor)|Constantine II]]{{w}}[[Constans|Constans I]]{{w}}[[Constantius II]]{{w}}[[Julian the Apostate]]{{w}}[[Jovian]]{{w}}[[Valentinian I]]{{w}}[[Valens]]{{w}}[[Gratian]]{{w}}[[Valentinian II]]{{w}}[[Eugenius]]{{w}}[[Theodosius I]]
   |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]]{{w}}[[Constantius III]]{{w}}[[Joannes]]{{w}}[[Valentinian III]]{{w}}[[Petronius Maximus]]{{w}}[[Avitus]]{{w}}[[Majorian]]{{w}}[[Libius Severus]]{{w}}[[Anthemius]]{{w}}[[Olybrius]]{{w}}[[Glycerius]]{{w}}[[Julius Nepos]]{{w}}[[Romulus Augustus]]
   |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
&nbsp;&nbsp;}}
&nbsp;&nbsp;}}
}}
}}
第196行: 第186行:


* {{tl|Navbox}} &ndash; 基本的导航模板。
* {{tl|Navbox}} &ndash; 基本的导航模板。
* {{tl|Navbox with columns}} &ndash; 允许分列(columns)代替分组/列表(groups/lists)。
* {{t1|Navbox with columns}} &ndash; 允许分列(columns)代替分组/列表(groups/lists)。
* {{tl|Navbox with collapsible groups}} &ndash; 另一个变体。
* {{t1|Navbox with collapsible groups}} &ndash; 另一个变体。
* {{tl|Nobold}} &ndash; 用于在缺省字体宽度是粗体的上下文环境中,例如表格中的标题单元格中,用普通字体宽度来显示文字。
* {{t1|Nobold}} &ndash; 用于在缺省字体宽度是粗体的上下文环境中,例如表格中的标题单元格中,用普通字体宽度来显示文字。


{{Navigational templates}}
<includeonly>
<includeonly>
<!-- 本行下加入模板的分類 -->
<!-- 本行下加入模板的分類 -->
[[Category:導航模板]]
[[Category:導航模板|{{PAGENAME}}]]
[[Category:格式模板]]
[[Category:格式模板|{{PAGENAME}}]]
 
</includeonly>
</includeonly>
<noinclude>[[Category:模板說明文件]]</noinclude>