Difference between revisions of "Template:Code"
From James Dooley's Wiki
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | <div style="font-family: monospace,sans-serif; background-color:#F9F9F9; border: 1px solid #2F6FAB; overflow: auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word; {{{ | + | <div style="font-family: monospace,sans-serif; background-color:#F9F9F9; border: 1px solid #2F6FAB; overflow: auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;"> |
| − | {{{code|}}} | + | {{{1|}}} |
| − | </ | + | </div>{{#if: {{{2|}}}| |
| + | ---- | ||
| + | '''Example''' | ||
| + | <div style="font-family: monospace,sans-serif; background-color:#F9F9F9; border: 1px solid #2F6FAB; overflow: auto; padding: 1em; white-space: pre-wrap; word-wrap: break-word;"> | ||
| + | {{{2|}}} | ||
| + | </div>}}<noinclude> | ||
| + | ==Overview== | ||
| + | This is a simple wrapper template for use with <nowiki><syntaxhighlight></syntaxhighlight></nowiki> since it does not provide any styles. | ||
| + | The same styles that are used on the <nowiki><pre></pre></nowiki> will be applied to a <nowiki><div></div></nowiki> tag | ||
| + | |||
| + | ==Usage== | ||
| + | <pre> | ||
| + | {{code | ||
| + | |style= Allows for style overrides | ||
| + | |code= Code to put inside the div tag | ||
| + | }} | ||
| + | </pre> | ||
| + | |||
| + | ==example== | ||
| + | {{code | ||
| + | |style="border-size: 5px;" | ||
| + | |code=<syntaxhighlight lang=bash> | ||
| + | rm -rf / | ||
| + | </syntaxhighlight> | ||
| + | }} | ||
| + | |||
| + | </noinclude> | ||
Latest revision as of 18:33, 27 February 2013
Overview
This is a simple wrapper template for use with <syntaxhighlight></syntaxhighlight> since it does not provide any styles. The same styles that are used on the <pre></pre> will be applied to a <div></div> tag
Usage
{{code
|style= Allows for style overrides
|code= Code to put inside the div tag
}}
example