「テンプレート:Navbox with collapsible groups」の版間の差分
提供: Yourpedia
(新しいページ: '{{Navbox |name = {{{name|<noinclude>Navbox with collapsible groups</noinclude>}}} |navbar = {{{navbar|}}} |state = {{{state<noinclude>|uncollapsed</noinclude>}}} |border = {{{b...') |
(条件文の除去) |
||
4行目: | 4行目: | ||
|state = {{{state<noinclude>|uncollapsed</noinclude>}}} | |state = {{{state<noinclude>|uncollapsed</noinclude>}}} | ||
|border = {{{border|{{{1|}}}}}} | |border = {{{border|{{{1|}}}}}} | ||
− | |||
|title = {{{title<includeonly>|</includeonly>}}} | |title = {{{title<includeonly>|</includeonly>}}} | ||
|above = {{{above|}}} | |above = {{{above|}}} | ||
10行目: | 9行目: | ||
|image = {{{image|}}} | |image = {{{image|}}} | ||
|imageleft = {{{imageleft|}}} | |imageleft = {{{imageleft|}}} | ||
− | |||
|style = {{{style|}}}{{{bodystyle|}}} | |style = {{{style|}}}{{{bodystyle|}}} | ||
|basestyle = {{{basestyle|}}} | |basestyle = {{{basestyle|}}} | ||
19行目: | 17行目: | ||
|imageleftstyle = {{{imageleftstyle|}}} | |imageleftstyle = {{{imageleftstyle|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | |||
|list1 = | |list1 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state1|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group1style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group1style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list1style|}}} | |liststyle = {{{liststyle|}}}{{{list1style|}}} | ||
31行目: | 27行目: | ||
|imageleft = {{{imageleft1|}}} | |imageleft = {{{imageleft1|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list2 = | |list2 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state2|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group2style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group2style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list2style|}}} | |liststyle = {{{liststyle|}}}{{{list2style|}}} | ||
47行目: | 39行目: | ||
|imageleft = {{{imageleft2|}}} | |imageleft = {{{imageleft2|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list3 = | |list3 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state3|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group3style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group3style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list3style|}}} | |liststyle = {{{liststyle|}}}{{{list3style|}}} | ||
63行目: | 51行目: | ||
|imageleft = {{{imageleft3|}}} | |imageleft = {{{imageleft3|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list4 = | |list4 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state4|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group4style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group4style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list4style|}}} | |liststyle = {{{liststyle|}}}{{{list4style|}}} | ||
79行目: | 63行目: | ||
|imageleft = {{{imageleft4|}}} | |imageleft = {{{imageleft4|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list5 = | |list5 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state5|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group5style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group5style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list5style|}}} | |liststyle = {{{liststyle|}}}{{{list5style|}}} | ||
95行目: | 75行目: | ||
|imageleft = {{{imageleft5|}}} | |imageleft = {{{imageleft5|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list6 = | |list6 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state6|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group6style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group6style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list6style|}}} | |liststyle = {{{liststyle|}}}{{{list6style|}}} | ||
111行目: | 87行目: | ||
|imageleft = {{{imageleft6|}}} | |imageleft = {{{imageleft6|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list7 = | |list7 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state7|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group7style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group7style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list7style|}}} | |liststyle = {{{liststyle|}}}{{{list7style|}}} | ||
127行目: | 99行目: | ||
|imageleft = {{{imageleft7|}}} | |imageleft = {{{imageleft7|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list8 = | |list8 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state8|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group8style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group8style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list8style|}}} | |liststyle = {{{liststyle|}}}{{{list8style|}}} | ||
143行目: | 111行目: | ||
|imageleft = {{{imageleft8|}}} | |imageleft = {{{imageleft8|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list9 = | |list9 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state9|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group9style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group9style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list9style|}}} | |liststyle = {{{liststyle|}}}{{{list9style|}}} | ||
159行目: | 123行目: | ||
|imageleft = {{{imageleft9|}}} | |imageleft = {{{imageleft9|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list10 = | |list10 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state10|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group10style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group10style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list1style|}}} | |liststyle = {{{liststyle|}}}{{{list1style|}}} | ||
175行目: | 135行目: | ||
|imageleft = {{{imageleft10|}}} | |imageleft = {{{imageleft10|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | + | ||
|list11 = | |list11 = | ||
− | + | {{Navbox/child | |
− | + | |state = {{{state11|collapsed}}} | |
− | |state = | + | |
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group11style|}}} | |titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group11style|}}} | ||
|liststyle = {{{liststyle|}}}{{{list1style|}}} | |liststyle = {{{liststyle|}}}{{{list1style|}}} | ||
191行目: | 147行目: | ||
|imageleft = {{{imageleft11|}}} | |imageleft = {{{imageleft11|}}} | ||
|nowraplinks = {{{nowraplinks|}}} | |nowraplinks = {{{nowraplinks|}}} | ||
− | + | |void = {{{listpadding|}}} | |
− | + | }} | |
− | + | ||
− | + | ||
− | }} | + | |
}}<noinclude> | }}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
2018年5月31日 (木) 14:18時点における最新版
|
このテンプレートの記述は複雑な構成となっております。編集後の結果が予想できない、または変更にともなう影響を修正する用意ができていない場合は編集をお控えください。練習や実験はサンドボックスやご自身の利用者ページ、サブページのスペースでお願いします。 |
|
このテンプレートは特定の記事に関連のある記事のグループがあるナビゲーションテンプレートをつくります。全てのグループはデフォルトで隠されています。しかしながらパラメータを呼び出すことによって、同じグループで他の記事のある個々のグループを表示させることが出来ます。
目次
使用法[編集]
空白のままにされるパラメータは削除してください。このテンプレートは現在10グループ/リストまで対応していますが、必要ならばより加えることが出来ます。このテンプレートでは最低2組のグループ/リストを使うべきです。そうでなければ代わりに {{Navbox}} を使ってください。
{{Navbox with collapsible groups |name = {{subst:PAGENAME}} |state = |selected = {{{1|}}} |title = |titlestyle = |groupstyle = |image = |group1 = |abbr1 = |list1 = |group2 = |abbr2 = |list2 = ... |group10 = |abbr10 = |list10 = }}
パラメータ[編集]
このテンプレートは姉妹テンプレートである {{Navbox}} や {{Navbox with columns}} と多くのパラメータを共有します。その共通のパラメータは短剣符†でマークされています。より多くの詳細な説明やそれらのパラメータの例がある {{Navbox}} の解説も参照してください。
パラメータ[編集]
- name†
- The name of the template. The name of this template, for example, is "Navbox with collapsible groups".
- state† [
autocollapse, uncollapsed, collapsed, plain, off
] - The initial state of the show/hide feature. See {{Navbox}} for more information.
- navbar†
- Possible values are
plain
,off
, and the default value of blank. See {{Navbox}} for more information. - border†
- Possible values are
child
,none
, and the default value of blank. Set tochild
if you wish to use the navbox inside of another navbox; with this option, the child navbox is borderless and fits snuggly inside of its parent navbox. The parent navbox may be the list area of {{Navbox}}, the columns of a {{Navbox with columns}}, or a list area of {{Navbox with collapsible groups}}. See {{Navbox}} for more information and examples.
基本的なパラメータ[編集]
- title†
- The title of the template, displayed centered in the titlebar at the top of the template.
- above†
- Text or other elements to appear above groups/lists.
- image†
- Image to the right of all of the groups/lists.
- imageleft†
- Image to the left of all of the groups/lists.
- below†
- Text or other elements to appear below the groups/lists.
group/list パラメータ[編集]
- groupn†
- The title of each section.
- listn†
- The content/wikilinks that will be shown in the group. Use dots or bullets as separators (see the See also section). A {{Navbox}} or {{Navbox with columns}} can optionally be used here with its
border = child
parameter set. If this is done, leave the corresponding groupn blank, as the child navbox will already provide the collapsible feature. - abbrn
- This is the abbreviation of the group. See
selected
parameter below to see how to use this parameter. This parameter is optional, but recommended. - selected
- If the value of
selected
equals the value ofabbrn
, then listn is uncollapsed and all other lists are collapsed. Ifselected
is left blank, or if it does not match anyabbrn
, then all groups are collapsed. Usually this parameter should be set to {{{1|}}}. Since this template is a base template for others, there has to be a way to pass the group parameter from the article, to the secondary template to this one. - staten [
autocollapse, uncollapsed, collapsed, plain, off
] - The initial collapsible state of listn. Set to collapsed by default. Overridden to uncollapsed if
selected
equalsabbrn
. - imagen
- An image to appear in the listn content area on the right side.
- imageleftn
- An image to appear in the listn content area on the left side.
スタイルパラメータ[編集]
- bodystyle†
- CSS style/s to apply to the entire template
- titlestyle†
- CSS style/s to apply to titlebar; usually
background:color
. The color of wikilink text must be manually changed using span tags. For example usetitle = [[Scouting|<span style="color:ivory;">Scouting</span>]]
to change the color of the link to ivory. The [show]/[hide] button and the vde link button use the color set in the titlestyle parameter. Here is an example of setting the titlestyle:-
titlestyle = background:darkgreen;color:ivory;
-
- abovestyle†
- belowstyle†
- CSS style/s to apply to the above and below parameters, respectively.
- basestyle†
- CSS style/s to apply to the title, above, below, and groupn parameters, all at the same time.
- imagestyle†
- CSS style/s to apply to the image parameter. Does not get applied to the imagen parameters.
- imageleftstyle†
- CSS style/s to apply to the imageleft parameter. Does not get applied to the imageleftn parameters.
- groupstyle†
- CSS style/s to apply to all group heading parameters. Visit this website to get a lighter color similar to the title background color. Example:
-
groupstyle = background:lightgreen;
-
- groupnstyle†
- CSS style/s to apply to a specific group heading; overrides any CSS styles set in groupstyle.
- liststyle†
- CSS style/s to apply to all list content parameters.
- listnstyle†
- CSS style/s to apply to specific list content parameters; overrides any CSS styles set in liststyle.
- listpadding†
- Padding to have in each list cell; defaults to 0.25em on the left/right and 0em on the top/bottom.
例[編集]
基本的な例[編集]
{{Navbox with collapsible groups |name = University of Michigan |title = [[University of Michigan|<span style="color:#FFD700;">The University of Michigan, Ann Arbor</span>]] |titlestyle = background:#00008B;color:#FFD700; |groupstyle = background:#FFD700;color:#00008B; |image = |selected = {{{1|}}} |state = collapsed |group1 = [[University of Michigan#Academic profile|<span style="color:#00008B;">Academics</span>]] |abbr1 = academics |list1 = [[University of Michigan College of Engineering|College of Engineering]]{{·}} [[University of Michigan College of Literature, Science, and the Arts|College of Literature, Science and the Arts]]{{·}} [[Gerald R. Ford School of Public Policy]]{{·}} [[University of Michigan Law School|Law School]]{{·}} [[University of Michigan Health System|Medical School]]{{·}} [[Ross School of Business]]{{·}} [[University of Michigan School of Education|School of Education]]{{·}} [[University of Michigan School of Information|School of Information]]{{·}} [[University of Michigan School of Music, Theatre & Dance|School of Music, Theatre & Dance]]{{·}}[[University of Michigan School of Natural Resources and Environment|School of Natural Resources and Environment]]{{·}} [[University of Michigan School of Public Health|School of Public Health]]{{·}} [[Taubman College of Architecture and Urban Planning]] |group2 = [[Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]] |abbr2 = athletics |list2 = [[Michigan Stadium|Michigan Stadium]]{{·}} [[Crisler Arena|Crisler Arena]]{{·}} [[Yost Ice Arena|Yost Ice Arena]]{{·}} [[Michigan Wolverines|Michigan Wolverines]]{{·}} [[Michigan Wolverines football|Football]]{{·}} [[Michigan-Ohio State rivalry|UM-OSU Rivalry]]{{·}} [[Little Brown Jug (football)|Little Brown Jug]]{{·}} [[Paul Bunyan Trophy]]{{·}} [[Cold War (ice hockey)|Cold War]] |group3 = Campus |abbr3 = campus |list3 = [[Angell Hall Observatory]]{{·}} [[Burton Tower]]{{·}} [[The Diag]]{{·}} [[David M. Dennison Building|Dennison Building]]{{·}} [[Gerald R. Ford Presidential Library]]{{·}} [[Hill Auditorium|Hill Auditorium]]{{·}} [[Lurie Tower]]{{·}} [[Matthaei Botanical Gardens]]{{·}} [[Michigan Union]]{{·}} [[Museums at the University of Michigan|Museums]]{{·}} [[Nichols Arboretum]]{{·}} [[University of Michigan Health System|UM Health System]]{{·}} [[University of Michigan Library|University Library]] }}
[編集]
This example shows {{Navbox}}, {{Navbox with collapsible groups}} and {{Navbox with columns}} all working together. Press the edit button for the section to view the code. Note that each of the child navboxes has the first parameter set to child
|
関連項目[編集]
- {{Nowrap begin}} - Provides and explanation of the preferred method of using bullets or pipes to delimit list items.
- {{Navbox}} - Basic navbox.
- {{Navbox with columns}} - Sister template that provides columns in a navbox
- {{Navbox subgroup}} - Allows the creation of subgroups within {{Navbox}}.
折畳モード | タイトル色 | 画像 | グループ | スタイル パラメータ |
例テンプレート | |
---|---|---|---|---|---|---|
{{Navbox subgroup}} | collapsible | navbox | No | Yes | Yes | {{日本百名山}} |
{{Navbox}} | collapsible | navbox | Left/Right of body | Yes | Yes | {{イギリスの電車}} |
{{Navbox with columns}} | collapsible | navbox | Left/right of columns | No | Yes | {{都道府県知事}} |
{{NavboxYears}} {{NavboxYears2}} |
collapsible | navbox | No | No | No | {{全豪オープンテニス}} |
{{Navbox with collapsible groups}} | collapsible | navbox | Left/right of body and/or in each list | Yes | Yes | {{日本近代地震}} |
種類 | CSSクラス | Javascript | 畳まれるとき | Custom initial state |
ネスト | タイトル色 | フォントサイズ |
---|---|---|---|---|---|---|---|
Collapsible table | collapsible, navbox | Common.jsにて定義 | 2個以上 | Yes | No | #ccccff | 90% |