Template:Metanotice/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{Doc/subpage}}{{ModernTodo|Documentation}}")
 
(Added new param)
 
(16 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Doc/subpage}}{{ModernTodo|Documentation}}
{{Doc/subpage}}
<div style="display:flex;"><div style="flex:1">
This is a metatemplate used to aid in the creation of notice templates. It's goal is to supplant the {{tl2|messagebox}} template 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:auto; 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 parser functions.
| {{CodeBlock|margin=5px|<nowiki>{{Metanotice}}</nowiki>}}
| style="text-align:left;" | {{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|hex}}}}
| Controls the metanotice background and border color
| {{CodeBlock|margin=5px|<nowiki>| hex = #22eb17</nowiki>}}
| {{Metanotice|hex=#22eb17}}
|-
| {{Code|{{param|opacity}}}}
| Metanotice background opacity<br>if {{param|hex}} is used then opacity will be from 00 to fe
| {{CodeBlock|margin=5px|<nowiki>| opacity = .3</nowiki>}}<br>{{CodeBlock|margin=5px|<nowiki>| hex = ...| opacity = 3a</nowiki>}}
| {{Metanotice|opacity=.3}}<br>{{Metanotice|hex=#22eb17|opacity=3a}}
|-
| {{Code|{{param|id}}}}
| Idbox 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>}}
| style="text-align:left;" | {{Metanotice|text = Hello, World!}}
|-
! colspan="4" | Style parameters
|-
| {{Code|{{param|style}}}}
| Notice styling
| {{CodeBlock|margin=5px|<nowiki>| style = border:1px solid currentcolor;</nowiki>}}
| {{Metanotice|style = border:1px solid currentcolor}}
|-
| {{Code|{{param|textstyle}}}}
| Text styling
| {{CodeBlock|margin=5px|<nowiki>| textstyle = font-family:monospace;</nowiki>}}
| style="text-align:left;" | {{Metanotice|text = Example text|textstyle = font-family:monospace}}
|}
</div>
<div>
{{infobox template
| summary      = Aids in the creation of article notice boxes
| float        = none
| type        = Metatemplate
| contrib      = [[User:mailmanmicky|mailmanmicky]]
| creationdate = 30/04/2023<br><small>(30 April 2023)</small>
| translation  = No
| parser      = No
| var          = No
}}</div></div>

Latest revision as of 11:39, 13 February 2025

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}} template 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 parser functions.
{{Metanotice}}
Icon-help.png
{{{rgb}}} Controls the metanotice background and border color
| rgb = 235, 185, 23
Icon-help.png
{{{hex}}} Controls the metanotice background and border color
| hex = #22eb17
Icon-help.png
{{{opacity}}} Metanotice background opacity
if {{{hex}}} is used then opacity will be from 00 to fe
| opacity = .3

| hex = ...| opacity = 3a
Icon-help.png

Icon-help.png
{{{id}}} Idbox 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!
Style parameters
{{{style}}} Notice styling
| style = border:1px solid currentcolor;
Icon-help.png
{{{textstyle}}} Text styling
| textstyle = font-family:monospace;
Icon-help.png
Example text
Template:Metanotice
Logo-template.png
Summary
Aids in the creation of article notice boxes
Type
Metatemplate
Contributors
Creation date
30/04/2023
(30 April 2023)
Notes
N/A
Subpages
Documentation
Preload
N/A
Sandbox
Strings
N/A
Testcases
N/A
Other
N/A
Revision information
Latest editor
N0one
Last edited
13/02/2025
20250213113944
Revision size
2722 bytes
2.722 kilobytes
0.002722 megabytes
Technical information
Page identifier
53258
Contains translations
No
Uses parser functions?
No
Uses variables?
No