Шаблон:Template doc: различия между версиями

Материал из Dota 2 Вики
Перейти к: навигация, поиск
м
м
Строка 1: Строка 1:
  +
<includeonly>{{#vardefine:doc page|{{FULLPAGENAME}}/doc}}<!--
<div id="documentation" style="clear: both; margin: 1em 0 0 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 1em;">
+
--><div style="clear: both; margin-top: 1em; border: 1px solid #aaa; background-color: #ecfcf4">
<div style="float: right;" class="plainlinks">&#91;[[{{{1|{{FULLPAGENAME}}/doc}}}|смотреть]]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{FULLPAGENAMEE}}/doc}}}|action=edit}} править]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{FULLPAGENAMEE}}}}}|action=purge}} очистить]&#93;
 
  +
<div class="doc-infobar doc-header" style="padding: .5em; border-bottom: inherit; line-height: 1;">
 
<span class="doc-title" style="font-size: 130%; font-weight: bold;">Документация для {{{1|{{FULLPAGENAME}}}}}</span>
 
<span class="doc-links plainlinks" style="float: right;">[ [[{{{1|{{#var:doc page}}}}}|смотреть]] | [{{fullurl:{{{1|{{#var:doc page}}}}}|action=edit}} править] | [{{fullurl:{{{1|{{FULLPAGENAMEE}}}}}|action=purge}} очистить] ]</span>
 
</div>
 
</div>
  +
<div class="doc-content" style="padding: 1em;">{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop|{{protected|small=1}}|}}
<h1 style="margin-top:-0.25em; margin-bottom: 0.25em;">Документация для ''{{{1|{{PAGENAME}}}}}''</h1><includeonly>
 
{{ #ifexist: {{{content|{{NAMESPACE}}:{{PAGENAME}}/doc}}} | {{{{{content|{{NAMESPACE}}:{{PAGENAME}}/doc}}}}} | }}
+
{{#ifexist:{{#var:doc page}}|{{ {{#var:doc page}} }}|''Этот(та) {{lc:{{NAMESPACE}}}} не имеет документации.''}}
  +
</div>
</div></includeonly><includeonly>
 
  +
<div class="doc-infobar doc-footer" style="padding: .5em; border-top: inherit; line-height: 1;">
{{ #ifexist: {{{1|{{NAMESPACE}}:{{PAGENAME}}/doc}}} | <!-- /doc exists -->
 
  +
<span style="font-style: italic;">Эта документация взята из [[{{{1|{{#var:doc page}}}}}]].</span>
<div style="clear: both; margin:0.25em 0 0 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 1em;">
 
  +
<span class="doc-links plainlinks" style="float: right;">[ [[{{{1|{{#var:doc page}}}}}|смотреть]] | [{{fullurl:{{{1|{{#var:doc page}}}}}|action=edit}} править] | [{{fullurl:{{{1|{{FULLPAGENAMEE}}}}}|action=purge}} очистить] ]</span>
::[[Image:Template_info.png|40px|link={{NAMESPACE}}:{{PAGENAME}}/doc]] ''This [[:Категория:Документационные шаблоны|documentation]] is transcluded from [[{{{1|{{NAMESPACE}}:{{PAGENAME}}/doc}}}]]''.
 
  +
</div>
</div> |<!-- no /doc --> }}<!--
 
-->{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop|{{protected|small=1}}|}}</includeonly>__NOEDITSECTION__<noinclude>
+
</div></includeonly><noinclude>{{Doc begin}}
  +
== Использование ==
== Usage ==
 
* Place {{tl|Template doc}} inside {{code|<noinclude>}} tags on a template page to display [[:Категория:Документационные шаблоны|template documentation]].
+
* Place {{tl|Template doc}} inside {{code|<nowiki><noinclude></nowiki>}} tags on a template page to display [[:Категория:Документационные шаблоны|template documentation]].
 
* Generally template documentation should only be used on complex templates with multiple parameters. The majority of templates won't need a separate documentation subpage.
 
* Generally template documentation should only be used on complex templates with multiple parameters. The majority of templates won't need a separate documentation subpage.
 
* If you want to have documentation displayed without a subpage, but with the green box, use {{tl|Doc begin}}.
 
* If you want to have documentation displayed without a subpage, but with the green box, use {{tl|Doc begin}}.

Версия 16:30, 10 апреля 2018

Документация для Шаблон:Template doc [ править | очистить ]

Использование

  • Place {{Template doc}} inside <noinclude> tags on a template page to display template documentation.
  • Generally template documentation should only be used on complex templates with multiple parameters. The majority of templates won't need a separate documentation subpage.
  • If you want to have documentation displayed without a subpage, but with the green box, use {{Doc begin}}.