Difference between revisions of "Template:Example"

From ComputerCraft Wiki
Jump to: navigation, search
m (Protected "Template:Example": This template is a live template; please edit using a sandbox! ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
<table style="border-spacing: 0px;">
+
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
<tr>
+
 
<td style="padding-right: .5em; border-right: solid #DDD 1px; border-bottom: solid #DDD 1px;">'''Description'''</td>
+
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #DBE5FF; line-height:28px;">[[File:Grid_paper.png|24px]]&nbsp;&nbsp;Example</td></tr>
<td style="padding-left: .5em; border-bottom: solid #DDD 1px;">{{{desc}}}</td>
+
 
</tr>
+
<tr style="background-color: #FFFFFF;"><td colspan="2" style="padding: .4em; padding-bottom: .8em;">{{{desc|No description provided.}}}</td></tr>
<tr>
+
 
<td style="padding-right: .5em; border-right: solid #DDD 1px;">'''Code'''</td>
+
<tr style="background-color: #E8E8E8;">
<td style="padding-left: .5em;">
+
<td style="border-top: solid #C9C9C9 1px; border-right: solid #C9C9C9 1px; padding: .4em; padding-right: .5em; width:120px;">'''Code'''</td>
 +
<td style="border-top: solid #C9C9C9 1px; padding: .4em; padding-left: .5em;">
 
  {{{code}}}
 
  {{{code}}}
 
</td>
 
</td>
 +
 
</tr>
 
</tr>
{{#if: {{output|}}} | <tr>
+
{{#if: {{{output|}}} | <tr>
<td style="padding-right: .5em; border-right: solid #DDD 1px;">'''Output'''</td>
+
<td style="border-right: solid #C9C9C9 1px; padding: .4em; padding-right: .5em; width:120px;">'''Output'''</td>
<td style="padding-left: .5em;">{{{output}}}</td>
+
<td style="padding: .4em; padding-left: .5em;">{{{output}}}</td>
 
</tr>}}
 
</tr>}}
 +
 
</table>
 
</table>
 +
 +
 
</includeonly>
 
</includeonly>
 
<noinclude>
 
<noinclude>

Latest revision as of 11:28, 3 December 2012


Wiki code

{{Example
 |desc=Prints a message
 |code=print("Hello world!")
 |output=Hello world!
 }}

Result

Grid paper.png  Example
Prints a message
Code
print("Hello world!")
Output Hello world!