Template:Messagebox/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (→‎top: clean up, replaced: {{Documentation subpage → {{Doc/subpage)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Doc/subpage}}
<!-- Please place categories where indicated at the bottom of this page.) -->
<!-- Please place categories where indicated at the bottom of this page.) -->


Line 15: Line 15:
*{{param|image}} - An image. Default is <code><nowiki>[[</nowiki>[[:File:Info.png]]<nowiki>|40px|link=]]</nowiki></code>. Use <code>image=</code> or <code>image=None</code> to get no image.
*{{param|image}} - An image. Default is <code><nowiki>[[</nowiki>[[:File:Info.png]]<nowiki>|40px|link=]]</nowiki></code>. Use <code>image=</code> or <code>image=None</code> to get no image.
*{{param|bgcolor}} - Background color. Default is <code>#28374b</code>.
*{{param|bgcolor}} - Background color. Default is <code>#28374b</code>.
*{{param|bgcolorgradient}} - Background color with linear gradients. (Optional)
*{{param|bgcolorgradient2}} - Same as above, but on the other side. (Optional)
*{{param|bgcolordeg}} - Degrees for linear gradient.
*{{param|borderstyle}} - Style of special border, which will be followed by {{param|bdcolor}}. Default is <code>border-left: 10px solid</code>. Use <code>borderstyle=</code> for no special border.
*{{param|borderstyle}} - Style of special border, which will be followed by {{param|bdcolor}}. Default is <code>border-left: 10px solid</code>. Use <code>borderstyle=</code> for no special border.
*{{param|bdcolor}} - Special border color. Default is <code>#537AA8</code>.
*{{param|bdcolor}} - Special border color. Default is <code>#537AA8</code>.
Line 25: Line 28:
!Wikitext
!Wikitext
!width=50%| Result
!width=50%| Result
|-
|
<pre style="background:#444; border-color:#666; color:#ddd; margin:0">
{{Messagebox|text=Message text.|image=}}
</pre>
|
{{Messagebox|text=Message text.|image=}}
|-
|-
|-
|
|
Line 46: Line 41:
|text = Text here
|text = Text here
|small = Small text here
|small = Small text here
|txtcolor = blue
|txtcolor = pink
|txtstyle = italic
|txtstyle = italic
|image = [[File:en.png|55px|link=Template:Messagebox]]
|image = [[File:en.png|55px|link=Template:Messagebox]]
|bgcolor = red
|bgcolor = purple
|bdcolor = green
|bdcolor = green
|bdcolor2 = yellow
|bdcolor2 = yellow
Line 59: Line 54:
|text = Text here
|text = Text here
|small = Small text here
|small = Small text here
|txtcolor = blue
|txtcolor = pink
|txtstyle = italic
|txtstyle = italic
|image = [[File:en.png|55px|link=Template:Messagebox]]
|image = [[File:en.png|55px|link=Template:Messagebox]]
|bgcolor = red
|bgcolor = purple
|bdcolor = green
|bdcolor = green
|bdcolor2 = yellow
|bdcolor2 = yellow
Line 72: Line 67:
<includeonly>{{sandbox other||
<includeonly>{{sandbox other||
<!-- Categories below this line, please -->
<!-- Categories below this line, please -->
[[Category:Notice templates|{{PAGENAME}}]]
[[Category:Notice templates|{{PAGENAME}}]] [[Category:Metatemplates]]


}}</includeonly>
}}</includeonly>

Latest revision as of 02:17, 12 January 2024

Edit-copy.png
This is a documentation subpage for Template:Messagebox.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Usage

A simple message box.

Parameters

All parameters except {{{text}}} are optional.
All parameters except {{{text}}}, {{{small}}} and {{{image}}} refer to the table that represents the overall box.

  • {{{text}}} - Main text.
  • {{{small}}} - Small text under main text.
  • {{{txtcolor}}} - Color of both texts, e.g. red or #ff0000.
  • {{{txtstyle}}} - Style of all text, default is normal.
  • {{{image}}} - An image. Default is [[File:Info.png|40px|link=]]. Use image= or image=None to get no image.
  • {{{bgcolor}}} - Background color. Default is #28374b.
  • {{{bgcolorgradient}}} - Background color with linear gradients. (Optional)
  • {{{bgcolorgradient2}}} - Same as above, but on the other side. (Optional)
  • {{{bgcolordeg}}} - Degrees for linear gradient.
  • {{{borderstyle}}} - Style of special border, which will be followed by {{{bdcolor}}}. Default is border-left: 10px solid. Use borderstyle= for no special border.
  • {{{bdcolor}}} - Special border color. Default is #537AA8.
  • {{{bdcolor2}}} - Overall box border color. Default is #525252.
  • {{{margin}}} - Margin style. Default is 0 10%.
  • {{{style}}} - More style parameters for the overall box, which is a table.

Examples

Wikitext Result
{{messagebox|text=Message text.}}
{{messagebox
|text = Text here
|small = Small text here
|txtcolor = pink
|txtstyle = italic
|image = [[File:en.png|55px|link=Template:Messagebox]]
|bgcolor = purple
|bdcolor = green
|bdcolor2 = yellow
|style=padding:1em
}}