Difference between revisions of "Template talk:Code"

From Amahi Wiki
Jump to: navigation, search
Line 3: Line 3:
  
 
To add formatting to code, we have a little [[Template:Code|code template]] that can be used like this:
 
To add formatting to code, we have a little [[Template:Code|code template]] that can be used like this:
 
+
<!--
 
<pre>
 
<pre>
 
{{Code|bash$ ls -l
 
{{Code|bash$ ls -l
Line 19: Line 19:
 
bash$  
 
bash$  
 
}}
 
}}
 +
-->
 
----
 
----
{|class="wikitable" style="width: 100%"
+
{|style="width: 99%; border-width: 1px; border-style: solid; border-color: #aaa"
 
! Description
 
! Description
 
! width=40% | You type
 
! width=40% | You type
Line 26: Line 27:
 
|-
 
|-
 
|boxed code
 
|boxed code
|<pre>
+
|
 +
<pre>
 
{{Code|bash$ ls -l
 
{{Code|bash$ ls -l
 
total 696
 
total 696
Line 33: Line 35:
 
}}
 
}}
 
</pre>
 
</pre>
|{{Code|bash$ ls -l
+
|
 +
{|
 +
{{Code|bash$ ls -l
 
total 696
 
total 696
 
...
 
...
 
bash$  
 
bash$  
 
}}
 
}}
 +
|}
 
|}
 
|}

Revision as of 20:25, 2 January 2011


Code Formatting

To add formatting to code, we have a little code template that can be used like this:


Description You type You get
boxed code
{{Code|bash$ ls -l
total 696
...
bash$ 
}}
bash code
​bash$ ls -l total 696 ... bash$ ​