Template:Metanotice/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Added new param)
 
(15 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Doc/subpage}}
{{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.
<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 ==
== Copy and Paste ==
Line 11: Line 12:
== Usage, Parameters and Examples ==
== Usage, Parameters and Examples ==
{{CodeBlock|<nowiki>{{Metanotice}}</nowiki>}}
{{CodeBlock|<nowiki>{{Metanotice}}</nowiki>}}
{|class="standard-table" | style="width:100%; text-align:center;"
{|class="standard-table" | style="width:auto; text-align:center;"
|-
|-
! style="width:15%" | {{Dictionary/common|Param}}
! style="width:15%" | {{Dictionary/common|Param}}
Line 19: Line 20:
|-
|-
| No parameters
| No parameters
| Template will revert to the default valves specified within the {{code|<nowiki>{{#switch}}</nowiki>}} parser functions.
| Template will revert to the default valves specified within the parser functions.
| {{CodeBlock|margin=5px|<nowiki>{{Metanotice}}</nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>{{Metanotice}}</nowiki>}}
| {{Metanotice}}
| style="text-align:left;" | {{Metanotice}}
|-
|-
| {{Code|{{param|rgb}}}}
| {{Code|{{param|rgb}}}}
Line 27: Line 28:
| {{CodeBlock|margin=5px|<nowiki>| rgb = 235, 185, 23 </nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| rgb = 235, 185, 23 </nowiki>}}
| {{Metanotice|rgb=235,185,23}}
| {{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}}}}
| {{Code|{{param|opacity}}}}
| Metanotice background 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>}}
| {{CodeBlock|margin=5px|<nowiki>| opacity = .3</nowiki>}}<br>{{CodeBlock|margin=5px|<nowiki>| hex = ...| opacity = 3a</nowiki>}}
| {{Metanotice|opacity=.3}}
| {{Metanotice|opacity=.3}}<br>{{Metanotice|hex=#22eb17|opacity=3a}}
|-
|-
| {{Code|{{param|id}}}}
| {{Code|{{param|id}}}}
| Infobox content. Most commonly used for adding icons.
| Idbox content. Most commonly used for adding icons.
| {{CodeBlock|margin=5px|<nowiki>| id = [[File:Warning_icon.png|32px|link=]]</nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| id = [[File:Warning_icon.png|32px|link=]]</nowiki>}}
| {{Metanotice|id=[[File:Warning_icon.png|32px|link=]]}}
| {{Metanotice|id=[[File:Warning_icon.png|32px|link=]]}}
Line 41: Line 47:
| Text content
| Text content
| {{CodeBlock|margin=5px|<nowiki>| text = Hello, World!</nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| text = Hello, World!</nowiki>}}
| {{Metanotice|text = Hello, World!}}
| 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