Difference between revisions of "Template:TH"

From QWiki
m (Extending to include flags)
m (Fixing empty state for date)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="font-size:100%; line-height:-10px;"><div class="th-mono" style="float:left;width:50%;text-align:left;">{{#if:{{{flag|}}}|{{{flag}}}}} ''{{{1|}}}''</div><div style="float:right;width:50%;text-align:left;">{{#if:{{{2|}}}|{{#ifeq:{{{no-link|}}}|true|{{{2|}}}|[[{{{link|{{{2|}}}}}}|{{{2|}}}]]}}}}{{#if:{{{3|}}}|{{#switch:{{lc:{{{3|}}}}}
+
<includeonly><div style="font-size:100%; line-height:-10px;"><div class="th-mono" style="float:left;width:50%;padding-right:11px;text-align:{{#if:{{{center|}}}|right|left}};">{{#if:{{{1|}}}|''{{{1|}}}''|}}</div> <div style="float:right;width:50%;text-align:left;">{{#if:{{{flag|}}}|<span style="white-space:nowrap;vertical-align:baseline;">{{flag/{{lc:{{{flag}}}}}}}&nbsp;</span>|}}{{#if:{{{2|}}}|{{#ifeq:{{{no-link|}}}|true|{{{2|}}}|[[{{{link|{{{2|}}}}}}|{{{2|}}}]]}}}}{{#if:{{{3|}}}|{{#switch:{{lc:{{{3|}}}}}
 
|r = '''Retired'''
 
|r = '''Retired'''
 
|teamless= '''Teamless'''
 
|teamless= '''Teamless'''

Latest revision as of 11:27, 20 March 2023

Documentation (view - edit)

Usage

The variables are:

|1=
The first variable entered is the date, it will be italicized.
|2=
The second variable is the team name, it will be linked.
|3=
Third variable must be any of the values to the left in this list:

r = Retired
|retired = Retired
|teamless = Teamless
|inactive = (Inactive)
|analyst = (Analyst)
|coach = (Coach)
|stand-in = (Stand-in)
|backup = (Backup)
|substitute = (Substitute)
|manager = (Manager)
|trial = (Trial)
|tryout = (Tryout)

|flag=
Defaulting to none, use the 2 letter iso code for the country to show flag.
|link=
If the name of the team and the page name on QWiki differ, use this variable to set the page link.
|no-link=
If the team listed does not have a page on QWiki, set this variable to "true".
|center=
If center is set to anything, the year/date will move closer to center.

Example

{{TH|2015 - '''Present'''|Felia|link=Felia020}}
{{TH|2012 – 2013|The Viper Squad|inactive}}
{{TH|2003|Chopstick Ninjas|flag=dk|center=y}}
{{TH|2011|Zetor}}

Returns these layouts.

2015 - Present
2012 – 2013
The Viper Squad (Inactive)
2011