Difference between revisions of "Template:Ambox"

From TTWiki
Jump to navigationJump to search
(Blanked the page)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
<!--
  +
Wiki Ambox code adaptation
  +
  +
--><includeonly><div style="{{#IF: {{{style|}}} | {{{style}}} | margin: 0px 10% 0px 10%; border: 1px solid #aaa; border-left: 10px solid {{#switch:{{{type|}}}
  +
| delete =#b22222;
  +
| content =#f28500;
  +
| style =#f4c430;
  +
| move =#9932cc;
  +
| protected =#bba;
  +
| #default =#1e90ff;
  +
}} padding: 4px 8px; background:#efefef; min-height: 44px;">}}
  +
<div style="position: absolute;">[[Image:{{#if:{{{image|}}}
  +
| {{{image}}}
  +
| {{#switch:{{{type|}}}
  +
| delete =Deletion.png
  +
| content =Content.png
  +
| style =Edit-clear.png
  +
| move =Move.png
  +
| protected =Protection.png
  +
| #default =Notice.png
  +
}}
  +
}}|40px]]</div>
  +
<div style="border: none; padding: 2px 2px 2px 62px;">
  +
<span style="{{#IF: {{{text-style|}}} | {{{text-style}}} | }}"> {{{text|}}} </span>
  +
</div></div><!--
  +
Detect and report usage with faulty [[Template:Ambox#Article message box types|"type"]] parameter:
  +
-->{{#switch:{{{type|}}}
  +
| = <!--No type fed, is also valid input -->
  +
| delete =
  +
| content =
  +
| style =
  +
| move =
  +
| protected =
  +
| notice =
  +
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wrong syntax]]
  +
}}</includeonly><noinclude>
  +
  +
==Usage==
  +
Simple usage example:
  +
<pre>
  +
{{ambox | text = Some text.}}
  +
</pre>
  +
{{ambox | text = Some text.}}
  +
  +
OR:
  +
<pre>
  +
{{ambox
  +
| type = content
  +
| text = Warning - Some text.
  +
}}
  +
</pre>
  +
{{ambox | type = content | text = Warning - Some text.}}
  +
  +
== Available List of parameters==
  +
<pre>
  +
{{ambox
  +
| type = delete / content / style / notice / move / protected
  +
| image = Picture.Png / Picture.Png|alt=Picture (if the parameter does not present, default type icon will be supplied)
  +
| text = Text for a big box, for the top of articles.
  +
  +
| style = Different table style. (preferably should not be used)
  +
| text-style = same as the above for text.
  +
</pre>
  +
  +
=== Article message box types ===
  +
  +
The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type.
  +
  +
  +
{{ambox
  +
| type = delete
  +
| text = type=<u>delete</u> – Deletion issues, such as {{s|delete}}.
  +
}}
  +
{{ambox
  +
| type = content
  +
| text = type=<u>content</u> – Content issues, such as {{s|Warning}}.
  +
}}
  +
{{ambox
  +
| type = style
  +
| text = type=<u>style</u> – Style issues, such as {{s|cleanup}}.
  +
}}
  +
{{ambox
  +
| type = notice
  +
| text = type=<u>notice</u> – Article notices, such as {{s|current}}.
  +
}}
  +
{{ambox
  +
| type = move
  +
| text = type=<u>move</u> – Merge, split and transwiki proposals, such as {{s|split}}.
  +
}}
  +
{{ambox
  +
| type = protected
  +
| text = type=<u>protected</u> – Protection notices, such as {{s|Historical}}.
  +
}}

Latest revision as of 19:05, 22 March 2015


Usage

Simple usage example:

{{ambox | text = Some text.}}
Notice.png

Some text.

OR:

{{ambox 
| type = content
| text = Warning - Some text.
}}
Content.png

Warning - Some text.

Available List of parameters

{{ambox
| type       = delete / content / style / notice / move / protected
| image      = Picture.Png / Picture.Png|alt=Picture (if the parameter does not present, default type icon will be supplied)
| text       = Text for a big box, for the top of articles.

| style      = Different table style. (preferably should not be used)
| text-style = same as the above for text.

Article message box types

The following examples use different type parameters but use no image parameters thus they use the default images for each type.


Deletion.png

type=delete – Deletion issues, such as Template:S.

Content.png

type=content – Content issues, such as Template:S.

Edit-clear.png

type=style – Style issues, such as Template:S.

Notice.png

type=notice – Article notices, such as Template:S.

Move.png

type=move – Merge, split and transwiki proposals, such as Template:S.

Protection.png

type=protected – Protection notices, such as Template:S.