(Remove aria complementary role because it's incorrect in this context; see: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/complementary_role) |
(Removing testcases.) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<!-- |
|||
<includeonly>{| class="article-table plainlinks" style="width:100%;" |
|||
- Documentation template |
|||
|- style="font-size:18px;" |
|||
- A template used to show the contents of a documentation subpage |
|||
! style="padding:0px;" | <div style="width:100%; padding:3px 0px; text-align:center;" class="color1">Template documentation</div> |
|||
- Note: Comments (<!-- --.>) are often used to avoid unnecessary line breaks or spaces. |
|||
|- |
|||
--> |
|||
| ''Note: portions of the template sample may not be visible without values provided.'' |
|||
<!-- |
|||
- Pre-defined variables |
|||
| View or edit [[{{{1|Template:{{PAGENAMEE}}/doc}}}|this documentation]]. ([[Template:Documentation|About template documentation]]) |
|||
--><!-- |
|||
|- |
|||
-->{{#vardefine: base page | |
|||
| Editors can experiment in this template's [{{fullurl:{{FULLPAGENAMEE}}/sandbox|action=edit}} sandbox] and [{{fullurl:{{FULLPAGENAMEE}}/testcases}} test case] pages. |
|||
{{{page| |
|||
|} |
|||
{{#ifeq: {{SUBPAGENAME}} | sandbox |
|||
<div style="margin:0 1em;"> |
|||
| {{NAMESPACE}}:{{BASEPAGENAME}} |
|||
{{{{{1|{{PAGENAME}}/doc}}}}}</div></includeonly><noinclude>{{Documentation}}[[Category:Documentation templates]]</noinclude> |
|||
| {{FULLPAGENAME}} |
|||
}} |
|||
}}} |
|||
}}<!-- |
|||
-->{{#vardefine: current page | {{FULLPAGENAME}}}}<!-- |
|||
-->{{#vardefine: doc page | |
|||
{{#if: {{{page|}}} |
|||
| {{{page}}}/doc |
|||
| {{#if: {{{1|}}} |
|||
| {{{1}}} |
|||
| {{#var: base page}}/doc |
|||
}} |
|||
}} |
|||
}}<!-- |
|||
-->{{#vardefine: namespace | |
|||
{{{demospace|{{#ifeq: {{NAMESPACE}} | {{TALKSPACE}} |
|||
| {{SUBJECTSPACE}} |
|||
| {{NAMESPACE}} |
|||
}}}}} |
|||
}}<!-- |
|||
-->{{#vardefine: preload | |
|||
{{{preload|Template:Documentation/preload}}}&summary={{urlencode:Create /doc subpage for [[{{#var: base page}}]]}}&editintro=Template:Documentation/editintro-doc |
|||
}}<!-- |
|||
-->{{#vardefine: preload-sandbox | |
|||
{{{preload-sandbox|Template:Documentation/preload-sandbox}}}&summary={{urlencode:Create sandbox subpage for experimenting on template [[{{#var: base page}}]]}} |
|||
}}<!-- |
|||
-->{{#vardefine: sandbox | |
|||
{{#if: {{{page|}}} |
|||
| {{{page}}}/sandbox |
|||
| {{{sandbox|{{#var: base page}}/sandbox}}} |
|||
}} |
|||
}}<!-- |
|||
-->{{#vardefine: page text | |
|||
{{#switch: {{#var: namespace}} |
|||
| {{ns:Template}} = template |
|||
| {{ns:Module}} = module |
|||
| #default = page |
|||
}} |
|||
}}<!-- |
|||
-->{{#vardefine: doc image | |
|||
{{#ifeq: {{{heading|a}}} | <!-- null --> |
|||
| <!-- heading is specified but empty, don't show image --> |
|||
| [[File:{{#if: {{{content|}}} |
|||
| Documentation_icon |
|||
| {{#ifexist: {{#var: doc page}} |
|||
| Documentation_icon |
|||
| No Documentation_icon |
|||
}} |
|||
}}.svg|70px|link=|alt=|class=nomobile]] |
|||
}} |
|||
}}<!-- |
|||
- |
|||
- Sandbox header |
|||
- |
|||
-->{{#ifeq: {{SUBPAGENAMEE}} | sandbox |
|||
| <div class="article-table documentation" |
|||
style="padding:1.5em; margin:auto; border:1px solid #5556; border-bottom:1px solid #5556; width:75%"><!-- |
|||
-->This is a template sandbox subpage for [[{{#var: base page}}]]. <!-- |
|||
--></div> |
|||
}}<!-- |
|||
--><div class="template-documentation" style="clear:both; border:1px solid #5556; margin:1em"><!-- |
|||
- |
|||
- Documentation Header |
|||
- |
|||
--><div class="article-table documentation" style="padding:1em; margin:0; border-bottom:1px solid #5556"><!-- |
|||
--><span style="font-size:1.5em">{{#var: doc image }}'''{{{heading|{{ucfirst: {{#var: page text}} }} Documentation}}}'''</span><!-- |
|||
- |
|||
- Documentation page tools |
|||
- |
|||
--><span style="float: right">[{{#if: {{{content|}}} |
|||
| <!---->[[Special:EditPage/{{#var: current page}}|edit]] | [[Special:Purge/{{#var: current page}}|purge]] |
|||
| {{#ifexist: {{#var: doc page}} |
|||
| <!-- |
|||
-->[[{{#var: doc page}}|view]] | [[Special:EditPage/{{#var: doc page}}|edit]] | [[Special:PageHistory/{{#var: doc page}}|history]] | [[Special:Purge/{{#var: current page}}|purge]] |
|||
| <!-- |
|||
-->[{{fullurl:{{FULLPAGENAMEE:{{#var: doc page}}}}|action=edit&preload={{#var: preload}} }} create] | [[Special:Purge/{{#var: current page}}|purge]] |
|||
}} |
|||
}}]</span><!-- |
|||
--></div><!-- |
|||
- |
|||
- Documentation blurb |
|||
- |
|||
--><div style="padding:1em; padding-bottom:0; margin:0"> |
|||
{{#ifeq: {{{content|a}}} | {{{content}}} | <!-- do nothing --> |
|||
| {{#ifexist: {{#var: doc page}} |
|||
| {{<!---->{{#var:doc page}}}} |
|||
| The [[w:Help:Template documentation|documentation]] for this {{#var: page text}} does not exist. Create it at [{{fullurl:{{FULLPAGENAMEE:{{#var: doc page}}}}|action=edit&preload={{#var: preload}} }} {{#var: doc page}}]. |
|||
}} |
|||
}}<!-- |
|||
- |
|||
-->{{{content|}}} |
|||
</div><!-- |
|||
- |
|||
- End blurb |
|||
- |
|||
-->{{#if: {{{nofooter|}}} | | |
|||
<div class="article-table documentation" style="clear:both; padding:.5em; margin:0; border-top:1px solid #5556"><!-- |
|||
- |
|||
- The above [documentation] is … |
|||
- |
|||
-->{{#if: {{{content|}}} |
|||
| <!-- do not show --> |
|||
| {{#ifexist: {{#var: doc page}} |
|||
| {{#ifeq: {{SUBPAGENAME}} | sandbox |
|||
| This is the sandbox subpage of [[{{#var: base page}}]]; |
|||
| The above |
|||
}} [[w:Help:Template documentation|documentation]] is [[mw:Help:Transclusion|transcluded]] from [[{{#var: doc page}}]]. <small>([[Special:EditPage/{{#var: doc page}}|edit]] | [[Special:PageHistory/{{#var: doc page}}|history]])</small><br/> |
|||
| {{#ifeq: {{#var: namespace}} | {{ns:Module}} |
|||
| You might want to [{{fullurl:{{FULLPAGENAMEE:{{#var: doc page}}}}|action=edit&preload={{#var: preload}} }} create documentation] for this [[w:Help:Lua|Scribuntu module]]. <br/> |
|||
| [{{fullurl:{{FULLPAGENAMEE:{{#var: doc page}}}}|action=edit&preload={{#var: preload}} }} Create documentation] for this template. <br/> |
|||
}} |
|||
}} |
|||
}}<!-- |
|||
- |
|||
- Sandboxes. |
|||
- |
|||
- NOTE: THIS WILL CREATE MANY (yes, MANY) REDLINKS (IF YOU DIDN'T MAKE THE /sandbox PAGE). IF YOU DONT WANT THE LINKS, PLEASE REPLACE THE CODE BELOW WITH: |
|||
< |
|||
Editors can experiment in the page's [{{fullurl: {{#var: sandbox}}}} sandbox] page. |
|||
> |
|||
- |
|||
--><!-- |
|||
--><!-- CHANGE START --><!-- |
|||
-->Editors can experiment in this {{#var: page text}}'s <!-- |
|||
- |
|||
-->{{#ifexist: {{#var: sandbox}} |
|||
| [[{{#var: sandbox}}|sandbox]] <!-- |
|||
--><small>(<!-- |
|||
-->[[Special:EditPage/{{#var: sandbox}}|edit]] | <!-- |
|||
-->[{{fullurl: Special:ComparePages |
|||
| page1={{FULLPAGENAMEE:{{#var: base page}}}}&page2={{FULLPAGENAMEE:{{#var: current page}}}} |
|||
}} diff]<!-- |
|||
-->)</small> |
|||
| sandbox <small>(<!-- |
|||
-->[{{fullurl: {{FULLPAGENAMEE:{{#var: sandbox}}}} |
|||
| action=edit&preload={{#var: preload-sandbox}} |
|||
}} create] | [{{fullurl: {{FULLPAGENAMEE:{{#var: sandbox}}}} |
|||
| action=edit&preload={{FULLPAGENAMEE:{{#var: base page}}}} |
|||
}} mirror]<!-- |
|||
-->)</small> |
|||
}}<!-- |
|||
--> page.<br/><!-- |
|||
--><!-- CHANGE END --><!-- |
|||
- |
|||
- Category addition text & subpages text. |
|||
- |
|||
-->{{#if: {{{content|{{{1|}}}}}} |
|||
| <!-- Do NOT show cat text *if* documentation is inline or transcluded from a different page. --> |
|||
| {{#ifexist: {{#var: doc page}} |
|||
| Add [[w:Help:categories|categories]] and [[w:Help:interwiki links|interwikis]] to the [[{{#var: doc page}}|/doc]] subpage. |
|||
}} |
|||
}}<!-- |
|||
- |
|||
-->[[Special:PrefixIndex/{{#var: current page}}|Subpages of this {{#var: page text}}]]. |
|||
</div> |
|||
}} |
|||
</div> |
Latest revision as of 06:20, 2 October 2024
{{#vardefine: base page |
Template:Documentation
}}{{#vardefine: current page | Template:Documentation}}{{#vardefine: doc page |
{{#var: base page}}/doc
}}{{#vardefine: namespace |
Template
}}{{#vardefine: preload |
Template:Documentation/preload&summary=Create+%2Fdoc+subpage+for+%5B%5B%7B%7B%23var%3A+base+page%7D%7D%5D%5D&editintro=Template:Documentation/editintro-doc
}}{{#vardefine: preload-sandbox |
Template:Documentation/preload-sandbox&summary=Create+sandbox+subpage+for+experimenting+on+template+%5B%5B%7B%7B%23var%3A+base+page%7D%7D%5D%5D
}}{{#vardefine: sandbox |
{{#var: base page}}/sandbox
}}{{#vardefine: page text |
page
}}{{#vardefine: doc image |
}}
{{#var: doc image }}{{#var: page text}} Documentation[[[[:Template:Fullurl:]] create] | [[Special:Purge/{{#var: current page}}|purge]]]
The documentation for this {{#var: page text}} does not exist. Create it at [[[:Template:Fullurl:]] {{#var: doc page}}].
[[[:Template:Fullurl:]] Create documentation] for this template.
Editors can experiment in this {{#var: page text}}'s sandbox ([[[:Template:Fullurl:]] create] | [[[:Template:Fullurl:]] mirror]) page.
[[Special:PrefixIndex/{{#var: current page}}|Subpages of this {{#var: page text}}]].
Editors can experiment in this {{#var: page text}}'s sandbox ([[[:Template:Fullurl:]] create] | [[[:Template:Fullurl:]] mirror]) page.
[[Special:PrefixIndex/{{#var: current page}}|Subpages of this {{#var: page text}}]].