Difference between revisions of "Template:Infobox earthquakes in date"

From blackwiki
Jump to navigation Jump to search
imported>Anomalocaris
m (<center>...</center> → <div style="text-align: center;">...</div>)
imported>Pithon314
(Adding decades as an option, created in sandbox)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
 
| bodyclass = vevent
 
| bodyclass = vevent
  
| title  = {{#if:{{{month|}}}||Earthquakes in}} <span class="dtstart">{{ifempty|{{{month|}}}|{{{year}}}}}</span>
+
| title  = {{#if:{{{month|}}}||Earthquakes in}} <span class="dtstart">{{if empty|{{{month|}}}|{{{year|}}}|{{{decade|}}}}}</span>
 
| titleclass = summary
 
| titleclass = summary
  
Line 17: Line 17:
 
{{{location_map_places|}}}
 
{{{location_map_places|}}}
 
|caption        = {{#if:{{{location_map_caption|}}}|{{{location_map_caption|}}}|
 
|caption        = {{#if:{{{location_map_caption|}}}|{{{location_map_caption|}}}|
Approximate epicenters of the earthquakes in {{ifempty|{{{month|}}}|{{{year}}}}}
+
Approximate epicenters of the earthquakes in {{if empty|{{{month|}}}|{{{year|}}}|{{{decade|}}}}}
 
{{col-begin|class=plainlist}}
 
{{col-begin|class=plainlist}}
 
{{col-2}}
 
{{col-2}}
Line 55: Line 55:
 
| belowstyle = border-top:#aaa 1px solid
 
| belowstyle = border-top:#aaa 1px solid
 
| below      = {{#if:{{{year|}}}|{{#ifexist:List of earthquakes in {{{prev|{{#expr:{{{year}}}-1}}}}}|{{align|left|&larr;&nbsp;[[List of earthquakes in {{{prev|{{#expr:{{{year}}}-1}}}}}|{{{prev|{{#expr:{{{year}}}-1}}}}}]]}}}}}}<!--
 
| below      = {{#if:{{{year|}}}|{{#ifexist:List of earthquakes in {{{prev|{{#expr:{{{year}}}-1}}}}}|{{align|left|&larr;&nbsp;[[List of earthquakes in {{{prev|{{#expr:{{{year}}}-1}}}}}|{{{prev|{{#expr:{{{year}}}-1}}}}}]]}}}}}}<!--
-->{{#if:{{{year|}}}|{{#ifexpr:{{{year}}}<{{#time:Y|+2 weeks}}|{{#ifexist:List of earthquakes in {{{prev|{{#expr:{{{year}}}+1}}}}}|{{align|right|[[List of earthquakes in {{{prev|{{#expr:{{{year}}}+1}}}}}|{{{prev|{{#expr:{{{year}}}+1}}}}}]]&nbsp;&rarr;}}}}}}}}
+
-->{{#if:{{{year|}}}|{{#ifexpr:{{{year}}}<{{#time:Y|+2 weeks}}|{{#ifexist:List of earthquakes in {{{prev|{{#expr:{{{year}}}+1}}}}}|{{align|right|[[List of earthquakes in {{{prev|{{#expr:{{{year}}}+1}}}}}|{{{prev|{{#expr:{{{year}}}+1}}}}}]]&nbsp;&rarr;}}}}}}}}<!--
 +
 
 +
-->{{#if:{{{decade|}}}|{{#ifexist:List of earthquakes {{{prev|{{#expr:{{str sub new|{{{decade}}}|1|4}}-10}}}}}–{{{prev|{{#expr:{{str sub new|{{{decade}}}|6}}-10}}}}}|{{align|left|&larr;&nbsp;[[List of earthquakes {{{prev|{{#expr:{{str sub new|{{{decade}}}|1|4}}-10}}}}}–{{{prev|{{#expr:{{str sub new|{{{decade}}}|6}}-10}}}}}|{{{prev|{{#expr:{{str sub new|{{{decade}}}|1|4}}-10}}}}}–{{{prev|{{#expr:{{str sub new|{{{decade}}}|6}}-10}}}}}]]}}}}}}<!--
 +
-->{{#if:{{{decade|}}}|{{#ifexist:List of earthquakes {{{prev|{{#expr:{{str sub new|{{{decade}}}|1|4}}+10}}}}}–{{{prev|{{#expr:{{str sub new|{{{decade}}}|6}}+10}}}}}|{{align|right|[[List of earthquakes {{{prev|{{#expr:{{str sub new|{{{decade}}}|1|4}}+10}}}}}–{{{prev|{{#expr:{{str sub new|{{{decade}}}|6}}+10}}}}}|{{{prev|{{#expr:{{str sub new|{{{decade}}}|1|4}}+10}}}}}–{{{prev|{{#expr:{{str sub new|{{{decade}}}|6}}+10}}}}}]]&nbsp;&rarr;}}}}}}
 
}}<noinclude>
 
}}<noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 17:14, 15 January 2021

Earthquakes in Script error: No such module "If empty".

[[Category:Infobox templates|Template:Remove first word]]

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

Usage

{{Infobox earthquakes in month
| month = <!-- REQUIRED -->
| largest =
| deadliest =
| fatalities = 
| 9.0+    = 
| 8.0−8.9 = 
| 7.0−7.9 = 
| 6.0−6.9 = 
| 5.0−5.9 = 
| 4.0−4.9 =
}}

or

{{Infobox earthquakes in year
| year = <!-- REQUIRED -->
| location_map = <!-- Earth -->
| location_map_places = 
<!--
{{Location map~|Earth|mark = Green pog.svg|lat_deg = 27.261|lon_deg = 54.428}}
{{Location map~|Earth|mark = Yellow pog.svg|lat_deg = -13.873|lon_deg = 167.202}}
{{Location map~|Earth|mark = Orange pog.svg|lat_deg = -20.400|lon_deg = -70.135}}
{{Location map~|Earth|mark = Red pog.svg|lat_deg = -19.642|lon_deg = -70.87}}
-->
| largest =
| deadliest =
| fatalities = 
| 9.0+    = 
| 8.0−8.9 = 
| 7.0−7.9 = 
| 6.0−6.9 = 
| 5.0−5.9 = 
}}

or

{{Infobox earthquakes in decade
| decade = <!-- In the format "2001–2010"-->
| location_map = <!-- Earth -->
| location_map_places = 
<!--
{{Location map~|Earth|mark = Green pog.svg|lat_deg = 27.261|lon_deg = 54.428}}
{{Location map~|Earth|mark = Yellow pog.svg|lat_deg = -13.873|lon_deg = 167.202}}
{{Location map~|Earth|mark = Orange pog.svg|lat_deg = -20.400|lon_deg = -70.135}}
{{Location map~|Earth|mark = Red pog.svg|lat_deg = -19.642|lon_deg = -70.87}}
-->
| largest =
| deadliest =
| fatalities = 
| 9.0+    = 
| 8.0−8.9 = 
| 7.0−7.9 = 
| 6.0−6.9 = 
| 5.0−5.9 = 
}}

Microformat

Template:UF-hcal