Template:MdCode/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{DISPLAYTITLE:Template: Markdown One-Line Code/doc}}{{doc|0}}</noinclude>__NOTOC__
<noinclude>{{doc|0}}</noinclude>
This template will allow you to format text as a one-line code in Markdown style.
This template is deprecated, but it is still used on many pages.


== Usage ==
== Parameters ==
Just insert {{MdCode|outline-oneclick|<nowiki>{{MdCode|YourText}}</nowiki>}} into the page and replace '''YourText''' with your content to make the one-line code styling work.
* {{param|oneclick}}
 
* {{param|desaturated}}
<br>'''Manage Wiki Formatting:'''<br>
* {{param|desaturated-oneclick}}
You can use {{MdCode|outline-oneclick|<nowiki><nowiki>YourText</nowiki></nowiki>}} to disable processing of various commands that allow the wiki to style your text. Also, it can disable the template style.
* {{param|outline}}
 
* {{param|outline-oneclick}}
<br>'''Switching Styles:'''<br>
* {{param|background}}
Insert {{MdCode|outline-oneclick|<nowiki>style|</nowiki>}} after {{MdCode|outline-oneclick|<nowiki>{{MdCode|</nowiki>}} and replace '''"style"''' with the name of an existing style.
* {{param|color}}
 
<br>'''Using Modifiers:'''<br>
Insert {{MdCode|outline-oneclick|<nowiki>modifier=YourText|</nowiki>}} after {{MdCode|outline-oneclick|<nowiki>{{MdCode|</nowiki>}} or {{MdCode|outline-oneclick|<nowiki>style|</nowiki>}} and replace '''"modifier"''' with the name of an existing modifier. After the equal sign, you need to write the properties corresponding to the modifier.
 
== Styles ==
{| class="standard-table"
! Name !! Description
|-
| <code style="padding: 1px 3px;">default</code> || enabled by default, but disabled if other styles are activated
|-
| <code style="padding: 1px 3px; user-select: all;">oneclick</code> || default style with one click selection
|-
| <code style="padding: 1px 3px; user-select: all;">desaturated</code> || less saturated version
|-
| <code style="padding: 1px 3px; user-select: all;">desaturated-oneclick</code> || desaturated style with one click selection
|-
| <code style="padding: 1px 3px; user-select: all;">outline</code> || less saturated version with outline
|-
| <code style="padding: 1px 3px; user-select: all;">outline-oneclick</code> || outline style with one click selection
|}
 
== Modifiers ==
{| class="standard-table"
! Name !! Description
|-
| <code style="padding: 1px 3px;">background</code> || allows you to change the background color if the default style is enabled
|-
| <code style="padding: 1px 3px;">color</code> || 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>}}
{{Documentation/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>}}
{{Documentation/PreviewBlock|{{MdCode|desaturated|Go to [[Main Page|Main Page]]}} {{MdCode|desaturated|Go to {{hla|4}}}}}}
 
 
{{MdCode|<nowiki>{{MdCode|outline|Go to [[Main Page|Main Page]]}}</nowiki>}} {{MdCode|<nowiki>{{MdCode|outline|Go to {{hla|4}}}}</nowiki>}}
{{Documentation/PreviewBlock|{{MdCode|outline|Go to [[Main Page|Main Page]]}} {{MdCode|outline|Go to {{hla|4}}}}}}
 
 
{{MdCode|<nowiki>{{MdCode|oneclick|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>}}
{{Documentation/PreviewBlock|{{MdCode|oneclick|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||
[[Category:Markdown]]
}}</includeonly>

Latest revision as of 13:09, 23 January 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Edit-copy.png
This is a documentation subpage for Template:MdCode.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

This template is deprecated, but it is still used on many pages.

Parameters

  • {{{oneclick}}}
  • {{{desaturated}}}
  • {{{desaturated-oneclick}}}
  • {{{outline}}}
  • {{{outline-oneclick}}}
  • {{{background}}}
  • {{{color}}}