Template:Metanotice/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Added new param)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Doc/subpage}}
{{Doc/subpage}}
<div style="display:flex;"><div style="flex:1">
<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 {{tl|link=messagebox}} template as a simplified, easier to use alternative.
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 22: Line 22:
| Template will revert to the default valves specified within the 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 28: 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}}}}
Line 42: 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
! colspan="4" | Style parameters
Line 54: Line 59:
| Text styling
| Text styling
| {{CodeBlock|margin=5px|<nowiki>| textstyle = font-family:monospace;</nowiki>}}
| {{CodeBlock|margin=5px|<nowiki>| textstyle = font-family:monospace;</nowiki>}}
| {{Metanotice|text = Example text|textstyle = font-family:monospace}}
| style="text-align:left;" | {{Metanotice|text = Example text|textstyle = font-family:monospace}}
|}
|}
</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