Difference between revisions of "Template:Infobox tornado year"

From blackwiki
Jump to navigation Jump to search
imported>Master of Time
(Implementing major upgrade to infobox: It now uses {{Infobox}} and the format is significantly less complicated.)
imported>TornadoLGS
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Tfm/dated|page=Infobox Tornado Year|otherpage=Infobox Tornado year (EF scale)|link=Wikipedia:Templates for discussion/Log/2014 December 21#Template:Infobox Tornado Year|help=off|type=infobox}}
+
<includeonly>{{Infobox
{{Infobox
+
| bodyclass = vevent
|bodyclass     = vevent
 
|title          = {{{name|<includeonly>{{PAGENAME}}</includeonly>}}}
 
  
|image  = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{{image location|}}}}}}|size={{{image_size|}}}|sizedefault=frameless|upright=1.2|alt={{{alt|{{{image alt|}}}}}}|suppressplaceholder=yes}}
+
| title      = {{#if:{{{name|}}}|{{{name}}}|{{PAGENAMEBASE}}}}
  
|caption = {{{caption|{{{image|}}}}}}
+
| image      = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|{{{image location|}}}}}}|size={{{image_size|}}}|upright=1.2|alt={{{alt|{{{image alt|}}}}}}|suppressplaceholder=yes}}
|captionstyle = border-bottom:1px solid #aaaaaa;
+
| caption    = {{{caption|}}}
  
|label1 = Timespan
+
| label1     = Timespan
|data1 = {{{timespan|}}}
+
| data1     = {{{timespan|}}}
|label2 = Maximum rated&nbsp;tornado
+
| label2     = Maximum rated&nbsp;tornado
|data2  = [[Fujita Scale|{{{max_F<includeonly>|</includeonly>}}}]] tornado<br/><!--
+
| data2     = {{#switch:{{{max_F|{{{max_EF|}}}}}}
-->{{{max_location<includeonly>|</includeonly>}}} <!--
+
  | unrated|FU|F0|F1|F2|F3|F4|F5      = [[Fujita scale|{{{max_F|}}}]] tornado
-->on {{{max_date<includeonly>|</includeonly>}}}<br /><!--
+
| EFU|EF0|EF1|EF2|EF3|EF4|EF5 = [[Enhanced Fujita scale|{{{max_EF|}}}]] tornado
-->{{#if: {{{max_location2|}}} | {{{max_location2<includeonly>|</includeonly>}}}|}} <!--
+
}}<!--
-->{{#if: {{{max_date2|}}} | on {{{max_date2<includeonly>|</includeonly>}}}<br />|}}<!--
+
-->{{Unbulleted list|item_style = text-indent: -1em; padding-left: 1em;
-->{{#if: {{{max_location3|}}} | {{{max_location3<includeonly>|</includeonly>}}}|}} <!--
+
| {{{max_location|}}}{{#if:{{{max_date|}}}|<br>on {{{max_date|}}}}}
-->{{#if: {{{max_date3|}}} | on {{{max_date3<includeonly>|</includeonly>}}}<br />|}}<!--
+
| {{{max_location2|}}}{{#if:{{{max_date2|}}}|<br>on {{{max_date2|}}}}}
-->{{#if: {{{max_location4|}}} | {{{max_location4<includeonly>|</includeonly>}}}|}} <!--
+
| {{{max_location3|}}}{{#if:{{{max_date3|}}}|<br>on {{{max_date3|}}}}}
-->{{#if: {{{max_date4|}}} | on {{{max_date4<includeonly>|</includeonly>}}}<br />|}}<!--
+
| {{{max_location4|}}}{{#if:{{{max_date4|}}}|<br>on {{{max_date4|}}}}}
-->{{#if: {{{max_location5|}}} | {{{max_location5<includeonly>|</includeonly>}}}|}} <!--
+
| {{{max_location5|}}}{{#if:{{{max_date5|}}}|<br>on {{{max_date5|}}}}}
-->{{#if: {{{max_date5|}}} | on {{{max_date5<includeonly>|</includeonly>}}}<br />|}}<!--
+
| {{{max_location6|}}}{{#if:{{{max_date6|}}}|<br>on {{{max_date6|}}}}}
-->{{#if: {{{max_location6|}}} | {{{max_location6<includeonly>|</includeonly>}}}|}} <!--
+
| {{{max_location7|}}}{{#if:{{{max_date7|}}}|<br>on {{{max_date7|}}}}}
-->{{#if: {{{max_date6|}}} | on {{{max_date6<includeonly>|</includeonly>}}}<br />|}}<!--
+
| {{{max_location8|}}}{{#if:{{{max_date8|}}}|<br>on {{{max_date8|}}}}}
-->{{#if: {{{max_location7|}}} | {{{max_location7<includeonly>|</includeonly>}}}|}} <!--
+
}}
-->{{#if: {{{max_date7|}}} | on {{{max_date7<includeonly>|</includeonly>}}}<br />|}}<!--
+
| label3     = Tornadoes in&nbsp;U.S.
-->{{#if: {{{max_location8|}}} | {{{max_location8<includeonly>|</includeonly>}}}|}} <!--
+
| data3     = {{{tornadoes_usa|}}}
-->{{#if: {{{max_date8|}}} | on {{{max_date8<includeonly>|</includeonly>}}}|}}
+
| label4     = Damage&nbsp;(U.S.)
|label3 = Tornadoes in&nbsp;US
+
| data4     = {{{total_damages_usa|}}}
|data3 = {{{tornadoes_usa|}}}
+
| label5     = Fatalities&nbsp;(U.S.)
|label4 = Damages&nbsp;(US)
+
| data5     = {{{total_fatalities_usa|}}}
|data4 = {{{total_damages_usa|}}}
+
| label6     = Fatalities (worldwide)
|label5 = Fatalities&nbsp;(US)
+
| data6     = {{{total_fatalities_world|}}}
|data5 = {{{total_fatalities_usa|}}}
 
|label6 = Fatalities (worldwide)
 
|data6 = {{{total_fatalities_world|}}}
 
|below = '''Tornado seasons'''<br>{{{five_seasons|}}}
 
|belowstyle = border-top:1px solid #aaaaaa;
 
}}<noinclude>
 
  
[[Category:Tornado templates|{{PAGENAME}}]]
+
| below      =
</noinclude>
+
* [[Tornadoes of {{#expr:{{{year}}}-2}}|{{#expr:{{{year}}}-2}}]]
 +
* [[Tornadoes of {{#expr:{{{year}}}-1}}|{{#expr:{{{year}}}-1}}]]
 +
* '''{{{year}}}'''
 +
* [[Tornadoes of {{#expr:{{{year}}}+1}}|{{#expr:{{{year}}}+1}}]]
 +
* [[Tornadoes of {{#expr:{{{year}}}+2}}|{{#expr:{{{year}}}+2}}]]
 +
| belowstyle = border-top: 1px solid #aaa; padding-top: 3px;
 +
| belowclass = hlist noprint
 +
}}</includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 20:12, 4 January 2020

50px Template documentation[view] [edit] [history] [purge]

Usage

{{Infobox tornado year
|name=Name to be shown at the top of the infobox; defaults to page name
|image=Image to be shown in the infobox
|caption=Image caption
|timespan=Time period between first and last tornadoes of the year in Month1, Day1 – Month2, Day2 format
|max_F (alias Max_EF)=Rating of the highest-rated tornado of the year
|max_location=Location at which the highest-rated tornado of the year occurred
|max_date=Date of the highest-rated tornado of the year
|max_location2=Location of a second tornado which shared the maximum rating of any tornadoes of the year
|max_date2=Date of the second tornado which shared the maximum rating of any tornadoes of the year
<!--Up to eight total tornadoes may be included-->
|tornadoes_usa=Total tornadoes officially recorded in the United States for the year
|total_damages_usa=Total damages officially recorded from tornadoes in the United States for the year
|total_fatalities_world=Total fatalities from tornadoes worldwide for the year
|year=Subject year
}}

Examples

2012

{{Infobox tornado year
|name          = Tornadoes of 2012
|image         = 2012 United States tornado count.png
|caption       = A graph of the 2012 United States tornado count
|timespan      = January 9 – December 26, 2012
|max_EF        = EF4
|max_location  = [[Harrisburg, Illinois]]
|max_date      = February 29
|max_location2 = [[Henryville, Indiana]]
|max_date2     = March 2
|max_location3 = [[Crittenden, Kentucky]]
|max_date3     = March 2
|max_location4 = [[Marquette, Kansas]]
|max_date4     = April 14
|tornadoes_usa = 932
|total_damages_usa = ~$1.6 billion
|total_fatalities_world = 85
|year=2012
}}

Produces:

Tornadoes of 2012
2012 United States tornado count.png
A graph of the 2012 United States tornado count
TimespanJanuary 9 – December 26, 2012
Maximum rated tornadoEF4 tornado
Tornadoes in U.S.932
Damage (U.S.)~$1.6 billion
Fatalities (worldwide)85
[[Category:Infobox templates|Template:Remove first word]]

2005

{{Infobox tornado year
|name          = Tornadoes of 2005
|image         = Hopkins County, KY Tornado.JPG
|caption       = Madisonville, Kentucky F4 Tornado
|timespan      = January – December 2005
|max_F         = F4
|max_location  = [[Madisonville, Kentucky|Madisonville, KY]]
|max_date      = November 15
|tornadoes_usa = 1,264
|total_damages_usa = $229.8 million
|total_fatalities_usa = 39
|total_fatalities_world = >39
|year=2005
}}

Produces:

Tornadoes of 2005
File:Hopkins County, KY Tornado.JPG
Madisonville, Kentucky F4 Tornado
TimespanJanuary – December 2005
Maximum rated tornadoF4 tornado
Tornadoes in U.S.1,264
Damage (U.S.)$229.8 million
Fatalities (U.S.)39
Fatalities (worldwide)>39
[[Category:Infobox templates|Template:Remove first word]]

TemplateData