Template:Task heading: Difference between revisions

Content added Content deleted
(Mention link anchors as another benefit)
(Make the headings bold, following discussion on the discussion page. Slightly decrease font size to compensate.)
 
Line 1: Line 1:
<includeonly><div id="{{#replace:{{{1|Task}}}| |_}}" style="margin:20px 0 10px 0; line-height:1.1; font-size:18px;">{{{1|Task}}}{{#ifeq:{{{1|Task}}}|Task|<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;section=0&amp;summary=%2F*%20{{#replace:{{{1|Task}}}| |_}}%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:16.5px; font-weight:bold">{{{1|Task}}}{{#ifeq:{{{1|Task}}}|Task|<span class="mw-editsection"><span class="mw-editsection-bracket">[</span>[{{fullurl:{{FULLPAGENAME}}|action=edit&amp;section=0&amp;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 heading (which won't affect the table of contents) above the task description on a [[:Category:Programming Tasks|task page]].
This template can be used to show a heading (which won't affect the table of contents) above the task description on a [[:Category:Programming Tasks|task page]].
Line 10: Line 10:
Using this template instead, has the following advantages:
Using this template instead, has the following advantages:


* The heading is styled exactly the same way as the heading of the TOC, which makes it look nice and tidy.
* It is styled more appropriately for a heading.
*: <small>''(i.e. larger font, and more spacing.)''</small>
*: <small>''(Whereas <code>;Task:</code> is simply rendered in bold, with the same font size and line spacing as normal text, and therefore doesn't stand out as much as a heading, especially when the task description already uses bold text for highlights.'')</small>

* It has an edit link.
* It has an edit link.
*: <small>''(Only for the main "Task" heading, because due to technical limitations, it can't give you a specific subsection of the task to edit - it gives you the whole task description, or more precisely, everything above the first real heading.)''</small>
*: <small>''(Only for the main "Task" heading, because due to technical limitations, it can't give you a specific subsection of the task to edit - it gives you the whole task description, or more precisely, everything above the first real heading.)''</small>

* It has a link anchor.
* It has a link anchor.
*: <small>''(E.g. to link to the "See also" section, you can write <tt><nowiki>[[#See_also]]</nowiki></tt>. Note that spaces have to be replaced by underscores.)''</small>
*: <small>''(E.g. to link to the "See also" section, you can write <tt><nowiki>[[#See_also]]</nowiki></tt>. Note that spaces have to be replaced by underscores.)''</small>