Template:Canadian party colour/doc: Difference between revisions
Appearance
Content deleted Content added
Arctic.gnome (talk | contribs) →Replacement of old templates: found another |
Arctic.gnome (talk | contribs) →Replacement of old templates: update |
||
Line 43: | Line 43: | ||
==Replacement of old templates== |
==Replacement of old templates== |
||
This template is intended to supersede, and simplify, the existing methods of generating party colours, which use a series of at least 762 different templates (down to |
This template is intended to supersede, and simplify, the existing methods of generating party colours, which use a series of at least 762 different templates (down to 469 as of 2 December 2012): |
||
#[[Template:Canadian politics/party colours]], including |
#[[Template:Canadian politics/party colours]], including |
||
##448 [[:Category:Canada political party colour templates|federal subtemplates]] (now down to |
##448 [[:Category:Canada political party colour templates|federal subtemplates]] (now down to 277) |
||
##34 [[:Category:Alberta political party colour templates|Alberta subtemplates]] (now still at 34) |
##34 [[:Category:Alberta political party colour templates|Alberta subtemplates]] (now still at 34) |
||
##38 [[:Category:Edmonton political party colour templates|Edmonton subtemplates]] (now still at 38), and |
##38 [[:Category:Edmonton political party colour templates|Edmonton subtemplates]] (now still at 38), and |
||
Line 51: | Line 51: | ||
#political party election (or "row-name") templates, including |
#political party election (or "row-name") templates, including |
||
##<s>111 [[:Category:Canada political party election templates|federal subtemplates]]</s> (now all replaced) and |
##<s>111 [[:Category:Canada political party election templates|federal subtemplates]]</s> (now all replaced) and |
||
##23 [[:Category:Ontario political party election templates|Ontario subtemplates]] (now down to |
##23 [[:Category:Ontario political party election templates|Ontario subtemplates]] (now down to 10); |
||
#102 [[:Category:Canada political party shortname templates|<code>/meta/shortname</code> subtemplates]] (plus the <code>/meta/color</code> templates, included above) (now still at 102). |
#102 [[:Category:Canada political party shortname templates|<code>/meta/shortname</code> subtemplates]] (plus the <code>/meta/color</code> templates, included above) (now still at 102). |
||
<includeonly> |
<includeonly> |
Revision as of 19:09, 2 December 2012
This template can be used to standardize the colours used to represent Canadian political parties in tables, lists, and templates. Enter the jurisdiction and party name, and this template will produce the hex colour code for that party. In tables, this template can start a new row with one cell containing the colour and the next cell containing a wikilink to the article about that party.
A full list of available party names is at Template:Canadian party colour/list of parties/doc.
Usage
- {{Canadian party colour|Jurisdiction|Party}} to get just the hex code (for use inside other templates)
- {{Canadian party colour|Jurisdiction|Party|background}} to get bgcolor="colour"
- {{Canadian party colour|Jurisdiction|Party|name}} to get a wikilink to the party's article
- {{Canadian party colour|Jurisdiction|Party|nohash}} to get the colour without the leading #
- {{Canadian party colour|Jurisdiction|Party|row}} to start a new row with party colour as the first cell
- {{Canadian party colour|Jurisdiction|Party|row-name}} to start a new row with the party colour as the first cell and a wikilink to the party's article as the second cell
Example
{|class="wikitable" {{Canadian party colour|CA|NDP|row-name}} {{Canadian party colour|BC|Liberal|row-name}} {{Canadian party colour|QC|PQ|row-name}} {{Canadian party colour|CA|PC|row}} |Example text. Example text. Example text. Example text. {{Canadian party colour|NL|Independent|row-name}} |- |{{Canadian party colour|CA|Other|background}} rowspan=2| |{{Canadian party colour|XX|Liberal|background}}|This cell uses "XX" for jurisdiction. Invalid jurisdictions (or jurisdictions where that party does not exist) will sometimes find a default colour. |- |{{Canadian party colour|ON|Invalid text|background}}|This cell uses "Invalid text" as the party name. Invalid party names will default to the independent colour and will use the exact text entered when using the "row-name" function. |}
Will produce:
New Democratic | |
Liberal | |
Parti Québécois | |
Example text. Example text. Example text. Example text. | |
Independent | |
This cell uses "XX" for jurisdiction. Invalid jurisdictions (or jurisdictions where that party does not exist) will sometimes find a default colour. | |
This cell uses "Invalid text" as the party name. Invalid party names will default to the independent colour and will use the exact text entered when using the "row-name" function. |
Replacement of old templates
This template is intended to supersede, and simplify, the existing methods of generating party colours, which use a series of at least 762 different templates (down to 469 as of 2 December 2012):
- Template:Canadian politics/party colours, including
- 448 federal subtemplates (now down to 277)
- 34 Alberta subtemplates (now still at 34)
- 38 Edmonton subtemplates (now still at 38), and
- 8 Quebec subtemplates (now still at 8);
- political party election (or "row-name") templates, including
111 federal subtemplates(now all replaced) and- 23 Ontario subtemplates (now down to 10);
- 102
/meta/shortname
subtemplates (plus the/meta/color
templates, included above) (now still at 102).