Template:File: Difference between revisions
imported>Ixxie No edit summary |
m Improve file name spacing |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{Template}}{{DISPLAYTITLE:Template:file}} | <noinclude>{{Template}}{{DISPLAYTITLE:Template:file}} | ||
== About == | |||
Used to display contents of a file. | |||
{{META Pipe Character}} | {{META Pipe Character}} | ||
== Usage == | == Usage == | ||
<nowiki>{{ | <nowiki>{{file|filename|language|contents}}</nowiki> | ||
See documentation about <code><syntaxhighlight></code> for supported languages. | See documentation about <code><syntaxhighlight></code> for supported languages. | ||
<nowiki>{{file|main.c|c| | |||
#include <stdio.h> | #include <stdio.h> | ||
Line 20: | Line 20: | ||
}}</nowiki> | }}</nowiki> | ||
== Example == | |||
{{ | {{file|main.c|c| | ||
#include <stdio.h> | #include <stdio.h> | ||
Line 29: | Line 29: | ||
} | } | ||
}} | }} | ||
</noinclude><includeonly><div | </noinclude><includeonly><div | ||
style=" | style=" | ||
width: | width: 1.2em; | ||
height: 0; | height: 0; | ||
position: relative; | position: relative; | ||
top: 0. | top: 0.8em; | ||
left: | left: 0.8em; | ||
" | " | ||
>{{{icon|[[Image:Breeze-text-x-plain.png]]}}}</div>{{#tag:pre|{{{filename|{{{1|{{META Error}}}}}}}} | >{{{icon|[[Image:Breeze-text-x-plain.png|link=]]}}}</div>{{#tag:pre|{{{filename|{{{1|{{META Error}}}}}}}} | ||
|style=margin-bottom: 0; border-bottom:none; padding-bottom:1. | |style=margin-bottom: 0; border-bottom:none; padding-bottom:1.75em; padding-left:2.7em; margin-top: 0; | ||
}}{{#tag:syntaxhighlight|{{{contents|{{{3|{{META Error}}}}}}}} | }}{{#tag:syntaxhighlight|{{{contents|{{{3|{{META Error}}}}}}}} | ||
|lang={{{lang|{{{2| }}}}}} | |lang={{{lang|{{{2| }}}}}} | ||
|style=margin-top: -1em;}} | |style=margin-top: -1em;}}</includeonly> | ||
</includeonly> |