Template:Football box: Difference between revisions

From TLAwiki
Content added Content deleted
(Created page with "{{#invoke:football box|main}}<noinclude>{{Documentation}}</noinclude>")
 
No edit summary
 
Line 1: Line 1:
<div itemscope itemtype="http://schema.org/SportsEvent" style="{{#if:{{{size|}}}|width: {{{size}}};}} {{#if:{{{bg|}}}|background-color: {{{bg}}};}} clear: both; overflow: auto;" {{#if:{{{id|}}}|id={{#ifeq:{{str_sub|{{{id}}}|0|1}}|" |{{{id|}}}|"{{{id}}}"}} }}>
{{#invoke:football box|main}}<noinclude>{{Documentation}}</noinclude>
{{#if:{{{event|}}}|
<div style="text-align: center; font-weight: bold;">{{{event}}}</div>
}}<!--<meta itemprop="name" content="{{{team1}}} v {{{team2}}}" />-->
<div class="mobile-float-reset" style="float: left; width: 15%; padding: 2px 0; overflow: auto;"><time {{#iferror:{{#time:c|{{delink|{{{date}}} {{{time|}}}}}}}||itemprop="startDate" datetime="{{#time:c|{{delink|{{{date}}} {{{time|}}}}}}}"}} style="display: block; overflow: auto;"><span class="mobile-float-reset" style="display: block; float: right;">{{{date}}}</span>{{#if:{{{time|}}}|<span class="mobile-float-reset" style="display: block; clear: right; float: right;">{{{time}}}</span>}}</time>{{#if:{{{round|}}}|<div class="mobile-float-reset" style="clear: right; float: right;">{{{round}}}</div>}}</div>

{| style="float: left; width: 61%; table-layout: fixed; text-align: center;"
|- itemprop="name" style="vertical-align: top;"
! style="width: 39%; text-align: right;" itemprop="homeTeam" itemscope itemtype="http://schema.org/SportsTeam" | <span itemprop="name">{{{team1}}}</span>
! style="width: 22%;" | {{#if:{{{score1|}}}{{{score2|}}}|{{{score1|0}}}&ndash;{{{score2|0}}}|{{#if:{{{score|}}}|{{{score}}}|v }}}} {{#if:{{{aet|}}}|({{w|Overtime (sports)#Association football|a.e.t.}}) }}
! style="width: 39%; text-align: left;" itemprop="awayTeam" itemscope itemtype="http://schema.org/SportsTeam" | <span itemprop="name">{{{team2}}}</span>
|- style="vertical-align: top; font-size: 85%;"
| style="text-align: right;" | {{#ifeq:{{str_sub|{{{goals1}}}|0|1}}|* |{{plainlist|{{#invoke:MultiReplace|main|{{{goals1}}}|%[%[ *([%?-]) *%]%]|%1|%[%[ *[%?-] *{{!}} *(.-) *%]%]|%1}}}} |{{#invoke:MultiReplace|main|{{{goals1|}}}|%[%[ *([%?-]) *%]%]|%1|%[%[ *[%?-] *{{!}} *(.-) *%]%]|%1}}}}
| {{#ifeq:{{str_sub|{{{report}}}|0|4}}|http |[{{{report}}} Report] |{{{report|}}}}}
| style="text-align: left;" | {{#ifeq:{{str_sub|{{{goals2}}}|0|1}}|* |{{plainlist|{{#invoke:MultiReplace|main|{{{goals2}}}|%[%[ *([%?-]) *%]%]|%1|%[%[ *[%?-] *{{!}} *(.-) *%]%]|%1}}}} |{{#invoke:MultiReplace|main|{{{goals2|}}}|%[%[ *([%?-]) *%]%]|%1|%[%[ *[%?-] *{{!}} *(.-) *%]%]|%1}}}}
{{#if:{{{penaltyscore|}}}|
{{!}}-
! colspan="3" {{!}} {{w|Penalty shoot-out (association football)|Penalties}}
{{!}}- style="vertical-align: top; font-size: 85%;"
{{!}} style="text-align: right;" {{!}} {{#ifeq:{{str_sub|{{{penalties1}}}|0|1}}|* |{{plainlist|{{#invoke:MultiReplace|main|{{{penalties1}}}|%[%[ *([%?-]) *%]%]|%1|%[%[ *[%?-] *{{!}} *(.-) *%]%]|%1}}}} |{{#invoke:MultiReplace|main|{{{penalties1|}}}|%[%[ *([%?-]) *%]%]|%1|%[%[ *[%?-] *{{!}} *(.-) *%]%]|%1}}}}
! {{{penaltyscore}}}
{{!}} style="text-align: left;" {{!}} {{#ifeq:{{str_sub|{{{penalties2}}}|0|1}}|* |{{plainlist|{{#invoke:MultiReplace|main|{{{penalties2}}}|%[%[ *([%?-]) *%]%]|%1|%[%[ *[%?-] *{{!}} *(.-) *%]%]|%1}}}} |{{#invoke:MultiReplace|main|{{{penalties2|}}}|%[%[ *([%?-]) *%]%]|%1|%[%[ *[%?-] *{{!}} *(.-) *%]%]|%1}}}}
}}
|}

<div class="mobile-float-reset" style="float: left; font-size: 85%; width: 24%; padding: 2px 0;">
{{#if:{{{stadium|}}}|<div itemprop="location" itemscope itemtype="http://schema.org/Place">{{#if:{{{location|}}}|<span itemprop="name">{{{stadium}}}</span>, <span itemprop="address">{{{location}}}</span>|<span itemprop="name address">{{{stadium}}}</span>}}</div>}}{{#if:{{{attendance|}}}|<div>Attendance: {{{attendance}}}</div>}}{{#if:{{{referee|}}}|<div>Referee: {{{referee}}}</div>}}
</div>
</div>

Latest revision as of 08:32, 3 August 2020

{{{team1}}} v {{{team2}}}