Template:Metanotice/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{Doc/subpage}}{{ModernTodo|Documentation}}")
 
mNo edit summary
Line 1: Line 1:
{{Doc/subpage}}{{ModernTodo|Documentation}}
{{Doc/subpage}}
This is a metatemplate used to aid in the creation of notice templates. It's goal is to supplant the {{tl|link=messagebox}} as a simplified, easier to use alternative.
 
== Copy and Paste ==
{{CodeBlock|<nowiki>{{Metanotice
| rgb =
| id =
| text =
}}</nowiki>}}
 
== Usage, Parameters and Examples ==
{{CodeBlock|<nowiki>{{Metanotice}}</nowiki>}}
{|class="standard-table" | style="width:100%; text-align:center;"
|-
! style="width:15%" | {{Dictionary/common|Param}}
! {{Dictionary/common|Desc}}
! {{Dictionary/common|Example}}
! style="width:40%" | {{Dictionary/common|Preview}}
|-
| No parameters
| Template will revert to the default valves specified within the {{code|<nowiki>{{#switch}}</nowiki>}} parser functions.
| {{CodeBlock|margin=5px|<nowiki>{{Metanotice}}</nowiki>}}
| {{Metanotice}}
|-
| {{Code|{{param|rgb}}}}
| Controls the metanotice background and border color
| {{CodeBlock|margin=5px|<nowiki>| rgb = 235, 185, 23 </nowiki>}}
| {{Metanotice|rgb=235,185,23}}
|-
| {{Code|{{param|opacity}}}}
| Metanotice background opacity
| {{CodeBlock|margin=5px|<nowiki>| opacity = .3</nowiki>}}
| {{Metanotice|opacity=.3}}
|-
| {{Code|{{param|id}}}}
| Infobox content. Most commonly used for adding icons.
| {{CodeBlock|margin=5px|<nowiki>| id = [[File:Warning_icon.png|32px|link=]]</nowiki>}}
| {{Metanotice|id=[[File:Warning_icon.png|32px|link=]]}}
|-
| {{Code|{{param|text}}}}
| Text content
| {{CodeBlock|margin=5px|<nowiki>| text = Hello, World!</nowiki>}}
| {{Metanotice|text = Hello, World!}}
|-
|}

Revision as of 23:02, 14 May 2023

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

This is a metatemplate used to aid in the creation of notice templates. It's goal is to supplant the {{messagebox}} as a simplified, easier to use alternative.

Copy and Paste

{{Metanotice | rgb = | id = | text = }}

Usage, Parameters and Examples

{{Metanotice}}
Parameter Description Example Preview
No parameters Template will revert to the default valves specified within the {{#switch}} parser functions.
{{Metanotice}}
Icon-help.png
{{{rgb}}} Controls the metanotice background and border color
| rgb = 235, 185, 23
Icon-help.png
{{{opacity}}} Metanotice background opacity
| opacity = .3
Icon-help.png
{{{id}}} Infobox content. Most commonly used for adding icons.
| id = [[File:Warning_icon.png|32px|link=]]
Warning icon.png
{{{text}}} Text content
| text = Hello, World!
Icon-help.png
Hello, World!