Template:Footballbox: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{| style="width:{{{size|100%}}}; background: {{{bg|transparent}}};" cellspacing="0"  
<div style="width: {{{size|100%}}}; background-color: {{{bg|transparent}}}; clear:both" class="vevent" {{#if:{{{id|}}}|id={{#ifeq:{{str_sub|{{{id}}}|0|1}}|" |{{{id|}}}|"{{{id}}}"}} }}>
|-
{{#if:{{{event|}}}|<div style="text-align: center">'''{{{event}}}'''</div>
|width=15% valign=top align=right rowspan=3|{{ #if: {{{date|}}} | {{{date}}} | }} {{ #if: {{{time|}}} |<br /> {{{time}}} | }}{{ #if: {{{round|}}} |<br /> {{{round}}} | }}  
}}<span class="summary" style="display: none;">{{{team1}}} v {{{team2}}}</span>
|width=24% valign=top align=right|'''{{{team1}}}'''
{| style="float:left; width:15%; table-layout:fixed"
|width=13% valign=top align=center|'''{{{score}}}'''
|<div style="text-align:right">{{#if:{{{date|}}}|{{{date}}} }}<br />{{#if:{{{time|}}}|{{{time}}}<br />| }}{{#if:{{{round|}}}|{{{round}}} }}</div>
|width=24% valign=top|'''{{{team2}}}'''
|}
|style=font-size:85% rowspan=2 valign=top|{{ #if: {{{stadium|}}} | {{{stadium}}} | }} {{ #if: {{{attendance|}}} |<br /> Attendance: {{{attendance}}} | }}{{ #if: {{{referee|}}} |<br /> Referee: {{{referee}}} | }}
{| style="float:left; width:61%; table-layout:fixed; text-align:center"
|- style=font-size:85%
|- style="vertical-align:top"
|valign=top align=right|{{ #if: {{{goals1|}}} | {{{goals1}}} | }}  
{{#if:{{{scorersonly|}}}||
|valign=top align=center|{{ #if: {{{report|}}} | {{{report}}} | }}  
! style="width:39%; text-align:right" class="vcard attendee" {{!}} <span class="fn org">{{{team1}}}</span>
|valign=top|{{ #if: {{{goals2|}}} | {{{goals2}}} | }}
! style="width:22%; text-align:center" {{!}} {{#if:{{{score|}}}|{{{score}}}|{{#ifeq:{{{amorian|}}}|{{{amorian}}}|vs.|v}}}}{{#if:{{{aet|}}}|{{#ifeq:{{{amorian|}}}|{{{amorian}}}|<br>([[wikipedia:Overtime (sports)#American and Canadian football|F/OT]])|<br>([[wikipedia:Overtime (sports)#Association football|a.e.t.]])}}}}
|}<noinclude>
! style="width:39%; text-align:left" class="vcard attendee" {{!}} <span class="fn org">{{{team2}}}</span>}}
 
|- style="vertical-align:top;font-size:85%"
== Usage ==
| style="text-align:right| {{#ifeq:{{str_sub|{{{goals1}}}|0|1}}|* |{{plainlist|{{{goals1}}}}} |{{{goals1|}}}}}
 
| style="text-align:center" | {{#ifeq:{{str_sub|{{{report}}}|0|4}}|http |[{{{report}}} Report] |{{{report|}}}}}
<pre>{{footballbox
| style="text-align:left"  | {{#ifeq:{{str_sub|{{{goals2}}}|0|1}}|* |{{plainlist|{{{goals2}}}}} |{{{goals2|}}}}}
|date =
{{#if:{{{penaltyscore|}}}|
|time =
{{!}}-
|team1 =
{{!}} &nbsp;
|score =
! style="text-align:center" {{!}} [[wikipedia:Penalty shoot-out (association football)|Penalties]]
|report =
{{!}} &nbsp;
|team2 =
{{!}}- style=vertical-align:top;font-size:85%
|goals1 =
{{!}} style="text-align:right"  {{!}} {{#ifeq:{{str_sub|{{{penalties1}}}|0|1}}|* |{{plainlist|{{{penalties1}}}}} |{{{penalties1|}}}}}
|goals2 =
! style="text-align:center" {{!}} {{{penaltyscore}}}
|stadium =
{{!}} style="text-align:left"  {{!}} {{#ifeq:{{str_sub|{{{penalties2}}}|0|1}}|* |{{plainlist|{{{penalties2}}}}} |{{{penalties2|}}}}} }}
|attendance =
|}
|referee =
{| style="float:left; width:24%; table-layout:fixed"
}}
|<div style="font-size: 85%">{{#if:{{{stadium|}}}|<span class="location">{{{stadium}}}</span> }}{{#if:{{{attendance|}}}|<br />Attendance: {{{attendance}}}}}{{#if:{{{referee|}}}|<br />Referee: {{{referee}}}}}{{#if:{{{referees|}}}|<br />Referees: {{{referees}}}}}</div>
 
|}{{clear}}</div><noinclude>{{Documentation}}<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS --></noinclude><noinclude>[[Category: Football templates]]</noinclude>
{{penshootoutbox
|penalties1 =
|penaltyscore =
|penalties2 =
}}</pre>
[[Category:Football templates]]
</noinclude>

Latest revision as of 00:57, 25 July 2020


{{{team1}}} v {{{team2}}}
[edit] [purge] Template documentation

Usage

All attributes are optional.

{{Football box
|id           =
|amorian      = <!-- if enabled, uses Americanisms like "vs." and "F/OT" -->
|date         = <!-- {{Start date|YYYY|MM|DD|df=y}} -->
|time         =
|event        =
|round        =
|team1        =
|score        =
|aet          =
|report       =
|team2        =
|goals1       =
|goals2       =
|stadium      =
|attendance   =
|referee      =
|referees     = <!-- If there are multiple referees -->
|penalties1   =
|penaltyscore =
|penalties2   =
|size         = <!-- changes the width; use a percentage; include "%" after the percentage; default is "100%" -->
|bg           = <!-- changes the background color; use a hex color code; include "#" before the hex color code; default is "transparent" -->
}}

Example

{{footballbox
|date = 13 August 2017
|team1 = Senya [[File:Senya flag.png|25px|border|Senya]]
|score =1 – 2
|team2 = [[File:Tellia flag.png|25px|border|Tellia]] Tellia
|goals1 = [[Alesandrœ Danetskë|Danetskë]] {{goal|36}}
|goals2 = [[Sezer Özker|Özker]] {{goal|2}}<br>[[Marko Zajc|Zajc]] {{goal|42}}
|stadium = [[The Snakepit]], [[Svorgas]]
}}

produces:

13 August 2017
Senya Senya 1 – 2 Tellia Tellia
Danetskë Goal 36' Özker Goal 2'
Zajc Goal 42'