Difference between revisions of "Template:DocExample"

From SpiralKnights

Jump to: navigation, search
m (Created page with '{| style="width: 100%; padding: 5px; background-color: #EEEEEE; border: 1px dashed skyblue;" |- ! <noinclude>Quick Description Goes Here</noinclude><includeonly>{{{1}}}</includeo…')
 
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| style="width: 100%; padding: 5px; background-color: #EEEEEE; border: 1px dashed skyblue;"
+
{| style="width: 100%; background-color: #EEEEEE; border: 1px dashed skyblue;"
 +
|- style="background-color: #DDDDDD;" |
 +
! style="padding: 4px;" | <noinclude>Quick Description Goes Here</noinclude><includeonly>{{{desc}}}</includeonly>
 +
! style="padding: 4px;" | Rendered by:
 
|-
 
|-
! <noinclude>Quick Description Goes Here</noinclude><includeonly>{{{1}}}</includeonly>
+
| style="padding: 6px; width: <noinclude>50%</noinclude><includeonly>{{{descWidth}}}</includeonly>;" | <noinclude>Rendition Goes Here</noinclude><includeonly>{{{render}}}</includeonly>
! Rendered by:
+
| style="padding: 6px;" | <noinclude>Code Goes Here<br />(You will need to wrap it in 'pre' tags yourself, as there is no workaround for halfway-rendering, at least to my knowledge.)</noinclude><includeonly><code>{{{code}}}</code></includeonly>
|-
+
| <noinclude>Rendition Goes Here</noinclude><includeonly>{{{2}}}</includeonly>
+
| <noinclude><pre>Code Goes Here</pre></noinclude><includeonly><pre>{{{2}}}</pre></includeonly>
+
 
|}
 
|}
 +
<noinclude>{{documentation}}</noinclude>

Latest revision as of 16:04, 10 April 2012

Quick Description Goes Here Rendered by:
Rendition Goes Here Code Goes Here
(You will need to wrap it in 'pre' tags yourself, as there is no workaround for halfway-rendering, at least to my knowledge.)
[edit] [purge] Template documentation

Usage

Useful for quickly adding examples to doc pages. The markup limitations make this much less useful, though.


Parameters

desc
Required. The text to go in the description column - should be short.
descWidth
Required. Width of the first column for the description.
render
Required. The code to be rendered, not surrounded by pre tags. We need a whole new variable because of wiki markup limitations.
code
Required. The code to be exemplified. Note that because of the aforementioned limitations, you must manually wrap the pre tags.


Examples

(None)


Copy & Paste

{{DocExample
| desc = 
| descWidth = 
| render = 
| code = 
}}
Personal tools