Template:Task heading: Difference between revisions
Content added Content deleted
m (Smls moved page Template:Introheader to Template:Task heading: make its intended purpose more clear (and "heading" is the correct word, not "header".)) |
(default heading to "Task", and update description to reflect this and the name change) |
||
Line 1: | Line 1: | ||
<includeonly><div id="{{#replace:{{{1|}}}| |_}}" style="margin:20px 0 10px 0; line-height:1.1; font-size:18px;">{{{1}}}<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>[{{fullurl:{{FULLPAGENAME}}|action=edit&section=0&summary=%2F*%20{{#replace:{{{1|}}}| |_}}%20*%2F%20}} edit]<span class="mw-editsection-bracket">]</span></span></div></includeonly><noinclude> |
<includeonly><div id="{{#replace:{{{1|Task}}}| |_}}" style="margin:20px 0 10px 0; line-height:1.1; font-size:18px;">{{{1|Task}}}<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>[{{fullurl:{{FULLPAGENAME}}|action=edit&section=0&summary=%2F*%20{{#replace:{{{1|Task}}}| |_}}%20*%2F%20}} edit]<span class="mw-editsection-bracket">]</span></span></div></includeonly><noinclude> |
||
This template can be used to show a section heading inside the introduction of a task page (i.e. the part above the table of contents), in order to break up long task descriptions into multiple sections.<br> |
|||
Even if the task description is short, adding a single <code><nowiki>{{introheader|Task}}</nowiki></code> above it can be valuable for the edit link. |
|||
This template can be used to show a heading with an edit link above the task description on a [[:Category:Programming Tasks|task page]]. |
|||
⚫ | |||
Multiple headings can also be used to break longer task descriptions up into logical subsections (see examples below). |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
;Usage: |
;Usage: |
||
: The first argument is the heading title to show. |
|||
The first and only argument is the title of the heading to show. If it is not specified, it defaults to the word "Task". |
|||
;Example: |
|||
{| class=wikitable |
|||
|- |
|||
! Usage example |
|||
! Renders as |
|||
|- |
|||
| style="vertical-align:top; padding:1em" | |
|||
<pre style="border:none; margin:0; padding:0"> |
|||
{{task heading}} |
|||
⚫ | |||
{{introheader|The task}} |
|||
... |
... |
||
{{ |
{{task heading|Test cases}} |
||
... |
... |
||
⚫ | |||
⚫ | |||
</pre> |
|||
⚫ | |||
Which renders as: |
|||
⚫ | |||
: {{introheader|The task}} |
|||
⚫ | |||
⚫ | |||
| style="vertical-align:top; padding:0 1em" | |
|||
⚫ | |||
{{task heading}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
|} |
|||
{{template}}</noinclude> |
{{template}}</noinclude> |