Difference between revisions of "Template:Match2on2"

From QWiki
(Creating sibling template to {{match}} and {{matchAbbr}} for additional Spotlight options)
 
m (Added info= parameter (as other Match templates have))
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{| style="width:97%;margin: 0 0 10px 10px;"
+
<includeonly>{{#if: {{{info|}}} | <div style="width:100%;text-align: center;margin-bottom:-14px;"><span style="background-color:#f0eee6;color:#444;border-radius:2px;border:1px solid #dedacf;vertical-align:text-top;padding-bottom:1px;font-size:75%;">&nbsp;&nbsp;{{{info}}}&nbsp;&nbsp;</span></div> | }}
| style="width:48%;height:24px;color:#337ab7;" |{{#if:{{{1|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{1}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{flag/tbd}}&nbsp;</span>}}[[{{{2|}}}]] & [[{{{3|}}}]]
+
{| style="width:100%;border: 1px solid #DEDACF;margin-bottom:-1px;"
 +
| style="width:48%;height:24px;padding: 0.5em 0 0.5em 0.8em;color:#337ab7;" |{{#if:{{{1|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{1}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{flag/tbd}}&nbsp;</span>}}[[{{{2|}}}]] & [[{{{3|}}}]]
 
| style="width:4%;font-size:75%;" |vs.
 
| style="width:4%;font-size:75%;" |vs.
| style="width:48%;text-align:right;color:#337ab7;" |{{#if:{{{4|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{4}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{flag/tbd}}&nbsp;</span>}}[[{{{5|}}}]] & [[{{{6|}}}]]
+
| style="width:48%;text-align:right;padding: 0.5em 0.5em 0.5em 0.8em;color:#337ab7;" |{{#if:{{{4|}}}|<span style="white-space:nowrap;">{{flag/{{lc:{{{4}}}}}}}&nbsp;</span>|<span style="white-space:nowrap;">{{flag/tbd}}&nbsp;</span>}}[[{{{5|}}}]] & [[{{{6|}}}]]
|- style="vertical-align:middle; font-size:11px; height:16px; margin-top:3px;border-top:1px solid #DEDACF;"
+
|- style="vertical-align:middle; font-size:11px; height:16px; margin-top:3px;border-top:1px solid #DEDACF;background-color:#F0EEE6;"
 
{{#vardefine:timezone|{{#explode:{{#explode:{{{date|}}}|data-tz="|1}}|"|0}}}}
 
{{#vardefine:timezone|{{#explode:{{#explode:{{{date|}}}|data-tz="|1}}|"|0}}}}
| style="width:50%; white-space:nowrap;" | {{#if:{{{date|}}}|<div class=""><span class="datetime" style="visibility:hidden;font-size: 1px;">{{{date}}}</span><span class="countdown" style="float:left;"></span> {{#ifeq:{{{finished|}}}|true|{{{date}}}|{{#if:{{{stream|}}}|<span class="twitchlink" style="float:left;margin-left:5px;color:#6745A6;white-space:nowrap;">&#8594;  [http://twitch.tv/{{{stream|}}} {{{stream|}}}]{{#if:{{{stream2|}}}|<span class="twitchlink" style="color:#6745A6;white-space:nowrap;">, [http://twitch.tv/{{{stream2|}}} {{{stream2|}}}]</span>|}}</span>|}}}}</div>}}
+
| style="width:50%; white-space:nowrap;padding: 0.5em 0.5em 0.5em 0.8em;" | {{#if:{{{date|}}}|<div class=""><span class="datetime" style="visibility:hidden;font-size: 1px;">{{{date}}}</span><span class="countdown" style="float:left;"></span> {{#ifeq:{{{finished|}}}|true|{{{date}}}|{{#if:{{{stream|}}}|<span class="twitchlink" style="float:left;margin-left:5px;color:#6745A6;white-space:nowrap;">&#8594;  [http://twitch.tv/{{{stream|}}} {{{stream|}}}]{{#if:{{{stream2|}}}|<span class="twitchlink" style="color:#6745A6;white-space:nowrap;">, [http://twitch.tv/{{{stream2|}}} {{{stream2|}}}]</span>|}}</span>|}}}}</div>}}
| colspan="2" style="width:50%;text-align:right;overflow:hidden; text-overflow:ellipsis; max-width: 170px; vertical-align:middle; white-space:nowrap; font-size:11px; height:16px; margin-top:3px;" | {{#if:{{{event|}}}|[[{{{event|}}}]]|}}
+
| colspan="2" style="width:50%;text-align:right;overflow:hidden; text-overflow:ellipsis; max-width: 170px; vertical-align:middle; white-space:nowrap; font-size:11px; height:16px; margin-top:3px;padding-right:0.8em" | {{#if:{{{event|}}}|[[{{{event|}}}]]|}}
|}&#10;</includeonly><noinclude>[[Category:Templates]]{{documentation}}</noinclude>
+
|}&#10;</includeonly><noinclude>[[Category:Templates]]</noinclude><noinclude>{{documentation}}</noinclude>

Latest revision as of 09:59, 16 April 2021

Documentation (view - edit)

Used to put an upcoming match in the spotlight on the startpage.

This particular template displays 2 individual players with a common flag.

  • For a version with player/teamname + an array of players, see {{MatchAbbr}}.
  • For a version with only playername/teamname, see {{Match}}.

Example

The code:

{{match2on2|fi|fifi|fix|pl|insane|avenger|date=25 February 2022 20:00|event=Money for nothin and gibs for free|stream=Link}}

gives us:

Game in spotlight

Finland fifi & fix vs. Poland insane & avenger
Link
Money for nothin and gibs for free


Tournaments

Upcoming
-webkit-baseline-middle Upcoming tournament 1 ?
-webkit-baseline-middle Upcoming tournament 2 ?