Template:Flag: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[File:{{#switch: {{{1}}} | <includeonly>[[File:{{#switch: {{{1}}} | ||
| Aedeland = aedeland-flag.png | | Aedeland = aedeland-flag.png | ||
| Anat Tahan = Anat Tahan Flag.png | | Anat Tahan = Anat Tahan Flag.png | ||
Line 31: | Line 31: | ||
| The Bind = Bind-flag.png | | The Bind = Bind-flag.png | ||
| Flag placeholder.png | | Flag placeholder.png | ||
}}| {{{size|25px}}}]] [[{{{1}}}|{{{display|{{{1}}}}}}]] | }}| {{{size|25px}}}]] [[{{{1}}}|{{{display|{{{1}}}}}}]]</includeonly><noinclude>The '''<nowiki>{{flag}}</nowiki>''' template displays a flag icon before a wiki-linked country name. | ||
==Usage== | |||
<code><nowiki>{{flag|</nowiki>''1''|''size''|''display''<nowiki>}}</nowiki></code> | |||
==Parameters== | |||
{| class="wikitable" | |||
! Parameter !! Description !! Type !! Status | |||
|- | |||
| <code>1</code> || Country name (should match the country's article name) || String || '''Required''' | |||
|- | |||
| <code>size</code> || Image size, e.g. <code>30px</code>. Defaults to 25px || String || Optional | |||
|- | |||
| <code>display</code> || Text to display. Defaults to the value of <code>1</code> || String || Optional | |||
|} | |||
==Examples== | |||
{| class="wikitable" | |||
! Wiki markup !! Displays !! Notes | |||
|- | |||
| <code><nowiki>{{flag|Anat Tahan}}</nowiki></code> || {{flag|Anat Tahan}} || | |||
|- | |||
| <code><nowiki>{{flag|Hergom ep swekorwos|display=Hergom}}</nowiki></code> || {{flag|Hergom ep swekorwos|display=Hergom}} || Different text can be displayed in place of the country name. | |||
|- | |||
| <code><nowiki>{{flag|Tianji}}</nowiki></code> || {{flag|Tianji}} || If a country doesn't have a flag image, a placeholder is used so the country name lines up with others in a list. | |||
|- | |||
| <code><nowiki>{{flag|Cassia|size=40px}}</nowiki></code> || {{flag|Cassia|size=40px}} || The flag image size can use any standard wiki image size markup. | |||
|} | |||
</noinclude> |
Revision as of 20:06, 9 October 2023
The {{flag}} template displays a flag icon before a wiki-linked country name.
Usage
{{flag|1|size|display}}
Parameters
Parameter | Description | Type | Status |
---|---|---|---|
1 |
Country name (should match the country's article name) | String | Required |
size |
Image size, e.g. 30px . Defaults to 25px |
String | Optional |
display |
Text to display. Defaults to the value of 1 |
String | Optional |
Examples
Wiki markup | Displays | Notes |
---|---|---|
{{flag|Anat Tahan}} |
Anat Tahan | |
{{flag|Hergom ep swekorwos|display=Hergom}} |
Hergom | Different text can be displayed in place of the country name. |
{{flag|Tianji}} |
Tianji | If a country doesn't have a flag image, a placeholder is used so the country name lines up with others in a list. |
{{flag|Cassia|size=40px}} |
Cassia | The flag image size can use any standard wiki image size markup. |