Revision as of 12:44, 15 June 2007 view sourceTomTheHand (talk | contribs)19,190 edits whoops, adjusting size (ensign should be wider than the jack because of its different aspect ratio)← Previous edit | Latest revision as of 18:32, 23 June 2019 view source Primefac (talk | contribs)Edit filter managers, Autopatrolled, Bureaucrats, Checkusers, Oversighters, Administrators209,808 edits fixing flag again | ||
(17 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
<span class="flagicon">[[File:{{#ifexpr: {{{1|9999}}} >= 1960|Flag of the United States | |||
⚫ | <noinclude> | ||
|{{#ifexpr: {{{1|9999}}} >= 1959|US flag 49 stars | |||
This template is used to insert the appropriate ensign for the ] into infoboxes and other places where it's useful. The template was created because the ] changed whenever a new state was admitted. The template's intent is to make getting the right ensign easier. | |||
|{{#ifexpr: {{{1|9999}}} >= 1912|US flag 48 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1908|US flag 46 stars | |||
To use the template, insert the following where you'd like the ensign to appear: | |||
|{{#ifexpr: {{{1|9999}}} >= 1896|US flag 45 stars | |||
*'''<nowiki>{{USN flag|</nowiki>'''''year''|''width in pixels'''''}}''' | |||
|{{#ifexpr: {{{1|9999}}} >= 1891|US flag 44 stars | |||
Both parameters are optional. If you do not include a year, the current ensign will be displayed. If you do not include a width, the ensign will be the right size for use in a ship infobox. The ensign will have a 1-pixel white border around it to make it stand out clearly from the blue infobox. Here are some example uses: | |||
|{{#ifexpr: {{{1|9999}}} >= 1890|US flag 43 stars | |||
*'''<nowiki>{{USN flag}}</nowiki>''' gives the current ensign in infobox size: {{USN flag}} | |||
|{{#ifexpr: {{{1|9999}}} >= 1877|US flag 38 stars | |||
*'''<nowiki>{{USN flag|1945}}</nowiki>''' gives the ensign as used in 1945 in infobox size: {{USN flag|1945}} | |||
|{{#ifexpr: {{{1|9999}}} >= 1867|US flag 37 stars | |||
*'''<nowiki>{{USN flag|1865|20}}</nowiki>''' gives the 1865 ensign, 20 pixels wide: {{USN flag|1865|20}} | |||
|{{#ifexpr: {{{1|9999}}} >= 1865|US flag 36 stars | |||
If you want to specify ''just'' a width, it is done like so: | |||
|{{#ifexpr: {{{1|9999}}} >= 1863|US flag 35 stars | |||
*'''<nowiki>{{USN flag|2=20}}</nowiki>''' gives the current ensign, 20 pixels wide: {{USN flag|2=20}} | |||
|{{#ifexpr: {{{1|9999}}} >= 1861|US flag 34 stars | |||
*'''<nowiki>{{USN flag|2=100}}</nowiki>''' gives the current ensign, 100 pixels wide: {{USN flag|2=100}} | |||
|{{#ifexpr: {{{1|9999}}} >= 1859|US flag 33 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1858|US flag 32 stars | |||
A year should almost always be specified. Only leave it off when the ship is in service right now. A width should usually not be specified. Only specify a width when the template is being used someplace other than an infobox. | |||
|{{#ifexpr: {{{1|9999}}} >= 1851|US flag 31 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1848|US flag 30 stars | |||
Also, a nitpicky usage note. The template displays the flag used at the ''end'' of the specified year. For example, the US flag changed from 46 to 60 stars on July 4, 1912. If you use '''<nowiki>{{USN flag|1912}}</nowiki>''' in an article, it will display the 60 star flag. If you want a 46 star flag for a ship that only served in ''early'' 1912, use the previous year's flag, '''<nowiki>{{USN flag|1911}}</nowiki>'''. | |||
|{{#ifexpr: {{{1|9999}}} >= 1847|US flag 29 stars | |||
</noinclude><includeonly>{{#ifexpr: {{{1|999999}}} >= 2002| {{border|]}}}}<!-- | |||
|{{#ifexpr: {{{1|9999}}} >= 1846|US flag 28 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1845|US flag 27 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1837|US flag 26 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1836|US flag 25 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1822|US flag 24 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1820|US flag 23 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1819|US flag 21 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1818|US flag 20 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1795|US flag 15 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1777|US flag 13 stars | |||
|{{#ifexpr: {{{1|9999}}} >= 1775|Flag of the United States (1776–1777) | |||
<!--default if no param-->|Flag of the United States | |||
-->{{#ifexpr: {{{1|999999}}} >= 1861 and {{{1|999999}}} < 1863| {{border|]}}}}<!-- | |||
}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}.svg|100x35px|alt=|link=]]</span><noinclude> | |||
-->{{#ifexpr: {{{1|999999}}} >= 1859 and {{{1|999999}}} < 1861| {{border|]}}}}<!-- | |||
{{documentation}} | |||
-->{{#ifexpr: {{{1|999999}}} >= 1858 and {{{1|999999}}} < 1859| {{border|]}}}}<!-- | |||
⚫ | </noinclude> | ||
-->{{#ifexpr: {{{1|999999}}} >= 1851 and {{{1|999999}}} < 1858| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1860 and {{{1|999999}}} < 1851| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1847 and {{{1|999999}}} < 1860| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1846 and {{{1|999999}}} < 1847| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1845 and {{{1|999999}}} < 1846| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1837 and {{{1|999999}}} < 1845| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1836 and {{{1|999999}}} < 1837| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1822 and {{{1|999999}}} < 1836| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1820 and {{{1|999999}}} < 1822| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1819 and {{{1|999999}}} < 1820| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1818 and {{{1|999999}}} < 1819| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1795 and {{{1|999999}}} < 1818| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} >= 1777 and {{{1|999999}}} < 1795| {{border|]}}}}<!-- | |||
-->{{#ifexpr: {{{1|999999}}} < 1777| {{border|]}}}}</includeonly> |
Latest revision as of 18:32, 23 June 2019
Template documentation[view] [edit] [history] [purge]
This template is used on approximately 10,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template is used to select the appropriate ensign of the United States Navy for the Ship flag
parameter of {{Infobox Ship Career}}. The template was created because the flag of the United States changed whenever a new state was admitted to the union. Its intent is to make getting the right ensign easier.
- Usage
{{USN flag|year}}
The year
parameter is optional; if absent, the current (since July 4, 1960) ensign is displayed. The image is rendered at 100x35px pixel size, which is the default standard also used by {{Shipboxflag}} for the same usage.
Nitpicky usage note: the "official" date of flag turnover is always July 4th of the year specified. The template displays the flag used at the end of the specified year, which is actually always the smaller part of that year. For example, the US flag changed from 46 to 48 stars on July 4, 1912, so if you use {{USN flag|1912}}
in an article, it will display the 48-star flag. If, however, you wanted to indicate a 46-star flag for a ship that only served in early 1912, you will need to indicate the previous year's flag, {{USN flag|1911}}
in order to render that number of stars.
See {{navy}} for an alternate method of rendering historical United States flags, but in icon size and with a wikilink to the United States Navy article. For example, {{navy|USA|1912}}
will produce United States Navy.
- See also
- {{Country data United States}}
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Category: