Module:Gridiron color/data/doc: Difference between revisions

Content deleted Content added
Data format: rm unnecessary team name
 
(26 intermediate revisions by 9 users not shown)
Line 1:
<!--{{tl|Module rating |<!-- Values: pre-alpha • alpha • beta • release • protected -- If a rating not needed/relevant, delete this template call }}-->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{High-use}}
 
Data source for [[:Module:Gridiron color]] and [[:Module:Gridiron color/sandbox]]
 
Line 6 ⟶ 8:
 
 
=== Normal team formatting: ===
 
<sourcesyntaxhighlight lang="lua">["team name"] = {"primary color", "secondary color", "tertiary color", "alternativealt primary", "alternativealt secondary"},</sourcesyntaxhighlight>
 
=== Teams with historical color schemes ===
 
Team with historical colors formatting (where XXXX represents the 4-digit start year and YYYY represents the 4-digit end year):
 
<sourcesyntaxhighlight lang="lua">
["team name"] = {"primary color", "secondary color", "tertiary color", "alternativealt primary", "alternativealt secondary",
{
["team name XXXXthruYYYY"] = {"primary color", "secondary color", "tertiary color", "alternativealt primary", "alternativealt secondary"},
["team name XXXXthruYYYY"] = "alternative team name",
["team name XXXXthruYYYY"] = "alternative team name XXXXthruYYYY"
}
},
</syntaxhighlight>
</source>
 
=== Team alternative name formatting: ===
 
<sourcesyntaxhighlight lang="lua">["team alternative name"] = "team name",</sourcesyntaxhighlight>
 
=== Warnings ===
 
Do '''not''' create a historical color line that links back to the main team name, as in the <code>"Gridiron Team 1990thru2000"</code> line in the example below:
 
<syntaxhighlight lang="lua">
["Gridiron Team"] = {"#dcdcdc", "", "none", "", "",
{
["Gridiron Team 1990thru2000"] = "Gridiron Team"
["Gridiron Team 1980thru1990"] = {"#dcdcdc", "", "none", "", ""}
}
},
</syntaxhighlight>
 
This will create an infinite loop, and cause script errors and timeout errors on any pages that try to specify that team. The module will always use the current colors if a color for the specified year is not found, so any historical lines that are identical to the top-level color scheme can simply be deleted.
 
Also, remember to include the pound sign (#) with the hex codes when adding or changing colors, as in {{code|#dcdcdc}}. Some data modules don't require the pound sign.
Team alternative name formatting:
 
== Test table ==
<source lang="lua">["team alternative name"] = "team name",</source>
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
--------------------------------------------------------------------------------
|{{#invoke:Gridiron color/contrast|testtable|columns=5|sport=data/sandbox|style=background:#FDFDFD}}
|{{#invoke:Gridiron color/contrast|testtable|columns=5|sport=data|style=background:#FDFDFD}}
}}
 
{{Sports color templates}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
 
}}</includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Sports color modules]]
}}</includeonly><noinclude>
[[Category:Module documentation pages]]
</noinclude>