Difference between revisions of "Template:Documentation/core"
From stoney cloud
m (12 revisions from gentoo-wiki:Template:Documentation/core: import from wiki.gentoo.org) |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <!-- | + | <includeonly><!-- |
Start of green doc box | Start of green doc box | ||
− | --><div id="template-documentation" class=" | + | --><div id="template-documentation" class="gw-box" style="border: 1px solid silver; background-color: #f3f3f3;"><!-- |
Add the heading at the top of the doc box: | Add the heading at the top of the doc box: | ||
-->{{#ifeq: {{{heading|¬}}} | <!--Defined but empty--> | -->{{#ifeq: {{{heading|¬}}} | <!--Defined but empty--> | ||
| <!--"heading=", do nothing--> | | <!--"heading=", do nothing--> | ||
− | | <div style="padding-bottom: 3px | + | | <div style="padding-bottom: 3px; margin-bottom: 1ex;">{{ |
#if: {{{content|}}} | #if: {{{content|}}} | ||
| | | | ||
Line 11: | Line 11: | ||
<span class="editsection plainlinks" id="doc_editlinks">{{ | <span class="editsection plainlinks" id="doc_editlinks">{{ | ||
#if: {{{doc exist|yes}}} | #if: {{{doc exist|yes}}} | ||
− | | [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] | + | | [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] |
| <!--/doc doesn't exist--> | | <!--/doc doesn't exist--> | ||
[[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}| action=edit&preload={{ | [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}| action=edit&preload={{ | ||
Line 17: | Line 17: | ||
| Template:Documentation/preload-filespace | | Template:Documentation/preload-filespace | ||
| Template:Documentation/preload | | Template:Documentation/preload | ||
− | }} }} create]] | + | }} }} create]] |
}}</span> | }}</span> | ||
− | }} <span | + | }} <span class="gw-box-title" style="background-color: silver; color: black;">{{#switch: {{{heading|¬}}} |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
| ¬ = | | ¬ = | ||
<!--"heading" not defined in this or previous level--> | <!--"heading" not defined in this or previous level--> | ||
{{#switch: {{SUBJECTSPACE}} | {{#switch: {{SUBJECTSPACE}} | ||
− | | {{ns:Template}} = | + | | {{ns:Template}} = Documentation |
| {{ns:File}} = Summary | | {{ns:File}} = Summary | ||
| #default = Documentation | | #default = Documentation | ||
Line 43: | Line 37: | ||
"=== Headings ===" at the start and end of docs are interpreted. | "=== Headings ===" at the start and end of docs are interpreted. | ||
--> | --> | ||
− | {{#if: {{{content|}}} | + | <div class="gw-box-content gw-box-show-pre" style="margin: .3em;">{{#if: {{{content|}}} |
| {{{content|}}} | | {{{content|}}} | ||
− | | {{#if: {{{doc exist| | + | | {{#if: {{{doc exist|}}} |
| {{ {{{docpage|{{FULLPAGENAME}}/doc}}} }} | | {{ {{{docpage|{{FULLPAGENAME}}/doc}}} }} | ||
}} | }} | ||
− | }} | + | }}</div> |
<div style="clear: both;"></div><!--So right or left floating items don't stick out of the doc box.--> | <div style="clear: both;"></div><!--So right or left floating items don't stick out of the doc box.--> | ||
</div><!--End of green doc box--><!-- | </div><!--End of green doc box--><!-- | ||
Line 63: | Line 57: | ||
}} | }} | ||
− | | | + | | {{Note|{{#if: {{{link box|}}} |
− | {{#if: {{{link box|}}} | + | |
| {{{link box}}} <!--Use custom link box content--> | | {{{link box}}} <!--Use custom link box content--> | ||
| {{#if: {{{doc exist|yes}}} | | {{#if: {{{doc exist|yes}}} | ||
| <!--/doc exists, link to it--> | | <!--/doc exists, link to it--> | ||
− | The above | + | The above documentation is transcluded from [[{{{docpage|{{FULLPAGENAME}}/doc}}}]]. <small style="font-style: normal">([{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit] | [{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history])</small> <br /> |
}}<!-- | }}<!-- | ||
Add links to /sandbox and /testcases when appropriate: | Add links to /sandbox and /testcases when appropriate: | ||
Line 82: | Line 75: | ||
| [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small> | | [[{{{testcases| {{FULLPAGENAME}}/testcases }}}|testcases]] <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit }} edit])</small> | ||
| testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-testcases }} create])</small> | | testcases <small style="font-style: normal">([{{fullurl: {{{testcases| {{FULLPAGENAME}}/testcases }}} | action=edit&preload=Template:Documentation/preload-testcases }} create])</small> | ||
− | }} pages. <br> | + | }} pages. <br /> |
}}<!-- | }}<!-- | ||
Show the cats and interwiki text, but not | Show the cats and interwiki text, but not | ||
Line 97: | Line 90: | ||
| #default =  [[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this page]]. | | #default =  [[Special:PrefixIndex/{{{template page|{{FULLPAGENAME}}}}}/|Subpages of this page]]. | ||
}} | }} | ||
− | |||
− | |||
}} | }} | ||
}} | }} | ||
− | + | }}<!--End link box--><!-- | |
Detect and report strange usage: | Detect and report strange usage: | ||
Line 115: | Line 106: | ||
to make the surrounding if-case trigger--> | to make the surrounding if-case trigger--> | ||
− | | | + | | [[Category:Pages with strange ((documentation)) usage|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace --> |
− | + | ||
− | + | ||
− | < | + | }}</includeonly><noinclude> |
+ | [[Category:Template cores]] | ||
</noinclude> | </noinclude> |