Content deleted Content added
update docs |
No edit summary |
||
(18 intermediate revisions by 7 users not shown) | |||
Line 1:
{{Module rating|
{{High-use}}
{{ombox|text=In order to conform to [[Wikipedia:Manual of Style/Accessibility#Color]] guidelines, do not use
This template is used to control a multitude of tropical cyclone-related templates: {{t|storm colour}}, {{t|tc nom list}}, {{t|storm sortkey}}, and {{t|tropical cyclone status icons}}. It acts as a centralized ___location for storm categories to avoid discrepancies between templates, allowing for the same ID to be used across all related templates.▼
{{Lua
|Module:Storm categories/categories
|Module:Storm categories/colors
|Module:Storm categories/icons
|Module:Storm categories/demo
|noprotcat=yes
}}
▲This template is used to control a multitude of tropical cyclone-related templates: {{t|storm colour
Data is located in the following submodules:
* [[Module:
* [[Module:
* [[Module:
== Usage ==
Line 20 ⟶ 28:
! Output
|-
||<code><nowiki><span style="padding:4px;border:1px solid black;background-color:#{{#invoke:
|<span style="padding:4px;border:1px solid black;background-color:#{{#invoke:
|}
=== Name ===
Provides the name of the given tropical cyclone category code. A optional basin argument can be provided as the second argument in order to slightly tweak the name of the category, if the given category definition supports it. This function is available as a template at {{T|
{| class="wikitable"
! rowspan="2" | Code
! colspan="2" | Interpreted
! rowspan="2" | Output
|-
! ID
||<code><nowiki>{{#invoke:Tropical cyclone categories|name|severe}}</nowiki></code>▼
! Basin
|-
||<code><nowiki>{{#invoke:
|severe
|{{#invoke:Tropical cyclone categories|name|spr - cYcL -s TorM}}▼
|{{gray|''(default)''}}
|{{#invoke:Storm categories{{sandbox other|/sandbox}}|name|severe}}
|-
||<code><nowiki>{{#invoke:
|sprcyclstorm
|{{#invoke:Tropical cyclone categories|name|cat5}}▼
|{{gray|''(default)''}}
|-
||<code><nowiki>{{#invoke:
|cat5
|{{#invoke:Tropical cyclone categories|name|cat5|WPac}}▼
|{{gray|''(default)''}}
|{{#invoke:Storm categories{{sandbox other|/sandbox}}|name|cat5}}
|-
|cat5
|ATl
|-
|cat5
|WPac
|{{#invoke:Storm categories{{sandbox other|/sandbox}}|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.
<p>This sortkey is used in
▲{{#ifeq:{{BASEPAGENAME}}|Tropical cyclone categories|
▲ This sortkey is used in {{T|storm sortkey}} and {{T|Tropical cyclone season effects (cyclone)}}, a subtemplate of {{T|Tropical cyclone season effects}}.
}}
The sortkey format is as follows. Note that not all values between the given ranges were used. The arrangement of these were determined by their positions in the {{T|Storm colour}} template.
{| class="wikitable"
Line 84 ⟶ 107:
{| class="wikitable sortable"
! Category
! data-sort-type="number" | Sortkey
! Code
|- style="background-color:#{{#invoke:
| cat3
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| cat1
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| cat5
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| cat4
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| depression
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| cat2
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|}
Line 117 ⟶ 140:
! Sortkey
! Code
|- style="background-color:#{{#invoke:
| typhoon
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| potential
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| cat5
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| svrcyclstorm
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| unknown
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| supertyphoon
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|- style="background-color:#{{#invoke:
| niodepression
| {{nts|{{#invoke:
|| <code><nowiki>{{#invoke:
|}
{{cbot}}
=== Icon ===
Icons exist for some
=== Full list of available values ===
Line 155 ⟶ 178:
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:
<includeonly>{{
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Storm category templates]]
[[Category:Tropical cyclone templates]]
[[Category:Non-tropical storms templates]]
}}</includeonly>
|