Module:Storm categories/doc: Difference between revisions

Content deleted Content added
m Anthony Appleyard moved page Module:Tropical cyclone categories/doc to Module:Storm categories/doc without leaving a redirect: Requested by Chlod at WP:RM/TR: Module's scope has now expanded to include other non-tropical storms (such as tornadoes). As such, the name "Tropical cyclone categories" is unfitting. This module includes many subpages (some are submodules, others are documentation pages) which require the page mover right to move (or at le...
page moved
Line 2:
{{ombox|text=In order to conform to [[Wikipedia:Manual of Style/Accessibility#Color]] guidelines, do not use storm colors in conjunction with links. This is necessary to avoid problems related to lack of contrast.}}
{{Lua
|Module:Tropical cycloneStorm categories/categories
|Module:Tropical cycloneStorm categories/colors
|Module:Tropical cycloneStorm categories/icons
|Module:Tropical cycloneStorm categories/demo
|noprotcat=yes
}}
Line 11:
 
Data is located in the following submodules:
* [[Module:Tropical cycloneStorm categories/categories]] for fully-detailed storm categories
* [[Module:Tropical cycloneStorm categories/colors]] for color-only IDs
* [[Module:Tropical cycloneStorm categories/icons]] for icon-only IDs
 
== Usage ==
Line 27:
! Output
|-
||<code><nowiki><span style="padding:4px;border:1px solid black;background-color:#{{#invoke:Tropical cycloneStorm categories|color|depression}}">depression</span></nowiki></code>
|<span style="padding:4px;border:1px solid black;background-color:#{{#invoke:Tropical cycloneStorm categories|color|depression}}">depression</span>
|}
 
Line 38:
! Output
|-
||<code><nowiki>{{#invoke:Tropical cycloneStorm categories|name|severe}}</nowiki></code>
|{{#invoke:Tropical cycloneStorm categories|name|severe}}
|-
||<code><nowiki>{{#invoke:Tropical cycloneStorm categories|name|spr - cYcL -s TorM}}</nowiki></code>
|{{#invoke:Tropical cycloneStorm categories|name|spr - cYcL -s TorM}}
|-
||<code><nowiki>{{#invoke:Tropical cycloneStorm categories|name|cat5}}</nowiki></code>
|{{#invoke:Tropical cycloneStorm categories|name|cat5}}
|-
||<code><nowiki>{{#invoke:Tropical cycloneStorm categories|name|cat5|WPac}}</nowiki></code>
|{{#invoke:Tropical cycloneStorm categories|name|cat5|WPac}}
|}
 
=== Sortkey ===
The sortkey is a number that aids in sorting categories. Using the sortkey, it is possible to automatically sort a table of tropical cyclones given their category code. Due to the ambiguous nature of sortkeys, tables may be sorted incorrectly if values from other basins were used. For categories that span multiple basins, however, (e.g. <code>depression</code> and <code>storm</code>) they are given the lowest possible sortkeys in order to achieve maximum compatibility.
{{#ifeq:{{BASEPAGENAME}}|Tropical cycloneStorm categories|
<p>This sortkey is used in {{T|storm sortkey}} and {{T|Tropical cyclone season effects (cyclone)}}, a subtemplate of {{T|Tropical cyclone season effects}}.</p>
}}
Line 91:
! Sortkey
! Code
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|cat3}}" |
| cat3
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|cat3}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|cat3}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|cat1}}"
| cat1
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|cat1}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|cat1}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|cat5}}"
| cat5
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|cat5}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|cat5}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|cat4}}"
| cat4
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|cat4}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|cat4}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|depression}}"
| depression
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|depression}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|depression}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|cat2}}"
| cat2
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|cat2}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|cat2}}</nowiki></code>
|}
 
Line 122:
! Sortkey
! Code
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|typhoon}}" |
| typhoon
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|typhoon}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|typhoon}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|potential}}"
| potential
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|potential}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|potential}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|cat5}}"
| cat5
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|cat5}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|cat5}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|svrcyclstorm}}"
| svrcyclstorm
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|svrcyclstorm}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|svrcyclstorm}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|unknown}}"
| unknown
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|unknown}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|unknown}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|supertyphoon}}"
| supertyphoon
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|supertyphoon}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|supertyphoon}}</nowiki></code>
|- style="background-color:#{{#invoke:Tropical cycloneStorm categories|color|niodepression}}"
| niodepression
| {{nts|{{#invoke:Tropical cycloneStorm categories|sortkey|niodepression}}}}
|| <code><nowiki>{{#invoke:Tropical cycloneStorm categories|sortkey|niodepression}}</nowiki></code>
|}
{{cbot}}
 
=== Icon ===
Icons exist for some tropical cycloneStorm categories for presentation purposes. This function is available as a template at {{T|Tropical cyclone status icons}}. <code>p.icon</code> will return wikitext of an image or formatted text.
 
=== Full list of available values ===
Line 160:
 
It will show any color errors, including colors which aren't compliant with the minimal [[Web Content Accessibility Guidelines#WCAG 2.0|Web Content Accessibility Guidelines 2.0]] AA color standards (see [[MOS:COLOR]] for more information).
{{#invoke:Tropical cycloneStorm categories|demo}}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |