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

(ページ間の差分)
移動先: 案内検索
ページ 1
ページ 2
(1版)
 
(1版)
 
1行目: 1行目:
{{#ifeq:{{{small|}}}|yes
+
<table class="plainlinks ombox {{#ifeq:{{{small}}}|yes|mbox-small}}  
| {{Ombox/core
+
{{#switch:{{{type|}}}
  | small           = yes
+
| speedy    = ombox-speedy
  | type            = {{{type|}}}
+
| delete    = ombox-delete
  | image          = {{#if:{{{smallimage|}}} | {{{smallimage}}} | {{{image|}}} }}
+
| content    = ombox-content
  | image-file     = {{#if:{{{smallimage-file|}}} | {{{smallimage-file}}} | {{{image-file|}}} }}
+
| style     = ombox-style
   | image-size      = {{#if:{{{smallimage-size|}}} | {{{smallimage-size|}}} | 30x30 }}
+
| move      = ombox-move
  | imageright      = {{#if:{{{smallimageright|}}} | {{{smallimageright}}} | {{{imageright|}}} }}
+
| protection = ombox-protection
   | imageright-file = {{#if:{{{smallimageright-file|}}} | {{{smallimageright-file}}} | {{{imageright-file|}}} }}
+
| notice         
   | imageright-size = {{#if:{{{smallimageright-size|{{{smallimage-size|}}}}}}
+
| #default   = ombox-notice
                      | {{{smallimageright-size|{{{smallimage-size|}}}}}}
+
}}" style="{{{style|}}}">
                      | 30x30
+
<tr>
                      }}
+
{{#ifeq:{{{image|}}}|none
  | style          = {{{style|}}}; {{#if:{{{background|}}}|background-color: {{{background|}}}}}
+
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td class="mbox-empty-cell" style="border: none; padding: 0px; width: 1px;"></td>
  | class          = {{{class|}}}
+
| <td class="mbox-image">
  | textstyle       = {{{textstyle|}}}
+
   {{#if:{{{image-file|}}}
  | text            = {{#if:{{{smalltext|}}} | {{{smalltext|}}} | {{{text}}} }}
+
  | [[File:{{{image-file}}}|{{{image-size|40}}}px]]
   }}
+
   | {{#if:{{{image|}}}
| {{Ombox/core
+
    | {{{image}}}
  | type            = {{{type|}}}
+
    | [[File:{{#switch:{{{type|}}}
  | image          = {{{image|}}}
+
      | speedy    = Imbox speedy deletion.png
  | image-file      = {{{image-file|}}}
+
      | delete    = Imbox deletion.png
  | image-size      = {{#if:{{{image-size|}}} | {{{image-size|}}} | 40x40 }}
+
      | content    = Imbox content.png
  | imageright      = {{{imageright|}}}
+
      | style      = Imbox style.png
  | imageright-file = {{{imageright-file|}}}
+
      | move       = Imbox move.png
  | imageright-size = {{#if:{{{imageright-size|}}} | {{{imageright-size|}}} | 40x40 }}
+
      | protection = Imbox protection.png
   | style          = {{{style|}}}; {{#if:{{{background|}}}|background-color: {{{background|}}}}}
+
      | notice          <!-- notice = default -->
  | class          = {{{class|}}}
+
      | #default  = Imbox notice.png
  | textstyle      = {{{textstyle|}}}
+
      }} | {{{image-size|40}}}px ]]
  | text            = {{{text}}}
+
    }}
 +
   }}</td>
 +
}}
 +
<td class="mbox-text" style="{{{textstyle|}}}">{{#if:{{{text|}}}| {{{text}}} }}<!-- {{{text}}}内冒頭のウィキマークアップによる箇条書きを正しく表示させるために条件文にしています。 --></td>
 +
{{#if:{{{imageright|}}}
 +
| {{#ifeq:{{{imageright|}}}|none
 +
  | <!-- No image. -->
 +
   | <td class="mbox-imageright"> {{#if:{{{imageright-file|}}}
 +
    | [[画像:{{{imageright-file}}}|{{{imageright-size|40}}}px]]
 +
    | {{{imageright}}}
 +
    }}</td>
 
   }}
 
   }}
 +
| <!-- {{{imageright}}}指定なし&{{{imageright-file}}}指定あり -->{{#if:{{{imageright-file|}}}| <td class="mbox-imageright">[[画像:{{{imageright-file}}}|{{{imageright-size|40}}}px]]</td> }}
 +
}}
 +
</tr>
 +
</table><!-- Detect and report usage with faulty "type" parameter:
 +
-->{{#switch:{{{type|}}}
 +
|  <!-- No type fed, is also valid input -->
 +
| speedy
 +
| delete
 +
| content
 +
| style
 +
| move
 +
| protection
 +
| notice    =    <!-- Do nothing, valid "type" -->
 +
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wikipedia message box parameter needs fixing|{{Main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
 
}}<noinclude>
 
}}<noinclude>
 
{{Documentation}}
 
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
 
</noinclude>
 
</noinclude>