Difference between revisions of "Template:Template doc"

From K2CC Wiki
(Created page with "<includeonly>{{template doc inline|1={{ {{#ifexist:{{SUBJECTSPACEE}}:{{{1|{{PAGENAME}}/doc}}}|{{SUBJECTSPACEE}}:{{{1|{{PAGENAME}}/doc}}}|ns:0}} }}|2={{SUBJECTSPACEE}}:{{{1|{{P...")
(No difference)

Revision as of 12:52, 23 February 2012

Stop_hand_nuvola.png Emblem-important.png Broom_icon.png Merge-split-transwiki_default.png Info_non-talk.png Template_doc_inline Ambox/doc ==Usage== The "type" option defaults to "notice". "Image" and "Imageright" are optional.

{{ambox
| type  = serious / content / style / merge / notice
| image = none / blank / [[Image:Some image.png|40px]]
| imageright = [[Image:Some image.png|40px]]
| text  = The message body text. 
}}

Default Images and Possible Uses

{{#if:|

}}

{{#if:|

}}

{{#if:|

}}

{{#if:|

}}

{{#if:|

}}


Technical

If you need to use special characters in the text parameter then you need to escape them like this:

{{ambox
| text  = <div>
Equal sign = and a start and end brace { } work fine as they are. 
But here is a pipe {{!}} and two end braces }}. 
And now a pipe and end braces |}}.
</div>
}}

TI {{[[Template:{{{1}}}|{{{1}}}]]}} {{#if:{{#ifeq:yes|yes| This page is protected, only Sysops can edit. |}} |

|

 {{#switch:
   {{#if:
   | 
   | xtemplate
   }}
 | main
 | x = 
 | talk
 | xtalk
 | xuser talk
 | ximage talk
 | xtemplate talk
 | xhelp talk
 | xcategory talk = 
 | #default = 
 }}

}}{{#ifeq:{{#ifexpr:{{#if:|{{#time:U|today}}>{{#time:U|{{{expiry}}}}}|0}}|}}|no||{{#ifexpr:{{#if:|{{#time:U|today}}>{{#time:U|{{{expiry}}}}}|0}}|}}}}

TI {{[[Template:{{{1}}}|{{{1}}}]]}} {{#if:{{#ifeq:yes|yes| This page is protected, only Sysops can edit. |}} |

|

 {{#switch:
   {{#if:
   | 
   | xtemplate
   }}
 | main
 | x = 
 | talk
 | xtalk
 | xuser talk
 | ximage talk
 | xtemplate talk
 | xhelp talk
 | xcategory talk = 
 | #default = 
 }}

}}{{#ifeq:{{#ifexpr:{{#if:|{{#time:U|today}}>{{#time:U|{{{expiry}}}}}|0}}|}}|no||{{#ifexpr:{{#if:|{{#time:U|today}}>{{#time:U|{{{expiry}}}}}|0}}|}}}}

Common.css /** CSS placed here will be applied to all skins */

/* Article message box template styles */ table.ambox {

 width: 80%; 
 margin: 0 auto;
 border-collapse: collapse; 
 background: #fbfbfb; 
 border: 1px solid #aaa; 
 border-left: 10px solid #1e90ff;       /* Default "notice" blue */

} table.ambox th, table.ambox td { /* The message body cell(s) */

 padding: 0.25em 0.5em;              /* 0.5em left/right */

} table.ambox td.ambox-image { /* The left image cell */

 width: 52px; 
 padding: 2px 0px 2px 0.5em;         /* 0.5em left, 0px right */
 text-align: center; 

} table.ambox td.ambox-imageright { /* The right image cell */

 width: 52px; 
 padding: 2px 4px 2px 0px;           /* 0px left, 4px right */
 text-align: center; 

} table.ambox-notice {

 border-left: 10px solid #1e90ff;       /* Blue */

/* border-right: 10px solid #1e90ff; */ /* If you want two blue bars */ } table.ambox-delete, table.ambox-serious, table.ambox-rewrite {

 border-left: 10px solid #b22222;       /* Red */

} table.ambox-content {

 border-left: 10px solid #f28500;       /* Orange */

} table.ambox-merge {

 border-left: 10px solid #9932cc;       /* Purple */

} table.ambox-protection {

 border-left: 10px solid #bba;          /* Gray */

} table.ambox-style {

 border-left: 10px solid #f4c430;       /* Yellow */

} table.ambox.ambox-mini { /* small floating box variant */

   float: right;
   clear: right;
   margin: 0 0 0 1em;
   width: 25%;

} /* Infobox template style */

.infobox {

  border: 1px solid #aaa;
  background-color: #f9f9f9;
  color: black;
  margin-bottom: 0.5em;
  margin-left: 1em;
  padding: 0.2em;
  float: right;
  clear: right;

} .infobox td, .infobox th {

  vertical-align: top;

} .infobox caption {

  font-size: larger;
  margin-left: inherit;

} .infobox.bordered {

  border-collapse: collapse;

} .infobox.bordered td, .infobox.bordered th {

  border: 1px solid #aaa;

} .infobox.bordered .borderless td, .infobox.bordered .borderless th {

  border: 0;

}

.infobox.sisterproject {

  width: 20em;
  font-size: 90%;

}

@media print {

   .infobox.sisterproject {
       display: none;
   }

}

/* styles for bordered infobox with merged rows */ .infobox.bordered .mergedtoprow td, .infobox.bordered .mergedtoprow th {

  border: 0;
  border-top: 1px solid #aaa;
  border-right: 1px solid #aaa;

}

.infobox.bordered .mergedrow td, .infobox.bordered .mergedrow th {

  border: 0;
  border-right: 1px solid #aaa;

}