Template:Ambox: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
update
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<table class="metadata plainlinks ambox {{#switch:{{{type|}}}
<table class="metadata plainlinks ambox {{#switch:{{{type|}}} <!-- all styles present in CSS? -->
| speedy    = ambox-speedy
| speedy    = ambox-speedy
| delete    = ambox-delete
| delete    = ambox-delete
| content    = ambox-content
| content    = ambox-content
| style      = ambox-style
| style      = ambox-style
| update    = ambox-update
| move      = ambox-move
| move      = ambox-move
| protection = ambox-protection
| protection = ambox-protection
| notice    <!-- notice = default -->
| notice    <!-- notice = default -->
| #default  = ambox-notice
| #default  = ambox-notice
}}" style="{{{style|}}}">
}}" style="{{{style|}}} margin-bottom:5px;">
<tr>
<tr>
{{#switch:{{{image|}}}
{{#switch:{{{image|}}}
Line 15: Line 14:
| none = <td class="mbox-empty-cell"></td>  <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
| none = <td class="mbox-empty-cell"></td>  <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. -->
| #default =  
| #default =  
   <td class="mbox-image"><div style="width: 52px;">
   <td class="mbox-image"><div style="width: 52px;"> <!-- all styles present in CSS? -->
   {{#if:{{{image|}}}
   {{#if:{{{image|}}}
   | {{{image}}}
   | {{{image}}}
Line 22: Line 21:
     | delete    = Ambox deletion.png
     | delete    = Ambox deletion.png
     | content    = Ambox content.png
     | content    = Ambox content.png
    | update    = Ambox_update_red.svg
     | style      = Edit-clear.png
     | style      = Edit-clear.png
     | move      = Ambox move.png
     | move      = Ambox move.png
Line 48: Line 46:
| content
| content
| style
| style
| update
| move
| move
| protection
| protection
| notice    = <!-- Do nothing, valid "type" -->
| notice    = <!-- Do nothing, valid "type" -->
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Message box parameter needs fixing|Main{{FULLPAGENAME}}]]<!-- Sort on namespace -->
| #default  = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Message box parameter needs fixing|Main{{FULLPAGENAME}}]]<!-- Sort on namespace -->
}}<noinclude>
}}<noinclude>__NOTOC__
== Usage ==
==Documentation==
=== Examples ===


Simple usage example:
Simple usage example:
Line 75: Line 73:
</pre>
</pre>


== Article message box types ==
=== Article message box type examples ===


The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type.
The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type. These are taken from Wikipedia so may not be a perfect match for the Nottinghack Wiki.


{{ambox
{{ambox
Line 94: Line 92:
| type  = style
| type  = style
| text  = type=<u>style</u> – Style issues.
| text  = type=<u>style</u> – Style issues.
}}
{{ambox
| type  = update
| text  = type=<u>update</u> – Update issues.
}}
}}
{{ambox
{{ambox
Line 112: Line 106:
}}
}}


===Resources ===
This template uses styles stored in [[MediaWiki:Common.css]]
[[Category:Page Action Templates]]
[[Category:Utility Templates]]
[[Category:Utility Templates]]
</noinclude>
</noinclude>

Latest revision as of 17:59, 8 May 2019

Documentation

Examples

Simple usage example:

{{ambox | text = Some text.}}

Complex example:

{{ambox
| type       = style
| image      = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]
| textstyle  = color: red; font-weight: bold; font-style: italic;
| text       = Text for a big box, for the top of articles.
}}

Article message box type examples

The following examples use different type parameters but use no image parameters thus they use the default images for each type. These are taken from Wikipedia so may not be a perfect match for the Nottinghack Wiki.

Resources

This template uses styles stored in MediaWiki:Common.css