„Modul:Build bracket/Doku“ – Versionsunterschied
Erscheinungsbild
[gesichtete Version] | [gesichtete Version] |
Inhalt gelöscht Inhalt hinzugefügt
KKeine Bearbeitungszusammenfassung |
KKeine Bearbeitungszusammenfassung |
||
Zeile 6: | Zeile 6: | ||
<code><nowiki>{{#invoke:Build bracket|main| <weitere Parameter>}}</nowiki></code> |
<code><nowiki>{{#invoke:Build bracket|main| <weitere Parameter>}}</nowiki></code> |
||
--> |
--> |
||
<noinclude><!-- Das ist die en:WP-Beschreibung. bitte nicht aktiv einbinden! --> |
|||
== Usage == |
|||
{{#switch:{{NAMESPACE}} |
|||
| Module = |
|||
<pre style="overflow:auto"> |
|||
{{#invoke:Build bracket|main |
|||
| rounds = |
|||
| col1-headers = |
|||
| col1-matches = |
|||
| col2-headers = |
|||
| col2-matches = |
|||
... |
|||
| col1-col2-paths = |
|||
| col2-col3-paths = |
|||
... |
|||
}} |
|||
</pre> |
|||
| #default = |
|||
}} |
|||
Per [[MOS:ACCESS#Font size]] and [[MOS:SMALLFONT]], "avoid using smaller font sizes in elements that already use a smaller font size, such as infoboxes, navboxes and reference sections". Since this template's text is already reduced to 90% of the normal size, use of the {{tl|Small}} template or {{tag|small}} tags within this template produces a font size that is 77% of the page default, well below the 85% minimum specified in the linked guidelines. |
|||
}} |
|||
=== Parameters === |
|||
{| class="wikitable" |
|||
|- |
|||
! Parameter !! Description !! Default |
|||
|- |
|||
{{#switch:{{NAMESPACE}} |
|||
| Module = |
|||
{{!}} <code>rounds</code> {{!!}} number of rounds (columns). {{!!}} <code>1</code> |
|||
{{!-}} |
|||
{{!}} <code>autocol</code> {{!!}} set to <code>yes</code> to automatically set set maximum round to display based on entries. {{!!}} <code>no</code> |
|||
{{!-}} |
|||
{{!}} <code>rows</code> {{!!}} manually set the number of rows. {{!!}} Automatic |
|||
{{!-}} |
|||
{{!}} <code>teams-per-match</code> {{!!}} enter the number of teams in each match. Use <code>col<i>m</i>-teams-per-match</code> to set individual columns {{!!}} <code>2</code> |
|||
{{!-}} |
|||
{{!}} <code>col<i>m</i>-headers</code> {{!!}} (optional) enter the row numbers where headers are desired in column ''m''. Separate entries with <code>,</code>. Half integer values are allowed. {{!!}} Automatic |
|||
{{!-}} |
|||
{{!}} <code>col<i>m</i>-matches</code> {{!!}} enter the row numbers where a match is desired in column ''m''. Matches take up two rows by default. Separate entries with <code>,</code>. Half integer values are allowed. {{!!}} |
|||
{{!-}} |
|||
{{!}} <code>RD<i>mh</i>-hide</code> {{!!}} set to <code>yes</code> to hide the (alpha) ''h''th header and all matches beneath it in column ''m'' unless any of those entries are non empty. Useful for consolation matches. {{!!}} |
|||
{{!-}} |
|||
{{!}} <code>col<i>m</i>-col<i>m</i>+1-paths</code> {{!!}} enter the starting and ending row numbers, separated by <code>-</code>, from columns ''m'' and ''m''+1 where a path is desired. Separate entries with <code>,</code>. Half integer values are allowed. {{!!}} |
|||
{{!-}} |
|||
{{!}} <code>col<i>m</i>-col<i>m</i>+1-cross</code> {{!!}} enter the row number where paths intersect from column ''m'' to ''m''+1. {{!!}} |
|||
<!-- |
|||
{{!-}} |
|||
{{!}} <code>compact</code> {{!!}} set to <code>yes</code> to vertically condense the bracket. {{!!}} <code>no</code> |
|||
--> |
|||
{{!-}} |
|||
{{!}} <code>RD<i>m</i>-altname</code> {{!!}} Alternate name for <code>RD<i>m</i></code> (e.g., if <code><nowiki>|RD1-altname=first</nowiki></code>, then <code>first-team1</code> can be used instead of <code>RD1-team1</code>). Use <code>RD<i>mh</i>-altname</code> for cells under header ''mh''. {{!!}} |
|||
{{!-}} |
|||
{{!}} <code>text-altname</code> {{!!}} Alternate name for <code>RD<i>m</i>-text<i>k</i></code> (e.g., if <code><nowiki>|text-altname=details</nowiki></code>, then <code>RD<i>m</i>-details1</code> can be used instead of <code>RD<i>m</i>-text1</code>). {{!!}} |
|||
{{!-}} |
|||
{{!}} colspan=3 {{!}} |
|||
}} |
|||
|- |
|||
| <code>maxround</code> || final round to display. This parameter should be omitted unless it is less than the default value set by <code>rounds</code>. || |
|||
|- |
|||
| <code>minround</code> || first round to display. || <code>1</code> |
|||
|- |
|||
| <code>height</code> || the amount of vertical visibility desired for the bracket. Creates a vertical scroll bar. Enter a number with units (e.g., <code>30em</code> or <code>480px</code>). || |
|||
|- |
|||
| <code>col-spacing</code> || the amount of horizontal space between rounds. Enter as a plain number (e.g., <code>10</code> for 10px). || <code>5</code> |
|||
|- |
|||
| <code>seed-width</code> || the width of the cells for seeds. Plain numbers are assumed to be in px units (e.g., <code>25</code> for 25px <code>2em</code> for 2em) || <code>25</code> |
|||
|- |
|||
| <code>team-width</code> || the width of the cells for team names. Plain numbers are assumed to be in px units (e.g., <code>200</code> for 200px or <code>15em</code> for 15em) || <code>150</code> |
|||
|- |
|||
| <code>score-width</code> || the width of the cells for scores. Plain numbers are assumed to be in px units (e.g., <code>25</code> or 25px <code>2em</code> for 2em) || <code>25</code> |
|||
|- |
|||
| <code>agg-width</code> || the width of the cells for aggregate scores. <code>score-width</code> will change aggregate score widths unless this parameter is used. Plain numbers are assumed to be in px units (e.g., <code>25</code> or 25px <code>2em</code> for 2em) || <code>25</code> |
|||
|- |
|||
| <code>seeds</code> || set to <code>no</code> to omit seeds in in all matches. set to <code>yes</code> to show seed cells to show for all matches. || |
|||
|- |
|||
| <code>legs</code> || the number of legs for all rounds. Use <code>RD<i>m</i>-legs</code> to individually set columns. Use <code>RD<i>m</i>-legs<i>k</i></code> to individually set teams. || <code>1</code> |
|||
|- |
|||
| <code>autolegs</code> || set to <code>yes</code> to automatically generate score cells per team. If <code>legs</code> or <code>RD<i>m</i>-legs</code> is used, <code>autolegs</code> will be set to <code>no</code> .|| <code>no</code> |
|||
|- |
|||
| <code>byes</code> || set to <code>yes</code> to hide any team cells that are empty. Alternatively, set to <code>m</code> to have rounds <code>1</code> through <code>m</code> hide any team cells that are empty. Use <code>RD<i>m</i>-byes</code> for just matches under column ''m''. Use <code>RD<i>mh</i>-byes</code> for just matches under header ''h'' only in column ''m''. || <code>no</code> |
|||
|- |
|||
| <code>show-bye-paths</code> || set to <code>yes</code> to replace any team cells that that are hidden <code>byes</code> with a path. || <code>no</code> |
|||
|- |
|||
| <code>aggregate</code> || set to <code>yes</code> to add an aggregate score box to each match. Only matches with two or more legs will show the aggregate score box. || <code>no</code> |
|||
|- |
|||
| <code>boldwinner</code> || set to <code>yes</code> to automatically bold the seed/team/score with the higher score in each match. || <code>no</code> |
|||
|- |
|||
| <code>shift</code> || vertically shifts all of the entries by the number entered. Use <code>RD<i>m</i>-shift</code> for individual in columns. || <code>0</code> |
|||
|- |
|||
| colspan=3 | |
|||
|- |
|||
| <code>RD<i>m</i></code>, <code>RD<i>mh</i></code> || The header text of the (alpha ''h''th) header in column ''m'' (e.g., <code>RD1</code> or <code>RD1a</code> for the first header and <code>RD1b</code> for the second header in column 1). || |
|||
|- |
|||
| <code>RD<i>m</i>-seed<i>k</i></code> || The seed of the ''k''th team in column ''m''. Alternatively, use <code>RD<i>mh</i>-seed<i>k</i></code> for the ''k''th team under header ''mh''. || |
|||
|- |
|||
| <code>RD<i>m</i>-team<i>k</i></code> || The name of the ''k''th team in column ''m''. Alternatively, use <code>RD<i>mh</i>-team<i>k</i></code> for the ''k''th team under header ''mh''. || |
|||
|- |
|||
| <code>RD<i>m</i>-score<i>k</i></code> || The score of the ''k''th team in column ''m''. Alternatively, use <code>RD<i>mh</i>-score<i>k</i></code> for the ''k''th team under header ''mh''. Append the suffix <code>-<i>l</i></code> for the ''l''th leg or <code>-agg</code> for the aggregate score. || |
|||
|- |
|||
| <code>RD<i>m</i>-text<i>k</i></code> || The text above the ''k''th match in column ''m''. Alternatively, use <code>RD<i>mh</i>-text<i>k</i></code> for the ''k''th match under header ''mh''. || |
|||
|- |
|||
| <code>RD<i>m</i>-group<i>k</i></code> || The text for the ''k''th group in column ''m''. Group text will appear to the left of whenever two paths meet. || |
|||
|- |
|||
| <code>RD-shade</code> || the background color (in hex format, e.g. <code>#ABCDEF</code>) of all headers. Use <code>RD<i>m</i>-shade</code> or <code>RD<i>mh</i>-shade</code> for individual headers. || <code>#F2F2F2</code> |
|||
|- |
|||
| <code>RD<i>m</i>-RD(<i>m</i>+1)-path</code> || set to <code>no</code> or <code>0</code> to omit the paths from round ''m'' to round ''m''+1. || <code>yes</code> |
|||
|- |
|||
| <code>paramstyle</code> || set to <code>numbered</code> change the parameter name style of <code>RD<i>m</i>-text<i>k</i></code>, <code>RD<i>m</i>-seed<i>k</i></code>, <code>RD<i>m</i>-team<i>k</i></code>, and <code>RD<i>m</i>-score<i>k</i></code> to a numbered notation (<code><nowiki>|1=</nowiki></code><code><nowiki>|2=</nowiki></code>...). Set <code><nowiki>|seeds=yes</nowiki></code> add seeds. || <code>indexed</code> |
|||
|} |
|||
=== Parameter hierarchy === |
|||
*Whenever there are multiple headers in a single column, more than one parameter may be assigned to a cell value. For example, in the following bracket, both <code><nowiki>|RD1-team3</nowiki></code> and <code><nowiki>|RD1b-team</nowiki></code> can be used to assign the third team in the first column. By default, entries with subheader prefixes will override those without. In the below example, <code>RD1b-team1</code> will override any value that has been set by <code>RD1-team3</code>. |
|||
{{#invoke:Build bracket|main |
|||
| rounds = 1 |
|||
| col1-headers = 1,6 |
|||
| col1-matches = 3,8 |
|||
| RD1 = Upper round |
|||
| RD1b = Lower round |
|||
| RD1-team3 = <code>RD1-team3</code> or <code>RD1b-team1</code> |
|||
}} |
|||
*Parameters used in articles take precedence over parameters used in the template itself. For example, suppose ArticleX used the template NTeamBracket, and suppose NTeamBracket had the parameter <code><nowiki>|RD1-seed1=1</nowiki></code> set. If ArticleX implemented <code><nowiki>{{NTeamBracket|RD1-seed1=2}}</nowiki></code>, then the first team in round 1 would have a seed of 2. |
|||
{{#switch:{{NAMESPACE}} |
|||
| Module = |
|||
=== Path codes === |
|||
Path codes are entered in the form <code>a-b</code>, where <code>a</code> is associated match in the first column, and <code>b</code> is associated match in the second column. Path codes can be grouped; for example, <code>(a,b)-c</code> is equivalent to <code>a-c, b-c</code>. To add color, append <code>:''color''</code> to the end of a path, e.g. <code>3-5:red</code>. Only one extra color can be used in a bracket. |
|||
{{wikitable| class="wikitable" |
|||
|- |
|||
! Example !! Output |
|||
|- |
|||
|<code>1-3</code> |
|||
| {{#invoke:Build bracket|main|rounds=2|noheaders=yes|col1-matches=1|col2-matches=3|col1-col2-paths=1-3}} |
|||
|- |
|||
|<code>(1,5)-3</code> |
|||
| {{#invoke:Build bracket|main|rounds=2|noheaders=yes|col1-matches=1,5|col2-matches=3|col1-col2-paths=(1,5)-3}} |
|||
|- |
|||
|<code>3-1,3-5:red</code> |
|||
| {{#invoke:Build bracket|main|rounds=2|noheaders=yes|col1-matches=3|col2-matches=1,5|col1-col2-paths=3-1,3-5:red}} |
|||
}} |
|||
}} |
|||
</noinclude> |
Aktuelle Version vom 8. Dezember 2024, 17:11 Uhr
Modul für turnierpläne.
Usage
[Quelltext bearbeiten]Per and , "avoid using smaller font sizes in elements that already use a smaller font size, such as infoboxes, navboxes and reference sections". Since this template's text is already reduced to 90% of the normal size, use of the {{Small}} template or Vorlage:Tag tags within this template produces a font size that is 77% of the page default, well below the 85% minimum specified in the linked guidelines. }}
Parameters
[Quelltext bearbeiten]Parameter | Description | Default |
---|---|---|
maxround |
final round to display. This parameter should be omitted unless it is less than the default value set by rounds . |
|
minround |
first round to display. | 1
|
height |
the amount of vertical visibility desired for the bracket. Creates a vertical scroll bar. Enter a number with units (e.g., 30em or 480px ). |
|
col-spacing |
the amount of horizontal space between rounds. Enter as a plain number (e.g., 10 for 10px). |
5
|
seed-width |
the width of the cells for seeds. Plain numbers are assumed to be in px units (e.g., 25 for 25px 2em for 2em) |
25
|
team-width |
the width of the cells for team names. Plain numbers are assumed to be in px units (e.g., 200 for 200px or 15em for 15em) |
150
|
score-width |
the width of the cells for scores. Plain numbers are assumed to be in px units (e.g., 25 or 25px 2em for 2em) |
25
|
agg-width |
the width of the cells for aggregate scores. score-width will change aggregate score widths unless this parameter is used. Plain numbers are assumed to be in px units (e.g., 25 or 25px 2em for 2em) |
25
|
seeds |
set to no to omit seeds in in all matches. set to yes to show seed cells to show for all matches. |
|
legs |
the number of legs for all rounds. Use RDm-legs to individually set columns. Use RDm-legsk to individually set teams. |
1
|
autolegs |
set to yes to automatically generate score cells per team. If legs or RDm-legs is used, autolegs will be set to no . |
no
|
byes |
set to yes to hide any team cells that are empty. Alternatively, set to m to have rounds 1 through m hide any team cells that are empty. Use RDm-byes for just matches under column m. Use RDmh-byes for just matches under header h only in column m. |
no
|
show-bye-paths |
set to yes to replace any team cells that that are hidden byes with a path. |
no
|
aggregate |
set to yes to add an aggregate score box to each match. Only matches with two or more legs will show the aggregate score box. |
no
|
boldwinner |
set to yes to automatically bold the seed/team/score with the higher score in each match. |
no
|
shift |
vertically shifts all of the entries by the number entered. Use RDm-shift for individual in columns. |
0
|
RDm , RDmh |
The header text of the (alpha hth) header in column m (e.g., RD1 or RD1a for the first header and RD1b for the second header in column 1). |
|
RDm-seedk |
The seed of the kth team in column m. Alternatively, use RDmh-seedk for the kth team under header mh. |
|
RDm-teamk |
The name of the kth team in column m. Alternatively, use RDmh-teamk for the kth team under header mh. |
|
RDm-scorek |
The score of the kth team in column m. Alternatively, use RDmh-scorek for the kth team under header mh. Append the suffix -l for the lth leg or -agg for the aggregate score. |
|
RDm-textk |
The text above the kth match in column m. Alternatively, use RDmh-textk for the kth match under header mh. |
|
RDm-groupk |
The text for the kth group in column m. Group text will appear to the left of whenever two paths meet. | |
RD-shade |
the background color (in hex format, e.g. #ABCDEF ) of all headers. Use RDm-shade or RDmh-shade for individual headers. |
#F2F2F2
|
RDm-RD(m+1)-path |
set to no or 0 to omit the paths from round m to round m+1. |
yes
|
paramstyle |
set to numbered change the parameter name style of RDm-textk , RDm-seedk , RDm-teamk , and RDm-scorek to a numbered notation (|1= |2= ...). Set |seeds=yes add seeds. |
indexed
|
Parameter hierarchy
[Quelltext bearbeiten]- Whenever there are multiple headers in a single column, more than one parameter may be assigned to a cell value. For example, in the following bracket, both
|RD1-team3
and|RD1b-team
can be used to assign the third team in the first column. By default, entries with subheader prefixes will override those without. In the below example,RD1b-team1
will override any value that has been set byRD1-team3
.
Upper round | |||
Lower round | |||
RD1-team3 or RD1b-team1 | |||
- Parameters used in articles take precedence over parameters used in the template itself. For example, suppose ArticleX used the template NTeamBracket, and suppose NTeamBracket had the parameter
|RD1-seed1=1
set. If ArticleX implemented{{NTeamBracket|RD1-seed1=2}}
, then the first team in round 1 would have a seed of 2.