Template:Code/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 20: | Line 20: | ||
| {{param|select}} | | {{param|select}} | ||
| Sets the values for the user-select parameter.<br><br>'''Values:''' | | Sets the values for the user-select parameter.<br><br>'''Values:''' | ||
*'''{{ | *'''{{Code|1}}''': All (one click selection); | ||
*'''{{ | *'''{{Code|2}}''': None (template content will not be highlighted). | ||
|- | |- | ||
| {{param|color}} | | {{param|color}} | ||
Line 31: | Line 31: | ||
== Examples == | == Examples == | ||
{{ | {{Code|<nowiki>{{Code|Go to [[Main Page|Main Page]]}}</nowiki>}} {{Code|<nowiki>{{Code|Go to {{hla|4}}}}</nowiki>}} | ||
{{Doc/PreviewBlock|{{ | {{Doc/PreviewBlock|{{Code|Go to [[Main Page|Main Page]]}} {{Code|Go to {{hla|4}}}}}} | ||
{{ | {{Code|<nowiki>{{Code|style=2|Go to [[Main Page|Main Page]]}}</nowiki>}} {{Code|<nowiki>{{Code|style=2|Go to {{hla|4}}}}</nowiki>}} | ||
{{Doc/PreviewBlock|{{ | {{Doc/PreviewBlock|{{Code|style=2|Go to [[Main Page|Main Page]]}} {{Code|style=2|Go to {{hla|4}}}}}} | ||
{{ | {{Code|<nowiki>{{Code|style=1|Go to [[Main Page|Main Page]]}}</nowiki>}} {{Code|<nowiki>{{Code|style=2|Go to {{hla|4}}}}</nowiki>}} | ||
{{Doc/PreviewBlock|{{ | {{Doc/PreviewBlock|{{Code|style=1|Go to [[Main Page|Main Page]]}} {{Code|style=2|Go to {{hla|4}}}}}} | ||
{{ | {{Code|<nowiki>{{Code|select=1|bg=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}}</nowiki>}} {{Code|<nowiki>{{Code|bg=rgb(40,60,100)|Go to {{hla|4}}}}</nowiki>}} | ||
{{Doc/PreviewBlock|{{ | {{Doc/PreviewBlock|{{Code|select=1|bg=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}} {{Code|bg=rgb(40,60,100)|Go to {{hla|4}}}}}} | ||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
[[Category:Markdown]] | [[Category:Markdown]] | ||
}}</includeonly> | }}</includeonly> |
Revision as of 13:39, 23 January 2023

This is a documentation subpage for Template:Code.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
This template will allow you to format text as a one-line code. The default style is based on Markdown.
Parameters
Styles | |
---|---|
{{{desaturated}}} | less saturated version |
{{{outlined}}} | less saturated version with outline |
{{{clear}}} | no style |
Modifiers | |
---|---|
{{{select}}} | Sets the values for the user-select parameter. Values:
|
{{{color}}} | allows you to change the color of the text if the default style is enabled |
{{{background}}} | allows you to change the background color if the default style is enabled |
Examples
{{Code|Go to [[Main Page|Main Page]]}} {{Code|Go to {{hla|4}}}}
Go to Main Page Go to
Half-Life: Alyx

{{Code|style=2|Go to [[Main Page|Main Page]]}} {{Code|style=2|Go to {{hla|4}}}}
Go to Main Page Go to
Half-Life: Alyx

{{Code|style=1|Go to [[Main Page|Main Page]]}} {{Code|style=2|Go to {{hla|4}}}}
Go to Main Page Go to
Half-Life: Alyx

{{Code|select=1|bg=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}} {{Code|bg=rgb(40,60,100)|Go to {{hla|4}}}}
Go to Main Page Go to
Half-Life: Alyx
