Template:Nb: Difference between revisions
Jump to navigation
Jump to search
(Created page with '<div class="noborder"> {{{1}}}</div><noinclude> <br/><br/> The template '''{{PAGENAME}}''' creates a <code><div class="border"></code> tag. Along with a style definition in…') |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
<pre> |
<pre> |
||
* An example of Bash script: |
* An example of Bash script: |
||
{{nb|<source lang= |
{{nb|1=<source lang=bash>echo Hello, World!</source>}} |
||
</pre> |
</pre> |
||
This gives: |
This gives: |
||
* An example of Bash script: |
* An example of Bash script: |
||
{{nb|<source lang= |
{{nb|1=<source lang=bash>echo Hello, World!</source>}} |
||
Alternatively, one can add parameter <code>enclose=none</code> to <code>source</code> tag: |
|||
<pre> |
|||
Using nb template: |
|||
{{nb|1=<source lang=bash>echo Hello, World!</source>}} |
|||
Using enclose=none: |
|||
<source lang=bash enclose=none>echo Hello, World!</source> |
|||
</pre> |
|||
gives |
|||
Using nb template: |
|||
{{nb|1=<source lang=bash>echo Hello, World!</source>}} |
|||
Using enclose=none: |
|||
<source lang=bash enclose=none>echo Hello, World!</source> |
|||
</noinclude> |
</noinclude> |
Latest revision as of 16:58, 15 January 2014
{{{1}}}
The template Nb creates a <div class="border">
tag. Along with a style definition in MediaWiki:Common.css, it is used to remove the border around <source>
tags. Example:
* An example of Bash script: {{nb|1=<source lang=bash>echo Hello, World!</source>}}
This gives:
- An example of Bash script:
echo Hello, World!
Alternatively, one can add parameter enclose=none
to source
tag:
Using nb template: {{nb|1=<source lang=bash>echo Hello, World!</source>}} Using enclose=none: <source lang=bash enclose=none>echo Hello, World!</source>
gives
Using nb template:
echo Hello, World!
Using enclose=none:
echo Hello, World!