Difference between revisions of "Template:6sTeamCard"

From comp.tf
Jump to navigation Jump to search
m (Reverted edits by Efefknee (talk) to last revision by Garlic)
 
(111 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<includeonly><div class="teamcard" style="position:relative; width:250px; height:{{#expr:165+{{#if:{{{placement|}}}|33|0}}+{{#if:{{{preview|}}}|27|0}}+{{#if:{{{qualifier|}}}|23|0}}}}px;">
+
<includeonly><div class="teamcard" style="position:relative; width:166px; height:{{#expr:160+{{#if:{{{placement|}}}|33|0}}+{{#if:{{{preview|}}}|27|0}}+{{#if:{{{qualifier|}}}|28|0}}}}px; margin-top:1em">
<center>{{#if:{{{team|}}}|'''[[{{{link|{{{team}}}}}}|{{{team}}}]]'''|'''TBD'''}}{{#if:{{{notes|}}}|&nbsp;<sup>{{{notes|&nbsp;}}}</sup>}}{{{ref|}}}</center>
+
<center>{{#if:{{{team|}}}|'''{{#ifeq:{{{link|}}}|0|{{{team|}}}|[[{{{link|{{{team}}}}}}|{{{team}}}]]'''|'''TBD'''}}}}{{#if:{{{notes|}}}|&nbsp;<sup>{{{notes|&nbsp;}}}</sup>}}{{{ref|}}}</center>
{| class="wikitable logo" style="width: 250px; height: {{#expr: 166+{{#if:{{{placement|}}}|33|0}}+{{#if:{{{preview|}}}|27|0}}}}px;"
+
{| class="wikitable logo" style="width: 166px; height: {{#expr: 167+{{#if:{{{placement|}}}|33|0}}+{{#if:{{{preview|}}}|27|0}}}}px;"
 
|-
 
|-
|{{#if:{{{image|}}}|[[File:{{{image}}}|{{{imagesize|140x140px}}}|center|{{{link}}}]]|[[File:Generic_Logo.png|center]]}}
+
|[[{{#if:{{{image|}}}|File:{{#ifeq:{{{image|}}}| |Generic_Logo2.png|{{{image}}}}}|{{#ifeq:{{{team|}}}||File:Generic_Logo2.png|{{#show: {{#if:{{{link|}}}|{{{link|}}}|{{{team|}}}}}|?has teamcard image|default={{#show: {{#if:{{{link|}}}|{{{link|}}}|{{{team|}}}}}|?has image|default=File:Generic_Logo2.png|link=none}}|link=none}}}}}}|{{#if:{{{imagesize|}}}|{{{imagesize}}}|140x140px}}|center|link=]]
 
|}
 
|}
{| class="wikitable list" style="width: 250px; height: {{#expr: 166+{{#if:{{{placement|}}}|33|0}}+{{#if:{{{preview|}}}|27|0}}}}px;"  
+
{| class="wikitable list" style="width: 166px; height: {{#expr: 166+{{#if:{{{placement|}}}|33|0}}+{{#if:{{{preview|}}}|27|0}}}}px;"  
 
|-
 
|-
!width=95px|<div style="text-align: left;">{{{rolescout1|[[File:Scouticon.png|20px|link=]] [[Scout]]}}}</div>
+
!width=20px|{{{rolescout1|[[File:Scouticon.png|20px|link=|Scout]]}}}
|&nbsp;{{flag|{{#if:{{{scout1flag|}}}|{{{scout1flag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{scout1|}}}|[[{{{scout1link|{{{scout1}}}}}}|{{{scout1}}}]]|<abbr title="To Be Determined">TBD</abbr>}}&nbsp;{{#if:{{{scout1preview|}}}|[[Image:Writers_icon.png|20px|15px|link={{{scout1preview}}}|Preview]]}}
+
|{{#if:{{{scout1team|}}}|<span style="height:22px; width:22px; overflow:hidden; display:flex; justify-content:center; float:right;">&nbsp;<span style="transform:translate(-2px, -1px)">[[File:{{#if:{{{scout1teamimg|}}}|{{{scout1teamimg}}}|{{#ifexist:File:{{{scout1team}}}_Icon.png|{{{scout1team}}}_Icon.png|TF_icon.png}}}}|x20px|link={{{scout1team}}}]]</span></span>}}&nbsp;{{flag|fixed-width=1|{{#if:{{{scout1flag|}}}|{{{scout1flag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{scout1|}}}|[[{{{scout1link|{{{scout1}}}}}}|{{{scout1}}}]]|<abbr title="To Be Determined">TBD</abbr>}}&nbsp;{{#if:{{{scout1preview|}}}|[[Image:Writers_icon.png|20px|15px|link={{{scout1preview}}}|Preview]]}}
 
|-
 
|-
!{{{rolescout2|<div style="text-align: left;">[[File:Scouticon.png|20px|link=]] [[Scout]]}}} </div>
+
!{{{rolescout2|[[File:Scouticon.png|20px|link=|Scout]]}}}
|&nbsp;{{flag|{{#if:{{{scout2flag|}}}|{{{scout2flag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{scout2|}}}|[[{{{scout2link|{{{scout2}}}}}}|{{{scout2}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
+
|{{#if:{{{scout2team|}}}|<span style="height:22px; width:22px; overflow:hidden; display:flex; justify-content:center; float:right;">&nbsp;<span style="transform:translate(-2px, -1px)">[[File:{{#if:{{{scout2teamimg|}}}|{{{scout2teamimg}}}|{{#ifexist:File:{{{scout2team}}}_Icon.png|{{{scout2team}}}_Icon.png|TF_icon.png}}}}|x20px|link={{{scout2team}}}]]</span></span>}}&nbsp;{{flag|fixed-width=1|{{#if:{{{scout2flag|}}}|{{{scout2flag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{scout2|}}}|[[{{{scout2link|{{{scout2}}}}}}|{{{scout2}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
 
|-
 
|-
!{{{rolepocket|<div style="text-align: left;">[[File:Soldiericon.png|20px|link=]] [[Pocket]]}}}</div>
+
!{{{roleroamer|[[File:Roamericon.png|20px|link=|Roamer]]}}}
{{!}}&nbsp;{{flag|{{#if:{{{pocketflag|}}}|{{{pocketflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{pocket|}}}|[[{{{pocketlink|{{{pocket}}}}}}|{{{pocket}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
+
{{!}}{{#if:{{{roamerteam|}}}|<span style="height:22px; width:22px; overflow:hidden; display:flex; justify-content:center; float:right;">&nbsp;<span style="transform:translate(-2px, -1px)">[[File:{{#if:{{{roamerteamimg|}}}|{{{roamerteamimg}}}|{{#ifexist:File:{{{roamerteam}}}_Icon.png|{{{roamerteam}}}_Icon.png|TF_icon.png}}}}|x20px|link={{{roamerteam}}}]]</span></span>}}&nbsp;{{flag|fixed-width=1|{{#if:{{{roamerflag|}}}|{{{roamerflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{roamer|}}}|[[{{{roamerlink|{{{roamer}}}}}}|{{{roamer}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
 
|-
 
|-
!{{{roleroamer|<div style="text-align: left;">[[File:Soldiericon.png|20px|link=]] [[Roamer]]}}}</div>
+
!{{{rolepocket|[[File:Pocketicon.png|20px|link=|Pocket]]}}}
{{!}}&nbsp;{{flag|{{#if:{{{roamerflag|}}}|{{{roamerflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{roamer|}}}|[[{{{roamerlink|{{{roamer}}}}}}|{{{roamer}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
+
{{!}}{{#if:{{{pocketteam|}}}|<span style="height:22px; width:22px; overflow:hidden; display:flex; justify-content:center; float:right;">&nbsp;<span style="transform:translate(-2px, -1px)">[[File:{{#if:{{{pocketteamimg|}}}|{{{pocketteamimg}}}|{{#ifexist:File:{{{pocketteam}}}_Icon.png|{{{pocketteam}}}_Icon.png|TF_icon.png}}}}|x20px|link={{{pocketteam}}}]]</span></span>}}&nbsp;{{flag|fixed-width=1|{{#if:{{{pocketflag|}}}|{{{pocketflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{pocket|}}}|[[{{{pocketlink|{{{pocket}}}}}}|{{{pocket}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
 
|-
 
|-
!{{{roledemoman|<div style="text-align: left;">[[File:Demomanicon.png|20px|link=]] [[Demoman]]}}}</div>
+
!{{{roledemoman|[[File:Demomanicon.png|20px|link=|Demoman]]}}}
{{!}}&nbsp;{{flag|{{#if:{{{demomanflag|}}}|{{{demomanflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{demoman|}}}|[[{{{demomanlink|{{{demoman}}}}}}|{{{demoman}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
+
{{!}}{{#if:{{{demomanteam|}}}|<span style="height:22px; width:22px; overflow:hidden; display:flex; justify-content:center; float:right;">&nbsp;<span style="transform:translate(-2px, -1px)">[[File:{{#if:{{{demomanteamimg|}}}|{{{demomanteamimg}}}|{{#ifexist:File:{{{demomanteam}}}_Icon.png|{{{demomanteam}}}_Icon.png|TF_icon.png}}}}|x20px|link={{{demomanteam}}}]]</span></span>}}&nbsp;{{flag|fixed-width=1|{{#if:{{{demomanflag|}}}|{{{demomanflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{demoman|}}}|[[{{{demomanlink|{{{demoman}}}}}}|{{{demoman}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
 
|-
 
|-
!{{{rolemedic|<div style="text-align: left;">[[File:Medicicon.png|20px|link=]] [[Medic]]}}}</div>
+
!{{{rolemedic|[[File:Medicicon.png|20px|link=|Medic]]}}}
{{!}} &nbsp;{{flag|{{#if:{{{medicflag|}}}|{{{medicflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{medic|}}}|[[{{{mediclink|{{{medic}}}}}}|{{{medic}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
+
{{!}}{{#if:{{{medicteam|}}}|<span style="height:22px; width:22px; overflow:hidden; display:flex; justify-content:center; float:right;">&nbsp;<span style="transform:translate(-2px, -1px)">[[File:{{#if:{{{medicteamimg|}}}|{{{medicteamimg}}}|{{#ifexist:File:{{{medicteam}}}_Icon.png|{{{medicteam}}}_Icon.png|TF_icon.png}}}}|x20px|link={{{medicteam}}}]]</span></span>}}&nbsp;{{flag|fixed-width=1|{{#if:{{{medicflag|}}}|{{{medicflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{medic|}}}|[[{{{mediclink|{{{medic}}}}}}|{{{medic}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
 +
|-
 +
{{#if:{{{coach|}}}|
 +
!'''{{{rolecoach|[[File:Generic Logo.png|20px|link=|Coach]]}}}'''
 +
{{!}}{{#if:{{{coachteam|}}}|<span style="height:22px; width:22px; overflow:hidden; display:flex; justify-content:center; float:right;">&nbsp;<span style="transform:translate(-2px, -1px)">[[File:{{#if:{{{coachteamimg|}}}|{{{coachteamimg}}}|{{#ifexist:File:{{{coachteam}}}_Icon.png|{{{coachteam}}}_Icon.png|TF_icon.png}}}}|x20px|link={{{coachteam}}}]]</span></span>}}&nbsp;{{flag|fixed-width=1|{{#if:{{{coachflag|}}}|{{{coachflag|filler flag}}}|filler flag}}}}&nbsp;{{#if:{{{coach|}}}|[[{{{coachlink|{{{coach}}}}}}|{{{coach}}}]]|<abbr title="To Be Determined">TBD</abbr>}}
 +
{{!}}-|}}
 
{{!}}-{{#if:{{{placement|}}}|style="height: 29px;"}}
 
{{!}}-{{#if:{{{placement|}}}|style="height: 29px;"}}
 
{{#if:{{{placement|}}}|{{!}}colspan="2" {{Placement|{{{placement}}}}}{{#if:{{{placementicon|}}}|&nbsp;{{{placementicon}}}}}}}
 
{{#if:{{{placement|}}}|{{!}}colspan="2" {{Placement|{{{placement}}}}}{{#if:{{{placementicon|}}}|&nbsp;{{{placementicon}}}}}}}
Line 31: Line 36:
 
</div>{{#if:{{{qualifier|}}}|
 
</div>{{#if:{{{qualifier|}}}|
 
<div class="teamcard-qualifier" style="text-align: center; border-bottom: 1px solid #aaa; border-left: 1px solid #aaa; border-right: 1px solid #aaa; font-weight: bold; background-color: #f9f9f9; padding: 2px;margin-bottom: -25px;">{{{qualifier}}}</div>}}<!--
 
<div class="teamcard-qualifier" style="text-align: center; border-bottom: 1px solid #aaa; border-left: 1px solid #aaa; border-right: 1px solid #aaa; font-weight: bold; background-color: #f9f9f9; padding: 2px;margin-bottom: -25px;">{{{qualifier}}}</div>}}<!--
  ----- SEMANTIC SUBOBJECTS /disabled/ -----
+
  ----- SEMANTIC SUBOBJECTS -----
 +
 
 +
-->{{#set:has team={{{team}}}}}<!--
 +
 
 +
-->{{#ifeq:{{NAMESPACE}}||<!--
  
{{#ifeq:{{NAMESPACE}}||
+
-->{{#vardefine:team_name|{{#ifexist:Template:Team/{{{link|{{{team|}}}}}}|{{#explode:{{#explode:{{Team/{{{link|{{{team|}}}}}}}}|link=|1}}|]]|0}}|{{{link|{{{team|}}}}}}}}}}<!--
  
{{#subobject:ranking_{{lc:{{{link|{{{team|TBD}}}}}}}}
+
-->{{#subobject:ranking_{{lc:{{{link|{{{team|TBD}}}}}}}}
 +
|is team={{#var:team_name}}
 +
|has tournament={{FULLPAGENAME}}
 +
|has approssimate date={{#if:{{#var:tournament_date}}|{{#var:tournament_date}}|{{#if:{{#var:tournament_edate}}|{{#var:tournament_edate}}|{{#var:tournament_sdate}}}} }}
 
|has player pages={{{scout1link|{{{scout1|}}}}}}
 
|has player pages={{{scout1link|{{{scout1|}}}}}}
 
|has player pages={{{scout2link|{{{scout2|}}}}}}
 
|has player pages={{{scout2link|{{{scout2|}}}}}}
 +
|has player pages={{{roamerlink|{{{roamer|}}}}}}
 
|has player pages={{{pocketlink|{{{pocket|}}}}}}
 
|has player pages={{{pocketlink|{{{pocket|}}}}}}
|has player pages={{{roamerlink|{{{roamer|}}}}}}
 
 
|has player pages={{{demomanlink|{{{demoman|}}}}}}
 
|has player pages={{{demomanlink|{{{demoman|}}}}}}
 
|has player pages={{{mediclink|{{{medic|}}}}}}
 
|has player pages={{{mediclink|{{{medic|}}}}}}
 
|has player pages={{{p7link|{{{p7|}}}}}}
 
|has player pages={{{p7link|{{{p7|}}}}}}
 
}}
 
}}
-->
+
}}
 
</includeonly>
 
</includeonly>
 
<noinclude>{{Documentation}}[[Category:Templates]][[Category:Source Liquipedia‏‎]]</noinclude>
 
<noinclude>{{Documentation}}[[Category:Templates]][[Category:Source Liquipedia‏‎]]</noinclude>

Latest revision as of 04:52, 20 April 2020

(view - edit) Documentation

Credit to Liquipedia
Template meant to be used when presenting a 6 man team on a tournament page. With only logo displayed until it's hovered and the roster is revealed.

Usage

X will denote a number from 1 to 5, 1 is the top row and 5 the bottom.

|team=
|link=
Name of the team and link to the page if different. If set to 0, no link will show.
|ref=
To be used to insert a reference if there was some change with the team or whatever.
|image=
Image file link (no File: or Image: before this)
|imagesize=
Max size is 140x140px, can use the regular image size input ways of just width (140px) or height (x140px) to make the image fit into the template.
|notes=
Superscript text that appears next to the team name.
|<class>=
Player name.
|<class>flag=
Player nationality/flag only 2 letter code in lower case is needed.
|<class>team=
Player's main team if playing on a secondary team (e.g. national teams). Must have main team's proper capitalisation.
|<class>teamimg=
Alternate image file to be used for main team icon.
|role<class>=
If a team has different roles. E.g. |rolepocket={{Icon|pyro}} will show the Pyro pyro icon in place of the Pocket Soldier pocket icon.
|coach=
If a team has a coach/7th player. Can be used with |coachflag= and |rolecoach= just like the other player parameters. E.g. set |rolecoach={{abbr|S|Substitute}} to show "S" instead of the coach icon.
|qualifier=
How the team qualified for the event, i.e. "Invited". Can also be a link.

Example

{{6sTeamCard
|team=Epsilon
|image=Epsilon.jpeg
|imagesize=140x140px
|scout1=kileR4fuNN |scout1flag=pt
|scout2=basH. |scout2flag=de
|roamer=Tek |roamerflag=fr
|pocket=Mike |pocketflag=uk
|demoman=WARHURYEAH |demomanflag=uk
|medic=KnOxXx |medicflag=fr
|notes= 
}}
Epsilon
Scout  Portugal kileR4fuNN 
Scout  Germany basH.
Roamer  France Tek
Pocket  United Kingdom Mike
Demoman  United Kingdom WARHURYEAH
Medic  France KnOxXx


Code

Typical
{{6sTeamCard
|team=
|image=
|scout1= |scout1flag=
|scout2= |scout2flag=
|roamer= |roamerflag=
|pocket= |pocketflag=
|demoman= |demomanflag=
|medic= |medicflag=
|qualifier=
}}
All variables
{{6sTeamCard
|team=
|link=
|ref=
|image=
|imagesize=
|notes=
|scout1= |scout1flag= |rolescout1= |scout1team= |scout1teamimg=
|scout2= |scout2flag= |rolescout2= |scout2team= |scout2teamimg=
|roamer= |roamerflag= |roleroamer= |roamerteam= |roamerteamimg=
|pocket= |pocketflag= |rolepocket= |pocketteam= |pocketteamimg=
|demoman= |demomanflag= |roledemoman= |demomanteam= |demomanteamimg=
|medic= |medicflag= |rolemedic= |medicteam= |medicteamimg=
|coach= |coachflag= |rolecoach=
|qualifier=
}}