Difference between revisions of "Template:Team"

From QWiki
m
m (css to center flag and name)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly><!--
 
<includeonly><!--
Starting with checking if the hidden sort variable is set if so it'll go into a switch to output the right variable as hidden.
 
-->{{#if:{{{hs|}}}|{{HiddenSort|{{#switch:{{lc:{{{hs}}}}}
 
    |race = {{{race|}}}
 
    |name = {{{1|}}}
 
    |flag = {{{flag/}}}
 
    |{{{hs}}}}}}}}}<!--
 
  
Checking to see if flag variable is set and if so using an image link to display it.
+
If flag is set - use an image link to display it.
-->{{#if:{{{flag|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{flag}}}}}}}&nbsp;}}<!--
+
-->{{#if:{{{flag|}}}|<span style="white-space:nowrap;vertical-align:baseline;position:relative;bottom:2px;">{{flag/{{lc:{{{flag}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{flag/tbd}}&nbsp;</span>}}<!--
  
Checking if race is entered, if so using the RaceIconSmall template.
+
Checking if there is a link= variable. If there is use it, if not load the correct link from the player link list. If link=abbr, don't link but underline name and show content of abbr= on hover.
-->{{#if:{{{race|}}}|{{RaceIconSmall|{{{race}}}}}&nbsp;}}<!--
 
 
 
 
 
Checking if there is a link= variable. If there is use it, if not load the correct link from the player link list.
 
 
--><span style="white-space: pre">{{#if:{{{link|}}}|
 
--><span style="white-space: pre">{{#if:{{{link|}}}|
 
{{#switch: {{{link}}}
 
{{#switch: {{{link}}}
 
|false={{{1}}}
 
|false={{{1}}}
 
|true=[[{{{1}}}]]
 
|true=[[{{{1}}}]]
 +
|abbr={{abbr|{{{1|}}}|{{{abbr}}}}}
 
|[[{{{link}}}|{{{1}}}]]}}
 
|[[{{{link}}}|{{{1}}}]]}}
|{{#if:{{{1|}}}|[[{{{1}}}]]|}}}}</span><!--
+
|{{#if:{{{1|TBD}}}|[[{{{1|TBD}}}]]|{{abbr|TBD|To Be Decided}}}}
--></includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>
+
|[[{{{1}}}]]}}</span><!--
 +
 
 +
</includeonly><noinclude>{{Documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 20:39, 14 November 2024

Documentation (view - edit)

Same as {{player}}, just other name.

Example

This code:

{{team|Orkney Clan|flag=se}}
{{team|Ihasnowikipage|flag=us|link=false}}

Returns this:

Sweden Orkney Clan
United States Ihasnolink