“模板:Ambox/core”的版本间的差异

来自Ballance Wiki
跳转至: 导航搜索
第1行: 第1行:
<table class="metadata plainlinks ambox {{{class|}}}" style="{{{style|}}}">
+
<table class="metadata plainlinks ambox {{#switch:{{{small|}}}
<tr>{{#switch:{{{image|}}}
+
| left = mbox-small-left
|blank
+
}} {{#switch:{{{type|}}}
|none = <td class="mbox-empty-cell"></td>
+
| speedy     = ambox-speedy
|#default = <td class="mbox-image"><div style="width: 52px;">{{#if:{{{image|}}}
+
| delete     = ambox-delete
  |{{{image}}}
+
| content   = ambox-content
  |[[File:{{#switch:{{{type|}}}
+
| style     = ambox-style
  |speedy = Ambox speedy deletion.png
+
| move       = ambox-move
  |delete = Ambox deletion.png
+
| protection = ambox-protection
  |content = Ambox content.png
+
| notice     <!-- notice = default -->
  |style = Edit-clear.svg
+
| #default   = ambox-notice
  |move = Ambox move.png
+
}} {{#if:{{{section|}}} <!-- 宣告章節用小型格式 -->
  |protection = Ambox protection.png
+
  | ambox-section
  |notice|#default = Ambox notice.png
+
}}" style="{{{style|}}}">
  }}|40x40px|link=|alt=]]
+
<tr>
}}</div></td>
+
{{#switch:{{{image|}}}
}}<td class="mbox-text" style="{{{textstyle|}}}"><span class="mbox-text-span">{{{issue|}}}{{#if:{{{date|}}}
+
| blank    <!-- Fall back to "none", since deprecated. -->
|<small>''({{{date}}})''</small>
+
| none = <td class="mbox-empty-cell"></td>  <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
}}<span class="hide-when-compact"> {{#if:{{{talk|}}}
+
| #default =
|{{#ifexist:{{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
+
  <td class="mbox-image">{{
  |{{{talk}}}
+
  #switch:{{{small|}}}
  |{{TALKPAGENAME}}
+
  | left = <!-- Don't use the DIV -->
 +
  | #default = <div style="width: 52px;">
 
   }}
 
   }}
   |&#32;相關討論可見於{{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
+
   {{#if:{{{image|}}}
  |[[{{{talk}}}|{{FULLPAGENAME:{{{talk}}}}}]]
+
  | {{{image}}}
  |[[{{TALKPAGENAME}}#{{{talk}}}|討論頁]]
+
  | [[File:{{#switch:{{{type|}}}
   }}.
+
    | speedy    = Ambox speedy deletion.png
}}
+
    | delete    = Ambox deletion.png
}}{{#ifeq:{{{fix|}}}|-{zh;zh-hans;zh-hant{{!}} }-||<br><small>{{{fix|}}}</small>}}</span><span class="hide-when-compact"> {{{info|}}}</span></span></td>{{#switch:{{{imageright|}}}
+
    | content    = Ambox content.png
|none =
+
    | style      = Ambox style.png
|=
+
    | move      = Ambox move.png
|#default = <td class="mbox-imageright"><div style="width: 52px;">{{{imageright}}}</div></td>
+
    | protection = Ambox protection.png
}}</tr></table>
+
    | notice          <!-- notice = default -->
 +
    | #default  = Ambox notice.png
 +
    }} | {{#switch:{{{small|}}}  
 +
      | left = 20x20px
 +
      | #default = 40x40px
 +
      }}{{#if:{{{section|}}}
 +
        |25px
 +
        |40px
 +
      }} ]]
 +
  }}{{#switch:{{{small|}}}
 +
  | left = <!-- Don't use the /DIV -->
 +
  | #default = </div>
 +
   }}</td>
 +
}}
 +
<td class="mbox-text" style="{{{textstyle|}}}">{{#if:{{{section|}}}|{{{text-section|{{{text}}}}}}|{{{text}}}}}</td>
 +
{{#if:{{{imageright|}}}
 +
| {{#ifeq:{{{imageright|}}}|none
 +
  | <!-- No image. -->
 +
  | <td class="mbox-imageright">{{#switch:{{{small|}}}
 +
    | left = {{{imageright}}}
 +
    | #default = <div style="width: 52px;"> {{{imageright}}} </div>
 +
    }}</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  = [[Category:需要修复的信息框|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
 +
}}<!--
 +
Detect and report usage of deprecated "image=blank":
 +
-->{{#switch:{{{image|}}}
 +
| blank = [[Category:需要修复的信息框|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
 +
}}

2019年7月8日 (一) 23:44的版本