Difference between revisions of "Template:Cli"

From PC-BSD Wiki
Jump to: navigation, search
 
(16 intermediate revisions by one user not shown)
Line 6: Line 6:
 
|-
 
|-
 
|align="left" style=" border: #444 solid 2px;  background: black; color: #00FF00; padding-right: 5px;" colspan="3"|
 
|align="left" style=" border: #444 solid 2px;  background: black; color: #00FF00; padding-right: 5px;" colspan="3"|
{{{1}}}
+
{{{xterm|error}}}
|
+
|                                             <!-- I could test for xterm being assigned, and if not, default to 1 & 2, and no title bar -->
|
+
<!--                                                but that is a concept for another day, another battle of wits against wiki markup!  -->
 
|style="border:none; text-align:left; width:{{{width|60%}}}"|
 
|style="border:none; text-align:left; width:{{{width|60%}}}"|
{{{2|}}}
+
{{{1|}}}
 
|}</includeonly><noinclude>
 
|}</includeonly><noinclude>
 
== Explanation ==
 
== Explanation ==
This template produces a window reminiscent of an xterm, for use with commandline instructions. The text to the right of the box may be some type of comment such as ''"a prompt asking for the root password will open."'' By assigning width it can be adjusted if necessary, otherwise the content to the right of the box defaults to a width of 60% out of the 98% used. Note that formatting is needed (such as <nowiki><br></nowiki>) to prevent the content from becoming one long line or paragraph. Other style markup like for ''italic'' or '''bold''' should be placed directly around the content and not around the entire template.
+
This template produces a window reminiscent of an xterm, for use with commandline instructions. The text to the right of the box may be some type of comment such as ''"a prompt asking for the root password will open."'' By assigning width it can be adjusted if necessary, otherwise the content to the right of the box defaults to a width of 60% out of the 98% used. Note that formatting is needed (such as <nowiki><br></nowiki>) to prevent the content from becoming one long line or paragraph (the <nowiki><</nowiki>nowiki> or 'leading space' formatting tricks do not work). Other style markup like for ''italic'' or '''bold''' should be placed directly around the content and not around the entire template.
  
 
== Usage ==
 
== Usage ==
'''<nowiki>{{</nowiki>cli|'''<br>
+
'''<nowiki>{{</nowiki>cli|xterm='''<br>
 
''content''<nowiki><br></nowiki><br>
 
''content''<nowiki><br></nowiki><br>
''second line''<br>
+
<nowiki>'''</nowiki>''second line'' - note that bold and italic<nowiki>'''</nowiki><br>
 
'''|'''<br>
 
'''|'''<br>
 
''Text to right of box''<br>
 
''Text to right of box''<br>
<nowiki>''</nowiki>''second line''<nowiki>''</nowiki><nowiki><br></nowiki><br>
+
<nowiki>''</nowiki>''second line'' - are used as examples<nowiki>''</nowiki><nowiki><br></nowiki><br>
 
'''|'''<br>
 
'''|'''<br>
 
'''''width='''value''<br>
 
'''''width='''value''<br>
Line 27: Line 27:
  
 
== Example ==
 
== Example ==
{{cli|
+
{{cli|xterm=
 
content<br>
 
content<br>
second line
+
'''second line''' - note that bold and italic
 
|
 
|
 
Text to right of box<br>
 
Text to right of box<br>
''second line''
+
''second line'' - are used as examples
 
}}
 
}}
</noinclude>
 
<noinclude>
 
[[category:templates]]
 
</noinclude>
 

Latest revision as of 21:28, 1 November 2012

[edit] Explanation

This template produces a window reminiscent of an xterm, for use with commandline instructions. The text to the right of the box may be some type of comment such as "a prompt asking for the root password will open." By assigning width it can be adjusted if necessary, otherwise the content to the right of the box defaults to a width of 60% out of the 98% used. Note that formatting is needed (such as <br>) to prevent the content from becoming one long line or paragraph (the <nowiki> or 'leading space' formatting tricks do not work). Other style markup like for italic or bold should be placed directly around the content and not around the entire template.

[edit] Usage

{{cli|xterm=
content<br>
'''second line - note that bold and italic'''
|
Text to right of box
''second line - are used as examples''<br>
|
width=value
}}

[edit] Example

Pseudo-xterm-left.png Xterm Pseudo-xterm-right.png

content
second line - note that bold and italic

Text to right of box
second line - are used as examples