Template:Console/doc: Difference between revisions

From Wiki³
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Usage ==
== Usage ==
  <nowiki>{{Console|
  <nowiki>{{</nowiki>Console
  root=true|</nowiki><span style="float:right">{{redBold|*}}</span>
{{!}}title=''Title'' ''(used to show filenames)'' {{RedBold|*}}
  1=''Command''<nowiki>|</nowiki>
  {{!}}root=true ''(default: false)'' {{RedBold|*}}
  2=''Command''<nowiki>|</nowiki>
{{!}}prompt=false ''(default: true)'' {{RedBold|*}}
  3=''Command''<nowiki>|</nowiki>
  {{!}}1=''Command''
  4=''Command''<nowiki>|</nowiki>
  {{!}}2=''Command''
  5=''Command''
  {{!}}3=''Command''
  {{!}}4=''Command''
  {{!}}5=''Command''
  <nowiki>}}</nowiki>
  <nowiki>}}</nowiki>
&nbsp; {{redBold|&#42;}} Optional field
&nbsp; {{RedBold|&#42;}} Optional field


== Preview ==
== Preview ==
Line 15: Line 17:
This preview is without specifying the root argument.
This preview is without specifying the root argument.
{{Console|1=sudo pacman -Syu}}
{{Console|1=sudo pacman -Syu}}
This last preview is without a prompt at all, using color and a title.
{{Console|title=moo.txt|prompt=false|1=Woo! <mark class="red">H</mark><mark class="green">e</mark><mark class="yellow">l</mark><mark class="blue">l</mark><mark class="magenta">o</mark> <mark class="cyan">W</mark><mark class="red">o</mark><mark class="green">r</mark><mark class="yellow">l</mark><mark class="blue">d</mark><mark class="magenta">!</mark>}}
== Colors ==
== Colors ==
Colors can also be added within the console template. Use the {{mono|&lt;mark&gt;}} HTML5 tag in order to specify which color.<br/>
Colors can also be added within the console template. Use the color templates provided in order to specify which color.<br/>
Valid colors: black, red, green, yellow, blue, magenta, cyan, white<br/>
Valid colors: Black, Red, Green, Yellow, Blue, Magenta, Cyan, White<br/>
''If you wish to use the highlighted version, add the number '2' to the end of the color name (eg. 'blue2')''
''If you wish to use the highlighted version, add 'Bold' to the end of the color name (eg. 'BlueBold')''


'''Color Preview'''
'''Color Preview'''
{{BBS|1=<mark class="black">███</mark> <mark class="red">███</mark> <mark class="green">███</mark> <mark class="yellow">███</mark> <mark class="blue">███</mark> <mark class="magenta">███</mark> <mark class="cyan">███</mark> <mark class="white">███</mark><br/><mark class="black2">███</mark> <mark class="red2">███</mark> <mark class="green2">███</mark> <mark class="yellow2">███</mark> <mark class="blue2">███</mark> <mark class="magenta2">███</mark> <mark class="cyan2">███</mark> <mark class="white2">███</mark>}}<noinclude>
{{Console|prompt=false|1={{Black|███}} {{Red|███}} {{Green|███}} {{Yellow|███}} {{Blue|███}} {{Magenta|███}} {{Cyan|███}} {{White|███}}<br/>{{BlackBold|███}} {{RedBold|███}} {{GreenBold|███}} {{YellowBold|███}} {{BlueBold|███}} {{MagentaBold|███}} {{CyanBold|███}} {{WhiteBold|███}}}}<noinclude>
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 23:37, 25 July 2017

Usage

{{Console
|title=Title (used to show filenames) *
|root=true (default: false) *
|prompt=false (default: true) *
|1=Command
|2=Command
|3=Command
|4=Command
|5=Command
}}

  * Optional field

Preview

This preview is with root enabled.

root ~ # rm -rf /

This preview is without specifying the root argument.

# sudo pacman -Syu

This last preview is without a prompt at all, using color and a title.

filename: moo.txt
Woo! Hello World!

Colors

Colors can also be added within the console template. Use the color templates provided in order to specify which color.
Valid colors: Black, Red, Green, Yellow, Blue, Magenta, Cyan, White
If you wish to use the highlighted version, add 'Bold' to the end of the color name (eg. 'BlueBold')

Color Preview

███ ███ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ ███ ███ ███