Template:Code/doc: Difference between revisions
Jump to navigation
Jump to search
SirYodaJedi (talk | contribs) (Created page with "{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page.) --> ;Description This template wraps the text provided to it in code tags....") |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{ | <noinclude>{{doc|0}}</noinclude>__NOTOC__ | ||
< | This template will allow you to format text as a one-line code in Markdown style. | ||
This template | |||
; | == Parameters == | ||
{| class="standard-table" | |||
! colspan="2" | Styles | |||
|- | |||
| {{param|desaturated}} || less saturated version | |||
|- | |||
| {{param|outlined}} || less saturated version with outline | |||
|- | |||
| {{param|clear}} || no style | |||
|} | |||
{| class="standard-table" | |||
! colspan="2" | Modifiers | |||
|- | |||
| {{param|select}} || Sets the values for the user-select parameter.<br><br>'''Values:''' <br>'''1''' - all (one click selection), <br>'''2''' - none (template content will not be highlighted). | |||
|- | |||
| {{param|color}} || allows you to change the background color if the default style is enabled | |||
|- | |||
| {{param|background}} || allows you to change the color of the text if the default style is enabled | |||
|} | |||
== Examples == | |||
< | {{MdCode|<nowiki>{{MdCode|Go to [[Main Page|Main Page]]}}</nowiki>}} {{MdCode|<nowiki>{{MdCode|Go to {{hla|4}}}}</nowiki>}} | ||
{{Doc/PreviewBlock|{{MdCode|Go to [[Main Page|Main Page]]}} {{MdCode|Go to {{hla|4}}}}}} | |||
{{MdCode|<nowiki>{{MdCode|desaturated|Go to [[Main Page|Main Page]]}}</nowiki>}} {{MdCode|<nowiki>{{MdCode|desaturated|Go to {{hla|4}}}}</nowiki>}} | |||
{{Doc/PreviewBlock|{{MdCode|desaturated|Go to [[Main Page|Main Page]]}} {{MdCode|desaturated|Go to {{hla|4}}}}}} | |||
{{MdCode|<nowiki>{{MdCode|outlined|Go to [[Main Page|Main Page]]}}</nowiki>}} {{MdCode|<nowiki>{{MdCode|outlined|Go to {{hla|4}}}}</nowiki>}} | |||
{{Doc/PreviewBlock|{{MdCode|outlined|Go to [[Main Page|Main Page]]}} {{MdCode|outlined|Go to {{hla|4}}}}}} | |||
{{MdCode|<nowiki>{{MdCode|select=1|background=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}}</nowiki>}} {{MdCode|<nowiki>{{MdCode|background=rgb(40,60,100)|Go to {{hla|4}}}}</nowiki>}} | |||
{{Doc/PreviewBlock|{{MdCode|select=1|background=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}} {{MdCode|background=rgb(40,60,100)|Go to {{hla|4}}}}}} | |||
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
[[Category:Markdown]] | |||
}}</includeonly> | }}</includeonly> |
Revision as of 04:38, 22 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 in Markdown style.
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: 1 - all (one click selection), 2 - none (template content will not be highlighted). |
{{{color}}} | allows you to change the background color if the default style is enabled |
{{{background}}} | allows you to change the color of the text if the default style is enabled |
Examples
{{MdCode|Go to [[Main Page|Main Page]]}}
{{MdCode|Go to {{hla|4}}}}
Go to Main Page
Go to
Half-Life: Alyx
{{MdCode|desaturated|Go to [[Main Page|Main Page]]}}
{{MdCode|desaturated|Go to {{hla|4}}}}
Go to Main Page
Go to
Half-Life: Alyx
{{MdCode|outlined|Go to [[Main Page|Main Page]]}}
{{MdCode|outlined|Go to {{hla|4}}}}
outlined
outlined
{{MdCode|select=1|background=rgb(230,230,230)|color=black|Go to '''[[Main Page|Main Page]]'''}}
{{MdCode|background=rgb(40,60,100)|Go to {{hla|4}}}}
Go to Main Page
Go to
Half-Life: Alyx