Template:MdCode/doc: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 3: | Line 3: | ||
This template will allow you to format text as a one-line code in Markdown style. | This template will allow you to format text as a one-line code in Markdown style. | ||
== Usage == | |||
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. | |||
<br>'''Manage Wiki Formatting:'''<br> | |||
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. | |||
<br>'''Switching Styles:'''<br> | |||
Insert {{MdCode|outline-oneclick|<nowiki>style|</nowiki>}} after {{MdCode|outline-oneclick|<nowiki>{{MdCode|</nowiki>}} and replace '''"style"''' with the name of an existing style. | |||
<br>'''Using Modifiers:'''<br> | |||
Insert {{MdCode|outline-oneclick|<nowiki>modifier=|</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 == | == Styles == | ||
| Line 29: | Line 41: | ||
| {{param|color}} || allows you to change the color of the text if the default style is enabled | | {{param|color}} || allows you to change the color of the text if the default style is enabled | ||
|} | |} | ||
== Examples == | == Examples == | ||
Revision as of 03:17, 27 November 2022
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.
Usage
Just insert {{MdCode|YourText}} into the page and replace YourText with your content to make the one-line code styling work.
Manage Wiki Formatting:
You can use <nowiki>YourText</nowiki> to disable processing of various commands that allow the wiki to style your text. Also, it can disable the template style.
Switching Styles:
Insert style| after {{MdCode| and replace "style" with the name of an existing style.
Using Modifiers:
Insert modifier=| after {{MdCode| or style| 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
| Name | Description |
|---|---|
default |
enabled by default, but disabled if other styles are activated |
oneclick |
default style with one click selection |
desaturated |
less saturated version |
desaturated-oneclick |
desaturated style with one click selection |
outline |
less saturated version with outline |
outline-oneclick |
outline style with one click selection |
Modifiers
| Name | Description |
|---|---|
| {{{background}}} | allows you to change the background color if the default style is enabled |
| {{{color}}} | 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|outline|Go to [[Main Page|Main Page]]}} {{MdCode|outline|Go to {{hla|4}}}}
Go to Main Page Go to
Half-Life: Alyx{{MdCode|onelick|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