Template:Political party list
| style="background-color: #F8F9FA; width: 3px;" | | class="org" style="width: 130px" | [[{{{1}}}|{{{1}}}]]
![]() | This template uses Lua: |
This template is designed to make it easier to read tables where the name of a political party appears as one of the columns.
Rather than a table where party names appear on a background colour, which can provide poor accessibility, this template creates two columns, one with a coloured bar and one with the party name, both populated from the political party module).
This means that a table can be generated looking like this:
Information | Party | Notes | |
---|---|---|---|
Some information | UMP | Some notes would go here, these will often be rather longer than the contents of the other columns | |
More information | Republican | Some more notes. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero sapien. | |
And yet more | Green | Praesent at magna eget nulla dignissim gravida vitae quis ante. Phasellus turpis velit, accumsan sed facilisis in. |
Usage
This template creates two columns (one with the colour, one with the name), so the table header should be colspan
ned appropriately. The table above was generated as follows:
<syntaxhighlight lang="wikitext">{| class="wikitable" ! Information ! colspan="2" | Party ! Notes |- ! Some information | style="background-color: #0051AE; width: 3px;" | | class="org" style="width: 130px" | UMP | Some notes would go here, these will often be rather longer than the contents of the other columns |- ! More information | style="background-color: #F8F9FA; width: 3px;" | | class="org" style="width: 130px" | Republican Party | Some more notes. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero sapien. |- ! And yet more | style="background-color: #02A95B; width: 3px;" | | class="org" style="width: 130px" | Green | Praesent at magna eget nulla dignissim gravida vitae quis ante. Phasellus turpis velit, accumsan sed facilisis in. |}</syntaxhighlight>
See also
- Wikipedia:WikiProject Politics/Political parties