Difference between revisions of "Template:Ambox"

From YUIkipedia
Jump to navigation Jump to search
m (1 revision)
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!--{{Ambox}} begin-->{{#switch:{{{small|}}}
+
<table style="{{{style|}}}" class="plainlinks ambox {{#switch:{{{type|}}}
| left =
+
  | protection = ambox-protection
   {{Ambox/core
+
  | speedy    = ambox-speedy
   | small      = left
+
  | delete
   | type      = {{{type|}}}
+
  | serious    = ambox-delete
  | image     = {{#if:{{{smallimage|}}}
+
  | content    = ambox-content
                | {{{smallimage}}}
+
  | style      = ambox-style
                | {{{image|}}}
+
  | merge      = ambox-merge
                }}
+
  | notice        <!-- notice = default -->
  | imageright = {{#if:{{{smallimageright|}}}
+
  | #default  = ambox-notice
                | {{{smallimageright}}}
+
}} {{#if:{{{section|}}} <!-- 節フラグ:指定すると節用のスタイルを適用 -->
                | {{{imageright|}}}
+
  | ambox-section
                }}
+
}} {{#if:{{{printable|}}} <!-- 印刷フラグ:指定すると印刷時にも表示 -->
  | style      = {{{style|}}}
+
  |
  | textstyle  = {{{textstyle|}}}
+
   | noprint <!-- 規定値は印刷時非表示 -->
  | text      = {{#if:{{{smalltext|}}}
+
}}" {{#if:{{{background|}}} <!-- 背景色 -->
                | {{{smalltext}}}  
+
   | style="background-color:{{{background}}}"
                | {{{text}}}  
+
}}>
                }}
+
<tr>
   }}
+
<td class="ambox-image">
| #default =
+
{{#ifeq:{{{image}}}|none
   {{Ambox/core
+
  | <!-- 画像無しの場合の空白セル: テキスト用セルの幅を100%にするために必要 -->
  | type       = {{{type|}}}
+
   | <div class="ambox-imagecontainer">{{#if:{{{image-file|}}}
  | image     = {{{image|}}}
+
    | [[File:{{{image-file}}}|{{#if:{{{section|}}}
  | imageright = {{{imageright|}}}
+
      |{{#if:{{{image-size-section|}}}|{{{image-size-section}}}|25}}
  | style      = {{{style|}}}
+
      |{{#if:{{{image-size|}}}|{{{image-size}}}|40}}
  | textstyle  = {{{textstyle|}}}
+
    }}px]]
  | text      = {{{text}}}
+
    | {{#switch:{{{image|}}}
   }}
+
      | protection | speedy | delete | serious | content | style | merge | notice <!-- 既定画像用キーワード -->
}}<!--
+
      | <!-- 空白または未定義 --> = [[File:{{#switch:{{#if:{{{image|}}}|{{{image}}}|{{{type|}}}}}
 +
        | speedy    = Ambox speedy deletion.png
 +
        | delete
 +
        | serious    = Ambox deletion.png
 +
        | content    = Ambox content.png
 +
        | style      = Ambox_style.png
 +
        | merge      = Ambox move.png
 +
        | protection = Ambox protection.png
 +
        | notice      <!-- notice = default -->
 +
        | #default  = Ambox notice.png
 +
      }}|{{#if:{{{section|}}}
 +
        |{{#if:{{{image-size-section|}}}|{{{image-size-section}}}|25}}
 +
        |{{#if:{{{image-size|}}}|{{{image-size}}}|40}}
 +
      }}px]]
 +
      | blank    = [[File:No image.svg]]
 +
      | #default = {{{image}}}
 +
    }}
 +
   }}</div>
 +
}}</td>
 +
<td class="ambox-text">{{#if:{{{section|}}}|{{{text-section|{{{text}}}}}}|{{{text}}}}}</td>
 +
{{#if:{{{imageright|}}}{{{imageright-file|}}}|
 +
   <td class="ambox-imageright"><div class="ambox-imagecontainer"> {{#if:{{{imageright-file|}}}
 +
    | [[File:{{{imageright-file}}}|{{#if:{{{section|}}}
 +
       |{{#if:{{{imageright-size-section|}}}|{{{imageright-size-section}}}|{{#if:{{{image-size-section|}}}|{{{image-size-section}}}|25}}}}
 +
      |{{#if:{{{imageright-size|}}}|{{{imageright-size}}}|{{#if:{{{image-size|}}}|{{{image-size}}}|40}}}}
 +
    }}px]]
 +
    | {{{imageright}}}
 +
   }} </div></td>
 +
}}
 +
</tr>
 +
</table><!--
  
--><includeonly>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:Article message boxes]]}}}}</includeonly><!--
+
--><includeonly>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq: {{NAMESPACE}}|Template|[[Category:記事メッセージボックス]]}}}}</includeonly><!--
  
--><!--{{Ambox}} end--><noinclude>
+
--><noinclude>{{Documentation}}
 
+
<!-- カテゴリと言語間リンクはここではなく、/doc サブページに追加してください --></noinclude>
{{pp-template}}
 
{{Documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 

Latest revision as of 15:26, 22 March 2010

[create] 50px Template documentation