差分
ナビゲーションに移動
検索に移動
en:Template:Dmbox oldid=888336095 より更新
<templatestyles src="Dmbox/styles.css" />
<table id="
{{#switch:{{{type|}}}
| setindex = setindexbox
| miswriting = miswritingbox
| disambig
| #default = disambigbox
}}" class="metadata plainlinks dmbox
{{#switch:{{{type|}}}
| setindex = dmbox-setindex
| miswriting = dmbox-miswriting
| disambig
| #default = dmbox-disambig
}} {{{class|}}}" style="{{{style|}}}" role="presentation">
<tr>
{{#ifeq:{{{image|}}}|none
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell"></td>
| <td class="mbox-image" style="padding: 2px 0 2px 0.4em;">{{#if:{{{image-file|}}}
| [[File:{{{image-file}}}|{{#if:{{{image-size|}}}|{{{image-size}}}|30}}px]]
| {{#if:{{{image|}}}
| {{{image}}}
| [[File:{{#switch:{{{type|}}}
| setindex = DAB list gray.svg
| miswriting = Ambox spelling.svg
| disambig <!-- disambig = default -->
| #default = Disambig gray.svg
}}|{{#if:{{{image-size|}}}|{{{image-size}}}|30}}px|alt=曖昧さ回避のアイコン]]
}}
}}</td>
}}
<td class="mbox-text" style="padding: 0.25em 0.4em; font-style: normal; {{{textstyle|}}}">{{#if:{{{text|}}}| {{{text}}} }}<!-- {{{text}}}内冒頭のウィキマークアップによる箇条書きを正しく表示させるために条件文にしています。 --></td>
{{#if:{{{imageright-file|}}}{{{imageright|}}}
| <td class="mbox-imageright" style="padding: 2px 0.4em 2px 0;"> {{#if:{{{imageright-file|}}}|[[File:{{{imageright-file}}}|{{#if:{{{imageright-size|{{{image-size|}}}}}}|{{{imageright-size|{{{image-size}}}}}}|30}}px]]|{{{imageright}}}}} </td>
}}
</tr>
</table><!--
Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
| <!-- No type fed, is also valid input -->
| disambig
| miswriting
| setindex = <!-- Do nothing, valid "type" -->
| #default = {{Error|[[Template:Dmbox]]に入力されたtype={{{type|}}}引数が不正です。}}[[Category:パラメータの修正が必要なメッセージボックス|{{main other|0:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<!--
Magic word for disambiguation pages:
-->{{#if:{{{nocat|}}}||{{#ifeq:{{{type|}}}|disambig|__DISAMBIG__|}}}}<!--
Categorization:
-->{{{category|{{#switch:{{{type|}}}
| setindex =
{{category handler
| main = [[Category:すべての同名の索引]]
| nocat = {{{nocat|}}} <!--So "nocat=true" works-->
| page = {{{page|}}} <!--For testing-->
}}
| miswriting =
{{category handler
| main = [[Category:誤表記]]
| nocat = {{{nocat|}}} <!--So "nocat=true" works-->
| page = {{{page|}}} <!--For testing-->
}}
| disambig <!-- disambig = default -->
| #default =
{{category handler
| main = [[Category:すべての曖昧さ回避]]
| template = <!-- Do not categorise on template pages. -->
| other = [[Category:すべての曖昧さ回避]]
| nocat = {{{nocat|}}} <!--So "nocat=true" works-->
| page = {{{page|}}} <!--For testing-->
}}
}} }}}<!--
--><includeonly>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:曖昧さ回避メッセージボックス]]}}}}</includeonly><!--
--><noinclude>
{{documentation}}
</noinclude>
<table id="
{{#switch:{{{type|}}}
| setindex = setindexbox
| miswriting = miswritingbox
| disambig
| #default = disambigbox
}}" class="metadata plainlinks dmbox
{{#switch:{{{type|}}}
| setindex = dmbox-setindex
| miswriting = dmbox-miswriting
| disambig
| #default = dmbox-disambig
}} {{{class|}}}" style="{{{style|}}}" role="presentation">
<tr>
{{#ifeq:{{{image|}}}|none
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell"></td>
| <td class="mbox-image" style="padding: 2px 0 2px 0.4em;">{{#if:{{{image-file|}}}
| [[File:{{{image-file}}}|{{#if:{{{image-size|}}}|{{{image-size}}}|30}}px]]
| {{#if:{{{image|}}}
| {{{image}}}
| [[File:{{#switch:{{{type|}}}
| setindex = DAB list gray.svg
| miswriting = Ambox spelling.svg
| disambig <!-- disambig = default -->
| #default = Disambig gray.svg
}}|{{#if:{{{image-size|}}}|{{{image-size}}}|30}}px|alt=曖昧さ回避のアイコン]]
}}
}}</td>
}}
<td class="mbox-text" style="padding: 0.25em 0.4em; font-style: normal; {{{textstyle|}}}">{{#if:{{{text|}}}| {{{text}}} }}<!-- {{{text}}}内冒頭のウィキマークアップによる箇条書きを正しく表示させるために条件文にしています。 --></td>
{{#if:{{{imageright-file|}}}{{{imageright|}}}
| <td class="mbox-imageright" style="padding: 2px 0.4em 2px 0;"> {{#if:{{{imageright-file|}}}|[[File:{{{imageright-file}}}|{{#if:{{{imageright-size|{{{image-size|}}}}}}|{{{imageright-size|{{{image-size}}}}}}|30}}px]]|{{{imageright}}}}} </td>
}}
</tr>
</table><!--
Detect and report usage with faulty "type" parameter:
-->{{#switch:{{{type|}}}
| <!-- No type fed, is also valid input -->
| disambig
| miswriting
| setindex = <!-- Do nothing, valid "type" -->
| #default = {{Error|[[Template:Dmbox]]に入力されたtype={{{type|}}}引数が不正です。}}[[Category:パラメータの修正が必要なメッセージボックス|{{main other|0:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<!--
Magic word for disambiguation pages:
-->{{#if:{{{nocat|}}}||{{#ifeq:{{{type|}}}|disambig|__DISAMBIG__|}}}}<!--
Categorization:
-->{{{category|{{#switch:{{{type|}}}
| setindex =
{{category handler
| main = [[Category:すべての同名の索引]]
| nocat = {{{nocat|}}} <!--So "nocat=true" works-->
| page = {{{page|}}} <!--For testing-->
}}
| miswriting =
{{category handler
| main = [[Category:誤表記]]
| nocat = {{{nocat|}}} <!--So "nocat=true" works-->
| page = {{{page|}}} <!--For testing-->
}}
| disambig <!-- disambig = default -->
| #default =
{{category handler
| main = [[Category:すべての曖昧さ回避]]
| template = <!-- Do not categorise on template pages. -->
| other = [[Category:すべての曖昧さ回避]]
| nocat = {{{nocat|}}} <!--So "nocat=true" works-->
| page = {{{page|}}} <!--For testing-->
}}
}} }}}<!--
--><includeonly>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:曖昧さ回避メッセージボックス]]}}}}</includeonly><!--
--><noinclude>
{{documentation}}
</noinclude>