Difference between revisions of "Template:Documentation"

From Minetest Wiki
Jump to navigation Jump to search
m (Changed borders from solid to dashed)
m (Moved category into doc content)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div>
+
<includeonly>{{#invoke:Documentation|main
<div style="clear: both; margin: 1em 0 0 0; border: 1px dashed #aaa; background-color: #ecfcf4; padding: 12px">
+
|default-heading=Documentation
<div style="padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; {{#ifeq: {{{heading}}} | | display: none; }}"><!-- Don't display the start box if the heading arg is defined but blank. -->
+
|view-link-display=view
<span style="font-weight: bold; font-size: 125%">{{
+
|edit-link-display=edit
#if: {{{heading|}}}
+
|history-link-display=history
| {{{heading}}}
+
|purge-link-display=purge
| [[File:Documentation icon.png|50px|link=]] Documentation
+
|create-link-display=create
}}</span>
+
|transcluded-from-blurb=The above [[wikipedia:Wikipedia:Template documentation|documentation]] is [[wikipedia:Transclusion|transcluded]] from %s.
<span class="plainlinks" style="font-size: small; font-weight: 400; margin-left: 1em; vertical-align: baseline; line-height: 1em; display: inline-block;">
+
}}</includeonly><noinclude>
<!-- Escape square brackets with HTML entities. &#91; for left bracket and &#93; for right bracket. -->
+
{{Documentation|content=
{{
+
{{Languages}}
#ifexist: {{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}
+
{{Lua|Documentation}}
| &#91;[[:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|view]]&#93; &#91;[{{fullurl:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|action=edit}} edit]&#93; &#91;[{{fullurl:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|action=history}} history]&#93; &#91;[{{fullurl:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|action=purge}} purge]&#93;
+
 
| &#91;[{{fullurl:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|action=edit}} create]&#93;
+
==Usage==
 +
===Customizing display===
 +
Overrides exist to customize the output in special cases:
 +
* <nowiki>{{Documentation|heading=}}</nowiki>: change the text of the "Documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.
 +
* <nowiki>{{Documentation|content=}}</nowiki>: set the content of the documentation box.
 +
 
 +
== Disclaimer ==
 +
Template:Documentation is based on [[mw:Template:Documentation]], which is available under the [//creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike License].
 +
 
 +
[[Category:Templates]]
 
}}
 
}}
</span>
+
</noinclude>
</div>
 
{{
 
#ifexist: {{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}
 
| {{:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}}}
 
}}
 
{{-}}<!-- So right or left floating items don't stick out of the doc box. -->
 
</div>
 
<div class="plainlinks" style="clear: both; width: 100%; border: 1px dashed #aaa; margin: .2em 0; background-color: #ecfcf4; {{#ifeq: {{{link box}}} | off | display: none; }}">
 
<div style="border: none; width: 100%; padding: .25em .9em; font-style: italic">{{
 
#if: {{{link box|}}}
 
| {{{link box}}}
 
| The above [[wikipedia:Wikipedia:Template documentation|documentation]] is [[wikipedia:Transclusion|transcluded]] from [[:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}]]. <small style="font-style: normal;">([{{fullurl:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|action=edit}} edit] &#124; [{{fullurl:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|action=history}} history])</small><br/>
 
Please add categories to the [[:{{{1|{{{page|{{FULLPAGENAME}}}}}/doc}}}|/doc]] subpage. [[Special:PrefixIndex/{{{page|{{FULLPAGENAME}}}}}/|Subpages of this page]].
 
}}</div>
 
</div>
 
</div>
 

Latest revision as of 04:48, 12 May 2017

Documentation icon.png Documentation
Languages Language: English • Bahasa Melayu
Lua logo.png This template uses Module:Documentation, a script written in Lua.
Please see wikipedia:Wikipedia:Lua and mw:Extension:Scribunto to learn more.

Usage

Customizing display

Overrides exist to customize the output in special cases:

  • {{Documentation|heading=}}: change the text of the "Documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.
  • {{Documentation|content=}}: set the content of the documentation box.

Disclaimer

Template:Documentation is based on mw:Template:Documentation, which is available under the Creative Commons Attribution-ShareAlike License.