Шаблон:Ambox — различия между версиями

Материал из Вики LessWrong.ru
Перейти к: навигация, поиск
м
Строка 1: Строка 1:
<table class="metadata plainlinks ambox {{{class|}}}" style="{{{style|}}}" role="presentation">
+
<table class="metadata plainlinks ambox {{#switch:{{{small|}}}
<tr>{{#switch:{{{image|}}}
+
| left = mbox-small-left
|blank
+
}}" style="margin:2px 10%;{{#if:{{{stacked|}}}|margin-top:-3px;}}{{#switch:{{{type|}}}
|none = <td class="mbox-empty-cell"></td>
+
| danger    = background:#FAA;border:1px solid #AAA;border-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:10px #B22222 solid;
|#default = <td class="mbox-image"><div style="width: 52px;">{{#if:{{{image|}}}
+
| warning    = background:#FDD;border:1px solid #AAA;border-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:10px #B22222 solid;
   |{{{image}}}
+
| caution    = background:#FFA;border:1px solid #AAA;border-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:10px #F28500 solid;
   |&nbsp;
+
| approval  = background:#DFD;border:1px solid #AAA;border-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:10px #00FF00 solid;
}}</div></td>
+
| proposal  = background:#E4D8FF;border:1px solid #AAA;border-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:10px #9933CC solid;
}}<td class="mbox-text" style="{{{textstyle|}}}"><span class="mbox-text-span">{{{issue|}}}<span class="hide-when-compact"> {{#if:{{{talk|}}}
+
| detail    = background:#FBFBFB;border:1px solid #AAA;border-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:10px #F4C430 solid;
|{{#ifexist:{{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
+
| protection = background:#FBFBFB;border:1px solid #AAA;border-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:10px #BBA solid;
  |{{{talk}}}
+
| notice<!-- = default -->
  |{{TALKPAGENAME}}
+
| #default  = background:#FBFBFB;border:1px solid #AAA;border-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:10px #1E90FF solid;
 +
}}{{{style|}}}"><tr>
 +
{{#switch:{{{image|}}}
 +
| blank<!-- Fall back to "none", since deprecated. -->
 +
| none     =
 +
  <td class="mbox-empty-cell" style="width:1px;border:none;padding:0"></td><!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
 +
| #default =  
 +
  <td class="mbox-image" style="border:none;padding:2px 0;padding-{{Dir|lang={{{lang|}}}|rtl=right|ltr=left}}:0.9em;text-align:center">{{#switch:{{{small|}}}
 +
  | left    = <!-- Don't use the DIV -->
 +
  | #default = <div style="width:52px;">
 +
  }}{{#if:{{{image|}}}
 +
   | {{{image}}}
 +
   | [[Image:{{#switch:{{{type|}}}
 +
    | danger    = Ambox warning pn.svg{{!}}Danger
 +
    | warning    = Ambox warning pn.svg{{!}}Warning
 +
    | caution    = Ambox important.svg{{!}}Caution
 +
    | approval  = Thumb up icon.svg{{!}}Approved
 +
    | proposal  = Ambox warning purple.svg{{!}}Proposal
 +
    | detail    = Broom icon.svg{{!}}Detail
 +
    | protection = Ambox protection.png{{!}}Protection
 +
    | notice<!-- = default -->
 +
    | #default  = Information icon4.svg{{!}}Information
 +
    }}|{{#switch:{{{small|}}}
 +
    | left    = 20x20px
 +
    | #default = 40x40px
 +
    }}|link=]]
 +
  }}{{#switch:{{{small|}}}
 +
  | left    = <!-- Don't use the /DIV -->
 +
  | #default = </div>
 +
  }}</td>
 +
}}
 +
<td class="mbox-text" style="width:100%;border:none;padding:0.25em 0.9em;text-align:center;{{{textstyle|}}}">{{#if:{{{edit|}}}
 +
| <div style="float:{{Dir|lang={{{lang|}}}|rtl=left|ltr=right}}">{{Edit|{{{edit|}}}}}</div>
 +
}}{{{text|}}}</td>
 +
{{#if:{{{imageright|}}}
 +
| {{#ifeq:{{{imageright|}}}|none
 +
  | <!-- No image. -->
 +
  | <td class="mbox-imageright" style="border:none;padding:2px 0;padding-{{Dir|lang={{{lang|}}}|rtl=left|ltr=right}}:0.9em;text-align:center">{{#switch:{{{small|}}}
 +
    | left    = {{{imageright|}}}
 +
    | #default = <div style="width:{{{imagerightwidth|52}}}px">{{{imageright|}}}</div>
 +
    }}</td>
 
   }}
 
   }}
  |&#32;Relevant discussion may be found on {{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
+
}}
  |[[{{{talk}}}|{{FULLPAGENAME:{{{talk}}}}}]]
+
</tr></table>
  |the [[{{TALKPAGENAME}}#{{{talk}}}|talk page]]
 
  }}.
 
}}
 
}} {{{fix|}}}</span>{{#if:{{{date|}}}
 
|&#32;<small>''({{{date}}})''</small>
 
}}<span class="hide-when-compact"> {{{info|}}}</span></span></td>{{#switch:{{{imageright|}}}
 
|none =
 
|=
 
|#default = <td class="mbox-imageright"><div style="width: 52px;">{{{imageright}}}</div></td>
 
}}</tr></table>
 

Версия 17:34, 29 мая 2017