Template:Console/doc: Difference between revisions

From Wiki³
mNo edit summary
Line 16: Line 16:
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.
{{Console|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 {{mono|&lt;mark&gt;}} HTML5 tag in order to specify which color.<br/>

Revision as of 17:11, 10 July 2017

Usage

{{Console|
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.

Woo! Hello World!

Colors

Colors can also be added within the console template. Use the <mark> HTML5 tag 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 the number '2' to the end of the color name (eg. 'blue2')

Color Preview

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