Template:NoticeBox/core: Difference between revisions

From PZwiki
m (spacing fix)
(added "margin" attribute for padding with other elements + moved documentation to /doc)
Line 1: Line 1:
<includeonly>{| style="width: 80%; height: 32px; background: {{{bkg-color|#F9F9F9}}}; border: {{{border-width|1px}}} solid {{{color|#1E90FF}}}; margin:auto;" cellspacing=0
<noinclude>{{Protection|reason=This page is considered '''High Risk''' as it is transcluded onto various pages.}}{{Documentation}}</noinclude><includeonly>{| style="width: 80%; height: 32px; background: {{{bkg-color|#F9F9F9}}}; border: {{{border-width|1px}}} solid {{{color|#1E90FF}}}; margin:6px auto 6px auto;" cellspacing=0
   | style="width:7px; background: {{{color|#1E90FF}}};" |  
   | style="width:7px; background: {{{color|#1E90FF}}};" |  
   {{#if:{{{image|}}}|{{!}} style="width:68px; text-align:center; padding-top:4px; padding-bottom:4px;" {{!}} {{{image|[[File:Imbox_notice.png]]}}} }}
   {{#if:{{{image|}}}|{{!}} style="width:68px; text-align:center; padding-top:4px; padding-bottom:4px;" {{!}} {{{image|[[File:Imbox_notice.png]]}}} }}
   | style="text-align:left; padding-left:0px" | <div style="{{{style|}}}">{{{text}}}</div>
   | style="text-align:left; padding-left:0px" | <div style="{{{style|}}}">{{{text}}}</div>
|}{{#if:{{{hidecat|}}}| |{{{cat|}}} }}</includeonly><noinclude>
|}{{#if:{{{hidecat|}}}| |{{{cat|}}} }}</includeonly>
==Usage==
<pre>{{NoticeBox/core
| bkg-color = purple
| color = black
| border-width = 2px
| image = [[File:PictureKate.png|32px]]
| style = font-size:150%;
| text = This feature/item is planned in a '''future''' version. It either does not exist yet, or does not yet have any known use.
| cat = [[Category:notyetingame]]
| hidecat = true
}}</pre>
:'''Produces:'''
{{NoticeBox/core
| bkg-color = purple
| color = black
| border-width = 2px
| image = [[File:PictureKate.png|32px]]
| style = font-size:150%;
| text = This feature/item is planned in a '''future''' version. It either does not exist yet, or does not yet have any known use.
| cat = [[Category:notyetingame]]
| hidecat = true
}}
 
==Parameters==
{| class="wikitable"
!Syntax || Description
|-
|bkg-color || Colour of the background.
|-
|color || Colour of the border and the tag on the left.
|-
|border-width || Width of the border. Same border defined by <code>color</code>.
|-
|image || The image to be inserted on the left side.
|-
|style || Style in CSS of the text.
|-
|text || The text used in the description of the notice.
|-
|cat || The category added to the article this notice is on.
|-
|hidecat || Having a value in this will hide the category from the page.
|}
 
</noinclude>

Revision as of 18:39, 5 May 2019

Lock-locked.png
This page has been put into protection by a PZwiki administrator.
[view] [edit] [history] [purge] Template documentation
This template contains the core functioning of {{NoticeBox}}.

Usage

{{NoticeBox/core
| bkg-color = purple
| color = black
| border-width = 2px
| image = [[File:PictureKate.png|32px]]
| style = font-size:150%;
| text = This feature/item is planned in a '''future''' version. It either does not exist yet, or does not yet have any known use.
| cat = [[Category:notyetingame]]
| hidecat = true
}}
Produces:
PictureKate.png
This feature/item is planned in a future version. It either does not exist yet, or does not yet have any known use.

Parameters

Syntax Description
bkg-color Colour of the background.
color Colour of the border and the tag on the left.
border-width Width of the border. Same border defined by color.
image The image to be inserted on the left side.
style Style in CSS of the text.
text The text used in the description of the notice.
cat The category added to the article this notice is on.
hidecat Having a value in this will hide the category from the page.
Documentation transcluded from Template:NoticeBox/core/doc.
Editors can experiment in this template's sandbox (create)