Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Code: Difference between revisions

Template page
VivaRomania (talk | contribs)
m Maybe this will fix the odd newline behavior I'm seeing on 2.2.2
NinjaV (talk | contribs)
changed to be like VDC's and added 14 presets
Line 1: Line 1:
<code>{{{1}}}</code><noinclude>{{Doc begin}}
<includeonly><onlyinclude><span style="font-family:monospace; {{#switch:{{{p|{{{preset|}}}}}}
== Usage ==
* {{tlx|code|<nowiki>[[Civilian]]</nowiki>}} generates {{code|[[Civilian]]}}.
* {{tlx|code|2=1=&#124; parameter name = value}} generates {{code|1=&#124; parameter name = value}}.


[[Category:Layout templates]]
|#default = padding:2px 4px; border-radius:3px; color:black; background:rgba(241, 233, 203, 1);
</noinclude>
 
|1 = padding:2px 4px; border-radius:3px; color:black; background:rgba(241, 233, 203, 1);
|2 = padding:2px 4px; border-radius:3px; color:white; background:rgba(88, 58, 49, 1);
 
|3 = padding:2px 4px; border-radius:3px; color:black; background:rgba(241, 233, 203, 1); border:2px solid rgb(0 0 0 / 25%);
|4 = padding:2px 4px; border-radius:3px; color:white; background:rgba(88, 58, 49, 1); border:2px solid rgb(0 0 0 / 25%);
 
|5 = padding:2px 4px; border-radius:3px; color:black; background:rgba(241, 233, 203, 1); border:2px solid rgb(255 255 255 / 25%);
|6 = padding:2px 4px; border-radius:3px; color:white; background:rgba(88, 58, 49, 1); border:2px solid rgb(255 255 255 / 25%);
 
|7 = padding:2px 4px; border-radius:0px; color:black; background:rgba(241, 233, 203, 1);
|8 = padding:2px 4px; border-radius:0px; color:white; background:rgba(88, 58, 49, 1);
 
|9 = padding:2px 4px; border-radius:0px; color:black; background:rgba(241, 233, 203, 1); border:2px solid rgb(0 0 0 / 25%);
|10 = padding:2px 4px; border-radius:0px; color:white; background:rgba(88, 58, 49, 1); border:2px solid rgb(0 0 0 / 25%);
 
|11 = padding:2px 4px; border-radius:0px; color:black; background:rgba(241, 233, 203, 1); border:2px solid rgb(255 255 255 / 25%);
|12 = padding:2px 4px; border-radius:0px; color:white; background:rgba(88, 58, 49, 1); border:2px solid rgb(255 255 255 / 25%);
 
|1010 = padding:2px 4px; border-radius:3px; color:#00ff00; background:#000000;
|1011 = padding:2px 4px; border-radius:0px; color:#00ff00; background:#000000;
 
}} {{#if:{{{select|}}}|user-select:{{{select}}};}} {{{style|}}}">{{#if:{{{highlight|}}}|{{#tag:syntaxhighlight|{{{1}}}|lang={{{highlight}}}|inline=1}}|{{{1}}}}}</span></onlyinclude></includeonly>
 
== Documentation ==
Just go to Valve Dev Community for their documentation, only difference is formatting (styling) and presets which are listed below. Link: [https://developer.valvesoftware.com/wiki/Template:Code VDC Code Documentation]
 
== Presets ==
Feel free to add more!
 
{{code|Default - Pale}}
 
=== Rounded ===
{{code|preset=1|Preset 1 - Pale}}
 
{{code|preset=2|Preset 2 - Brown}}
 
{{code|preset=3|Preset 3 - Pale (Dark Outlined)}}
 
{{code|preset=4|Preset 4 - Brown (Dark Outlined)}}
 
{{code|preset=5|Preset 5 - Pale (Light Outlined)}}
 
{{code|preset=6|Preset 6 - Brown (Light Outlined)}}
 
=== Squared ===
{{code|preset=7|Preset 7 - Pale}}
 
{{code|preset=8|Preset 8 - Brown}}
 
{{code|preset=9|Preset 9 - Pale (Dark Outlined)}}
 
{{code|preset=10|Preset 10 - Brown (Dark Outlined)}}
 
{{code|preset=1|Preset 11 - Pale (Light Outlined)}}
 
{{code|preset=12|Preset 12 - Brown (Light Outlined)}}
 
=== Special ===
{{code|preset=1010|Preset 1010 - Hacker Green (Rounded)}}
 
{{code|preset=1011|Preset 1011 - Hacker Green (Squared)}}
 
[[Category:Formatting templates]]