Difference between revisions of "Template:Board$"

[quality revision] [quality revision]
(Merge articles)
(Merge articles)
 

1 Usage[edit]

The Board$ template is used to prefix a command that must be executed on a board, with a board-specific prompt.
Thanks to the board-prompt class defined in MediaWiki:Common.css, a double (or triple) click to select the command doesn't select the prompt.

Usage:  {{Board$}}

2 Basic examples[edit]

You type You get
ls test command executed on the board
{{Board$}} ls test<br>
test1.txt test2.txt

ls test
test1.txt test2.txt

3 More examples[edit]

You type You get
2 commands executed on the board and preformatted text block (space at the beginning of each line)

 {{Board$}} ls test
 test1.txt test2.txt
 {{Board$}} cat test/test1.txt
 This is a test

 ls test
test1.txt test2.txt
 cat test/test1.txt
This is a test

Command executed on the board and preformatted text block (space at the beginning of each line)

 {{Board$}} ls test
 test1.txt test2.txt

 ls test
test1.txt test2.txt

Long command executed on the board and preformatted text block (space at the beginning of each line)

 {{Board$}} this is a so long command executed on the board that a horizontal scrolling bar is needed

 this is a so long command executed on the board that a horizontal scrolling bar is needed

Template used within another public message box template

{{Info |
Message before the command
 {{Board$}} ls test
 test1.txt test2.txt
Message after the command
}}

Info white.png Information

Message before the command

 ls test
test1.txt test2.txt

Message after the command

Template used within another protected message box template

{{InternalInfo |
Message before the command
 {{Board$}} ls test
 test1.txt test2.txt
Message after the command
}}

4 Maintenance[edit]

This template is a template common to all ST wikis.
Modifications must be done into the WikiModel. They must be reviewed by all ST wikis maintainers.
When approved, the template can be pushed/merged towards all ST wikis.

4 5 Code[edit]

Board $>

<noinclude>

==Usage==
The [[Template:Board$|Board$]] template is used '''to prefix a command that must be executed on a board, with a board-specific prompt'''.

<br>

Thanks to the <code>board-prompt</code> class defined in [[MediaWiki:Common.css]], a double (or triple) click to select the command doesn't select the prompt.
Usage:  <nowiki>{{</nowiki>Board$}}

==Basic examples==
{| class="st-table"
! You type !! You get
|-
| <code>ls test</code> command executed on the board<pre style="white-space: pre-wrap;">

{{Board$}} ls </pre>

|
{{Board$}} ls
|}

==test<br>

test1.txt test2.txt</pre>

|
{{Board$}} ls test<br>

test1.txt test2.txt
|}

==More examples==
{| class="st-table"
! You type !! You get
|-
| 2  commands executed on the board and preformatted text block (space at the beginning of each line)<pre style="white-space: pre-wrap;">

 {{Board$}} ls test
 test1.txt test2.txt
 {{Board$}} cat test/test1.txt
 This is a test</pre>

|
 {{Board$}} ls test
 test1.txt test2.txt
 {{Board$}} cat test/test1.txt
 This is a test
|-
| Command executed on the board and preformatted text block (space at the beginning of each line)<pre style="white-space: pre-wrap;">

 {{Board$}} ls test
 test1.txt test2.txt</pre>

|
 {{Board$}} ls test
 test1.txt test2.txt
|-
| Long  command executed on the board and preformatted text block (space at the beginning of each line)<pre style="white-space: pre-wrap;">

 {{Board$}} this is a so long command executed on the board that a horizontal scrolling bar is needed</pre>

| style="max-width:30em;" |
 {{Board$}} this is a so long command executed on the board that a horizontal scrolling bar is needed
|-
| Template used within another public message box template<pre style="white-space: pre-wrap;">

{{Info |
Message before the command
 {{Board$}} ls test
 test1.txt test2.txt
Message after the command
}}</pre>

|
{{Info |
Message before the command
 {{Board$}} ls test
 test1.txt test2.txt
Message after the command
}}
|-
| Template used within another protected message box template<pre style="white-space: pre-wrap;">

{{InternalInfo |
Message before the command
 {{Board$}} ls test
 test1.txt test2.txt
Message after the command
}}</pre>

|
{{InternalInfo |
Message before the command
 {{Board$}} ls test
 test1.txt test2.txt
Message after the command
}}
|}

==Maintenance==
This template is a template common to all ST wikis. <br>

Modifications must be done into the [[stwikimodel:Template:Board$|WikiModel]]. They must be reviewed by all  ST wikis maintainers.<br>

When approved, the template can be pushed/merged towards all ST wikis.

==Code==</noinclude>'''Board $>'''<span class{{=}}"board-prompt"></span>
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
==Usage==
 
==Usage==
The [[Template:Board$|Board$]] template is used '''to prefix a command that must be executed on a board, with a board-specific prompt'''.
+
The [[Template:Board$|Board$]] template is used '''to prefix a command that must be executed on a board, with a board-specific prompt'''.<br>
  +
Thanks to the <code>board-prompt</code> class defined in [[MediaWiki:Common.css]], a double (or triple) click to select the command doesn't select the prompt.
   
 
  Usage:  <nowiki>{{</nowiki>Board$}}
 
  Usage:  <nowiki>{{</nowiki>Board$}}
Line 9: Line 10:
 
! You type !! You get
 
! You type !! You get
 
|-
 
|-
| <code>ls</code> command executed on the board
+
| <code>ls test</code> command executed on the board
 
<pre style="white-space: pre-wrap;">
 
<pre style="white-space: pre-wrap;">
{{Board$}} ls
+
{{Board$}} ls test<br>
  +
test1.txt test2.txt
 
</pre>
 
</pre>
 
|
 
|
{{Board$}} ls
+
{{Board$}} ls test<br>
  +
test1.txt test2.txt
  +
|}
  +
 
  +
==More examples==
  +
{| class="st-table"
  +
! You type !! You get
  +
|-
  +
| 2  commands executed on the board and preformatted text block (space at the beginning of each line)
  +
<pre style="white-space: pre-wrap;">
  +
{{Board$}} ls test
  +
test1.txt test2.txt
  +
{{Board$}} cat test/test1.txt
  +
This is a test
  +
</pre>
  +
|
  +
{{Board$}} ls test
  +
test1.txt test2.txt
  +
{{Board$}} cat test/test1.txt
  +
This is a test
  +
|-
  +
| Command executed on the board and preformatted text block (space at the beginning of each line)
  +
<pre style="white-space: pre-wrap;">
  +
{{Board$}} ls test
  +
test1.txt test2.txt
  +
</pre>
  +
|
  +
{{Board$}} ls test
  +
test1.txt test2.txt
  +
|-
  +
| Long  command executed on the board and preformatted text block (space at the beginning of each line)
  +
<pre style="white-space: pre-wrap;">
  +
{{Board$}} this is a so long command executed on the board that a horizontal scrolling bar is needed
  +
</pre>
  +
| style="max-width:30em;" |
  +
{{Board$}} this is a so long command executed on the board that a horizontal scrolling bar is needed
  +
|-
  +
| Template used within another public message box template
  +
<pre style="white-space: pre-wrap;">
  +
{{Info |
  +
Message before the command
  +
{{Board$}} ls test
  +
test1.txt test2.txt
  +
Message after the command
  +
}}
  +
</pre>
  +
|
  +
{{Info |
  +
Message before the command
  +
{{Board$}} ls test
  +
test1.txt test2.txt
  +
Message after the command
  +
}}
  +
|-
  +
| Template used within another protected message box template
  +
<pre style="white-space: pre-wrap;">
  +
{{InternalInfo |
  +
Message before the command
  +
{{Board$}} ls test
  +
test1.txt test2.txt
  +
Message after the command
  +
}}
  +
</pre>
  +
|
  +
{{InternalInfo |
  +
Message before the command
  +
{{Board$}} ls test
  +
test1.txt test2.txt
  +
Message after the command
  +
}}
 
|}
 
|}
   
Line 23: Line 94:
   
 
==Code==
 
==Code==
</noinclude>'''Board $>'''
+
</noinclude><span class{{=}}"board-prompt"></span>