ページ「テンプレート:Ambox」と「テンプレート:Ambox/core」の間の差分

(ページ間の差分)
移動先: 案内検索
ページ 1
ページ 2
(1版)
 
(1版)
 
1行目: 1行目:
{{#switch:{{{small|{{#if:{{{section|}}}|section}}}}}
+
<table class="<!-- metadata -->plainlinks ambox {{#switch:{{{small|}}}
| left =  
+
| left = mbox-small-left
  {{Ambox/core
+
| section = ambox-section
  | small           = left
+
}} {{#switch:{{{type|}}}
  | type            = {{{type|}}}
+
| speedy    = ambox-speedy
  | image          = {{#if:{{{smallimage|}}}
+
| serious    <!-- この値は "非推奨" とされています。使わないでください。 -->
                      | {{{smallimage}}}
+
| delete    = ambox-delete
                      | {{{image|}}}
+
| content    = ambox-content
                      }}
+
| style     = ambox-style
  | image-file      = {{#if:{{{smallimage-file|}}}
+
| merge      <!-- この値は "非推奨" とされています。使わないでください。 -->
                      | {{{smallimage-file}}}
+
| move      = ambox-move
                      | {{{image-file|}}}
+
| protection = ambox-protection
                      }}
+
| notice    <!-- notice = default -->
  | image-size     = {{#if:{{{smallimage-size|}}}
+
| #default  = ambox-notice
                      | {{{smallimage-size}}}
+
}} {{#if:{{{printable|}}} <!-- 印刷フラグ:指定すると印刷時にも表示 -->
                      | 20x20
+
  |
                      }}
+
   | noprint <!-- 既定値は印刷時非表示 -->
  | imageright      = {{#if:{{{smallimageright|}}}
+
}}" style="{{{style|}}}">
                      | {{{smallimageright}}}
+
<tr>
                      | {{{imageright|}}}
+
{{#switch:{{{image|}}}
                      }}
+
| blank    <!-- 非推奨のため、"none" の値が返される -->
  | imageright-file = {{#if:{{{smallimageright-file|}}}
+
| none = <td class="mbox-empty-cell"></td>  <!-- 画像なし。100%の幅があるテキストセルのために必要な、いくらかの幅や余白のあるセル。 -->
                      | {{{smallimageright-file}}}
+
| #default =  
                      | {{{imageright-file|}}}
+
   <td class="mbox-image">{{
                      }}
+
  #switch:{{{small|}}}
   | imageright-size = {{#if:{{{smallimageright-size|{{{smallimage-size|}}}}}}
+
  | left = <!-- DIVを使わない -->
                      | {{{smallimageright-size|{{{smallimage-size}}}}}}
+
   | #default = <div class="ambox-imagecontainer">
                      | 20x20
 
                      }}
 
  | style           = {{{style|}}}; {{#if:{{{background|}}}|background-color: {{{background|}}}}}
 
  | textstyle      = {{{textstyle|}}}
 
   | text            = {{#if:{{{smalltext|}}}
 
                      | {{{smalltext}}}
 
                      | {{{text}}}
 
                      }}
 
   | printable      = {{{printable|}}}
 
 
   }}
 
   }}
| section =
+
   {{#if:{{{image-file|}}}
   {{Ambox/core
+
   | [[File:{{{image-file}}}|{{{image-size}}}px]]
  | small          = section
+
   | {{#if:{{{image|}}}
  | type            = {{{type|}}}
+
    | {{{image}}}
   | image          = {{{image|}}}
+
    | [[File:{{#switch:{{{type|}}}
  | image-file      = {{{image-file|}}}
+
      | speedy    = Ambox speedy deletion.png
   | image-size      = {{#if:{{{image-size-section|{{{image-size|}}}}}}
+
      | serious    <!-- この値は "非推奨" とされています。使わないでください。 -->
                      | {{{image-size-section|{{{image-size}}}}}}
+
      | delete    = Ambox deletion.png
                      | 40x40
+
      | content    = Ambox content.png
                      }}
+
      | style      = Edit-clear.svg
  | imageright      = {{{imageright|}}}
+
      | merge      <!-- この値は "非推奨" とされています。使わないでください。 -->
  | imageright-file = {{{imageright-file|}}}
+
      | move      = Ambox move.png
  | imageright-size = {{#if:{{{imageright-size-section|{{{image-size-section|{{{imageright-size|{{{image-size|}}}}}}}}}}}}
+
      | protection = Ambox protection.png
                      | {{{imageright-size-section|{{{image-size-section|{{{imageright-size|{{{image-size}}}}}}}}}}}}
+
      | notice    <!-- notice = default -->
                      | 40x40
+
      | #default  = Ambox notice.png
                      }}
+
      }} | {{{image-size}}}px |alt=|link=]]
   | style          = {{{style|}}}; {{#if:{{{background|}}}|background-color: {{{background|}}}}}
+
    }}
  | textstyle      = {{{textstyle|}}}
+
   }}{{#switch:{{{small|}}}
  | text            = {{#if:{{{text-section|}}}
+
  | left = <!-- /DIV を使わない -->
                      | {{{text-section}}}
+
  | #default = </div>
                      | {{{text}}}
+
  }}</td>
                      }}
+
}}
  | printable      = {{{printable|}}}
+
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
  }}
+
{{#if:{{{imageright|}}}{{{imageright-file|}}}
| #default =
+
| {{#ifeq:{{{imageright|}}}|none
  {{Ambox/core
+
   | <!-- 画像なし -->
  | type            = {{{type|}}}
+
   | <td class="mbox-imageright">{{#switch:{{{small|}}}
  | image          = {{{image|}}}
+
    | left = {{#if:{{{imageright-file|}}}
   | image-file      = {{{image-file|}}}
+
      | [[File:{{{imageright-file}}}|{{{imageright-size}}}px]]
   | image-size      = {{#if:{{{image-size|}}}
+
      | {{{imageright}}}
                      | {{{image-size}}}
+
      }}
                      | 40x40
+
    | #default = <div class="ambox-imagecontainer">{{#if:{{{imageright-file|}}}
                      }}
+
      | [[File:{{{imageright-file}}}|{{{imageright-size}}}px]]
  | imageright      = {{{imageright|}}}
+
      | {{{imageright}}}
  | imageright-file = {{{imageright-file|}}}
+
       }}</div>
  | imageright-size = {{#if:{{{imageright-size|{{{image-size|}}}}}}
+
    }}</td>
                      | {{{imageright-size|{{{image-size}}}}}}
 
                      | 40x40
 
                      }}
 
  | style          = {{{style|}}}; {{#if:{{{background|}}}|background-color: {{{background|}}}}}
 
  | textstyle      = {{{textstyle|}}}
 
  | text            = {{{text}}}
 
  | printable       = {{{printable|}}}
 
 
   }}
 
   }}
}}<!--
+
}}</tr>
--><noinclude>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:記事メッセージボックス]]}}}}</noinclude><!--
+
</table><!--  
 
+
誤った "type" パラメータの使用法の検出と報告:
--><noinclude>{{Documentation}}
+
-->{{#switch:{{{type|}}}
<!-- カテゴリと言語間リンクはここではなく、/doc サブページに追加してください --></noinclude>
+
|  <!-- タイプが与えられないのも、有効な入力 -->
 +
| speedy
 +
| delete
 +
| content
 +
| style
 +
| move
 +
| protection
 +
| notice    = <!-- 有効な "type" なので何もしない -->
 +
| #default  = <div style="text-align: center;">このメッセージボックスは無効な "type={{{type|}}}" パラメータを使用しており、修正が必要です。</div><!-- 現状ではカテゴライズされるのを防ぐためコメントアウト [[Category:Wikipedia message box parameter needs fixing|{{Main other|Main:}}{{FULLPAGENAME}}]] --><!-- 名前空間でソート -->
 +
}}<!--
 +
非推奨の "image=blank" の使用の検出と報告:
 +
-->{{#switch:{{{image|}}}
 +
| blank = <!-- 現状ではカテゴライズされるのを防ぐためコメントアウト [[Category:Wikipedia message box parameter needs fixing|{{Main other|Main:}}{{FULLPAGENAME}}]] --><!-- 名前空間でソート -->
 +
}}<noinclude>
 +
{{Documentation}}
 +
</noinclude>