Template:MdCode/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{Documentation subpage}} This template allows you to format text as a one-line code in Markdown style. As you can see, this is not real Markdown, but just a template that a...")
 
mNo edit summary
 
(63 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
<noinclude>{{doc|0}}</noinclude>
This template is deprecated, but it is still used on many pages.


This template allows you to format text as a one-line code in Markdown style.
== Parameters ==
 
* {{param|oneclick}}
As you can see, this is not real Markdown, but just a template that allows you to use similar text format when working on page design.
* {{param|desaturated}}
 
* {{param|desaturated-oneclick}}
<br>'''This template has several styles:'''
* {{param|outline}}
{| class="standard-table"
* {{param|outline-oneclick}}
! Name !! Description
* {{param|background}}
|-
* {{param|color}}
| <code style="padding: 1px 3px; user-select: all;">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
|}
 
== Usage ==
Just insert {{MdCode|outline|<nowiki>{{MdCode|YourText}}</nowiki>}} into the page and replace '''YourText''' with your content to make the one-line code styling work.
 
<br>'''Manage Wiki Formatting:'''<br>
You can use {{MdCode|outline|<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.
 
<br>'''Switching Styles'''<br>
Insert {{MdCode|outline|<nowiki>stylename|</nowiki>}} after {{MdCode|outline|<nowiki>{{MdCode|</nowiki>}} and replace '''stylename''' with the name of an existing style.
 
== Example ==
{{MdCode|<nowiki>{{MdCode|Go to [[Main_Page|Main Page]]}}</nowiki>}}
 
{{MdCode|<nowiki>{{MdCode|outline|Go to [[Main_Page|Main Page]]}}</nowiki>}}
 
== Preview ==
Default: {{MdCode|Go to [[Main_Page|Main Page]]}} {{MdCode|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|Go to {{hla|4}}}} {{MdCode|<nowiki>Go to {{hla|4}}</nowiki>}}
 
Desaturated: {{MdCode|desaturated|Go to [[Main_Page|Main Page]]}} {{MdCode|desaturated|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|desaturated|Go to {{hla|4}}}} {{MdCode|desaturated|<nowiki>Go to {{hla|4}}</nowiki>}}
 
Outline: {{MdCode|outline|Go to [[Main_Page|Main Page]]}} {{MdCode|outline|<nowiki>Go to [[Main_Page|Main Page]]</nowiki>}} {{MdCode|outline|Go to {{hla|4}}}} {{MdCode|outline|<nowiki>Go to {{hla|4}}</nowiki>}}
 
<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}}}