Hopp til innhold

Mal:Vant

Fra Wikipedia, den frie encyklopedi
(Omdirigert fra «Mal:Won»)
Vant
Maldokumentasjon

The templates in this series are designed to be used in a table to make a cell with text in that cell, with an appropriately colored background. They are commonly used in comparison tables. Most of these templates should not be used simply to produce a background color, use them according to their meaning.

For example, {{yes}} makes a cell with a green background. The text in the cell is taken from the first parameter; {{yes|Sure}} would output "Sure" otherwise it defaults to "Yes". Most templates allow authors to override the default text in this way, some require text put after the template call and some also need a vertical bar in between: {{table cell template}} text or {{table cell template}} | text. This information, the colors and default texts are found in the table below.

Mal:Warnsign If you want to use other attributes for the table cells, e.g. colspan, rowspan, or style, they need to be put before the template call, and there must be no vertical bar (aka pipe) | in-between them:

Ja Nei
colspan=2 style="border:solid 3px Maroon" Mal:Yes-No
...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 style="border:solid 3px Maroon" {{Yes-No}}
...

Templates

[rediger kilde]

Mal:Sticky header

Table cell templates
Class[1] Default Customized
Syntax Preview Syntax Preview
Mal:Tt {{rh}} Mal:Tt[2] Row header {{rh|align=right}} | Row header Row header
{{rh2}} Mal:Tt[2] Mal:Rh2 | Row header {{rh2|align=center}} | Row header Mal:Rh2 | Row header
Mal:Tt {{yes}} Ja {{yes|customized [[Plain text|text]]}} customized text
{{yes C}} Mal:Yes C {{yes C|customized [[Plain text|text]]}} Mal:Yes C
{{yes O}} Mal:Yes O {{yes O|customized [[Plain text|text]]}} Mal:Yes O
{{yes N}} Mal:Yes N {{yes N|customized [[Plain text|text]]}} Mal:Yes N
Mal:Tt {{maybe}} Tja {{maybe|customized [[Plain text|text]]}} customized text
Mal:Tt {{no}} Nei {{no|customized [[Plain text|text]]}} customized text
{{no O}} Mal:No O {{no O|customized [[Plain text|text]]}} Mal:No O
{{no X}} Mal:No X {{no X|customized [[Plain text|text]]}} Mal:No X
{{eliminated}} Mal:Eliminated {{eliminated|dropped out}} Mal:Eliminated
{{lost}} || {{lost|missing}} ||
{{active fire}}[3] Mal:Active fire {{active fire|12%}} Mal:Active fire
{{safe}} Mal:Safe {{safe|protected}} Mal:Safe
{{no Y}} Mal:No Y {{no Y|customized [[plain text|text]]}} Mal:No Y
Mal:Tt {{active}} Mal:Active {{active|live}} Mal:Active
Mal:Tt {{site active}} Mal:Site active {{site active|up}} Mal:Site active
{{coming soon}} Mal:Coming soon {{coming soon|second half of the year}} Mal:Coming soon
Mal:Tt {{site inactive}} Mal:Site inactive {{site inactive|down}} Mal:Site inactive
Mal:Tt {{success}} Mal:Success {{success|mission complete}} Mal:Success
{{operational}} Mal:Operational {{operational|returning data}} Mal:Operational
Mal:Tt {{failure}} Mal:Failure {{failure|wrong orbit}} Mal:Failure
Mal:Tt {{yes2}} {{yes2|text}} text
{{good}} Mal:Good {{good|A}} Mal:Good
{{ya}} Yes {{ya|text=ya}} ya
{{ya|Ya}} Ya {{ya|text|link=WP:ALT}} text
{{yan}} Mal:Yan {{yan|text=ya}} Mal:Yan
{{won}} Vant {{won|text=white|color=darkblue|winner}} winner
{{won|place=1}} Vant {{won|place=gold}} Vant
{{won|place=2}} Vant {{won|place=silver}} Vant
{{won|place=3}} Vant {{won|place=bronze}} Vant
{{WinDL}} Mal:WinDL {{WinDL|win}} Mal:WinDL
{{WinDL|res=D}} Mal:WinDL {{WinDL|res=draw}} Mal:WinDL
{{WinDL|res=L}} Mal:WinDL {{WinDL|res=loss}} Mal:WinDL
Mal:Tt {{no2}} {{no2|text}} text
{{na}} Mal:Na {{na|text=na}} Mal:Na
{{na|Na}} Mal:Na {{na|text|link=WP:ALT}} Mal:Na
{{nan}} Mal:Nan {{nan|text=na}} Mal:Nan
{{nom}} Nominert {{nom|5}} 5
{{notnom}} Mal:Notnom {{notnom|not selected}} Mal:Notnom
{{shortlisted}} Mal:Shortlisted {{shortlisted|proposed}} Mal:Shortlisted
{{longlisted}} Mal:Longlisted {{longlisted|rejected}} Mal:Longlisted
{{TBA}} TBA {{TBA|to be announced}} to be announced
Mal:Tt {{partial}} Partial {{partial|almost done}} almost done
{{Regional}} Mal:Regional {{Regional|Uyghur}} Mal:Regional
{{MaybeCheck}} Mal:MaybeCheck {{MaybeCheck|text=possibly}} Mal:MaybeCheck
{{MaybeCheck|possibly}} Mal:MaybeCheck {{MaybeCheck|text|link=WP:ALT}} Mal:MaybeCheck
{{partial success}} Mal:Partial success {{partial success|
reached orbit and returned pictures}}
Mal:Partial success
{{partial failure}} Mal:Partial failure {{partial failure|[[Cubesat]] not deployed}} Mal:Partial failure
{{okay}} Mal:Okay {{okay|C}} Mal:Okay
{{Yes-No}} Mal:Yes-No {{Yes-No|yes with an if; no with a but}} Mal:Yes-No
{{some}} Mal:Some {{some|many}} Mal:Some
{{pending}} Avventer {{pending|awaiting}} awaiting
{{sometimes}} Mal:Sometimes {{sometimes|occasionally}} Mal:Sometimes
{{rarely}} Mal:Rarely {{rarely|seldom}} Mal:Rarely
{{usually}} Mal:Usually {{usually|commonly}} Mal:Usually
{{unofficial}} Mal:Unofficial {{unofficial|''de facto''}} Mal:Unofficial
{{unofficial2}} Mal:Unofficial2 {{unofficial2|''de facto''}} Mal:Unofficial2
{{nonpartisan}} Mal:Nonpartisan {{nonpartisan|impartial}} Mal:Nonpartisan
Mal:Tt {{any}} Mal:Any {{any|anyone}} Mal:Any
Mal:Tt {{perhaps}} Mal:Perhaps {{perhaps|maybe}} Mal:Perhaps
Mal:Tt {{draw}} {{draw|1:1}} 1:1
Mal:Tt {{No attempt}} Mal:No attempt {{No attempt|No landing attempted}} Mal:No attempt
Mal:Tt {{n/a}} {{n/a|unavailable}} unavailable
{{varies}} Mal:Varies {{varies|differs}} Mal:Varies
{{non-album single}}[4] Mal:Non-album single {{non-album single|EP}} Mal:Non-album single
{{unreleased}} Ikke utgitt {{unreleased|shelved}} shelved
{{BLACK}} Mal:BLACK {{BLACK|banned}} Mal:BLACK
{{sdash}} Mal:Sdash {{sdash}} Mal:Sdash
{{vacant}} Mal:Vacant {{vacant|missing}} Mal:Vacant
Mal:Tt {{unknown}} Ukjent {{unknown|?}} ?
{{dunno}} ? {{dunno|not sure}} not sure
Mal:Tt {{included}} Mal:Included {{included|incorporated}} Mal:Included
Mal:Tt {{no result}} Mal:No result {{no result|NR}} Mal:No result
Mal:Tt {{planned}} Mal:Planned {{planned|July 2028}} Mal:Planned
Mal:Tt {{scheduled}} Mal:Scheduled {{scheduled|3 March 2027}} Mal:Scheduled
Mal:Tt[5] {{beta}} Mal:Beta {{beta|preview}} Mal:Beta
{{table-experimental}} Mal:Table-experimental {{table-experimental|lab}} Mal:Table-experimental
{{nightly}} Mal:Nightly {{nightly|dev}} Mal:Nightly
{{release-candidate}} Mal:Release-candidate {{release-candidate|RC}} Mal:Release-candidate
{{open source}} Mal:Open source {{open source|software libre}} Mal:Open source
{{free}} Mal:Free {{free|empty}} Mal:Free
{{proprietary}} Mal:Proprietary {{proprietary|custom extension}} Mal:Proprietary
{{nonfree}} Mal:Nonfree {{nonfree|paid}} Mal:Nonfree
{{needs}} Mal:Needs {{needs|req.}} Mal:Needs
Mal:Tt {{depends}} Mal:Depends {{depends|vendor-defined}} Mal:Depends
Mal:Tt {{dropped}} Mal:Dropped {{dropped|discontinued}} Mal:Dropped
{{terminated}} Mal:Terminated {{terminated|fired}} Mal:Terminated
Mal:Tt {{incorrect}} Mal:Incorrect {{incorrect|wrong}} Mal:Incorrect
Mal:Tt {{D-P}} Mal:D-P {{D-P|present}} Mal:D-P
{{D-A}} Mal:D-A {{D-A|absent}} Mal:D-A
{{D-I}} Mal:D-I {{D-I|invited}} Mal:D-I
{{D-O}} Mal:D-O {{D-O|other debate}} Mal:D-O
{{D-N}} Mal:D-N {{D-N|not invited}} Mal:D-N
{{D-Nv}} Mal:D-Nv {{D-Nv|not voting}} Mal:D-Nv
{{D-W}} Mal:D-W {{D-W|withdrawn}} Mal:D-W
{{D-Out}} Mal:D-Out {{D-Out|out of race}} Mal:D-Out
Mal:Tt[6] {{CMain}} Mal:CMain {{CMain|text}} Mal:CMain
{{CAlso starring}} Mal:CAlso starring {{CAlso starring|costar}} Mal:CAlso starring
{{CRecurring}} Mal:CRecurring {{CRecurring|regular guest}} Mal:CRecurring
{{CGuest}} Mal:CGuest {{CGuest|victim}} Mal:CGuest
{{COther}} Mal:COther {{COther|ensemble}} Mal:COther
{{CNone}} Vises ikke {{CNone|cast}} cast
{{CRemoved}} Mal:CRemoved {{CRemoved|edited}} Mal:CRemoved
{{CFinalist}} Mal:CFinalist {{CFinalist|contender}} Mal:CFinalist
{{CFinalist|place=3rd Place}} Mal:CFinalist {{CFinalist|place=third place}} Mal:CFinalist
{{exempt}} Mal:Exempt {{exempt|exe}} Mal:Exempt
{{Black Exempt}} Mal:Black Exempt {{Black Exempt|lack}} Mal:Black Exempt
{{nocontest}} Mal:Nocontest {{nocontest|rescheduled}} Mal:Nocontest
{{Runner-up}} Mal:Runner-up {{Runner-up|2nd Place}} Mal:Runner-up
{{Quit}} Mal:Quit {{Quit|left}} Mal:Quit
no class {{not yet}} Mal:Not yet {{not yet|NY}} Mal:Not yet
{{optional}} Mal:Optional {{optional|non-mandatory}} Mal:Optional
{{shade|100}}% Mal:Shade% {{shade|color=blue|100}}% Mal:Shade%
{{shade|75}}% Mal:Shade% {{shade|color=blue|75|73–78}}% Mal:Shade%
{{shade|25}}% Mal:Shade% {{shade|color=blue|25|{{val|25|2|u=%}}}} Mal:Shade
{{shade|0}}% Mal:Shade% {{shade|color=blue|0}}% Mal:Shade%
{{cell color|2|0|10}} Mal:Cell color {{cell color|5|0|10|FF0000|0000FF}} Mal:Cell color
{{CellCategory|1}} Mal:CellCategory {{CellCategory|1|Group A}} Mal:CellCategory
{{CellCategory|2}} Mal:CellCategory {{CellCategory|2|Group B|align=tc}} Mal:CellCategory
{{CellCategory|3}} Mal:CellCategory {{CellCategory|3|Group C|align=tr}} Mal:CellCategory
Type nummerering


Common code to most if not all the templates in this series:

style="background: #abcdef; color: black; vertical-align: middle; text-align: {{{align|center}}}; {{{style|text-transform: capitalize;}}}" class="automatic table-automatic"| {{{1|text}}}

Code specific to this template:

style="background: #99FF99; color: black; vertical-align: middle; text-align: center; " class="yes table-yes2"|Vant

Creating new templates

[rediger kilde]

To make a new table cell template you can use:

{{subst:Table cell templates|text= default text |bg= background color |class= a class name without prefix |align= standard horizontal alignment}}

You should leave out the align parameter and often the class parameter is unnecessary, too.

Add the new template to the table in the common documentation afterwards. Please consider reusing one of the other templates and please choose the color sensibly.

If you find a table cell template that does not take a parameter and you want to be able to change the text in the cell, do not duplicate the template! Instead, edit the template and change the text to a default parameter substitution. For example, if a template's text is Dropped, change that to {{{1|Dropped}}}.

style="background: #abcdef; color: black; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="automatic table-automatic"| {{{1|text}}}

Choosing a color

[rediger kilde]

When changing or creating a new template, follow the use of colour guidelines and the when choosing the background color and, sometimes, the text color. Many of these templates can be used with links to other articles or references, so the links should be clearly identifiable against the background color. You can check contrast level using the WebAIM contrast checker by setting the foreground color to the blue link color. Contrast should be at the minimum WCAG AA level and, whenever possible, at WCAG AAA level. Wikipedia:Manual of Style/Accessibility/Colors has a set of colors that comply with WCAG AAA and WCAG AA for unvisited links and normal text.

Color subpage

[rediger kilde]

All templates should either have a /bgcolor subpage that contains nothing but a valid CSS color code, possibly wrapped in nowiki tags, e.g. #BFD, which can be included with background: {{/bgcolor}}; in the style attribute, or they should reference another template's subpage, e.g. background: {{Template:Yes2/bgcolor}};. Alternatively, the /bgcolor subpage may redirect to another color code subpage: #REDIRECT [[yes2/bgcolor]].

This way, pages that are using these templates may also use {{legend}} and similar templates which can reference the actual color: {{legend|{{yes2/bgcolor}}|supported}}

TemplateData

[rediger kilde]
Dette er TemplateData-dokumentasjonen for denne malen brukt av VisualEditor og andre verktøy; see a monthly parameter usage report for this template in articles.

TemplateData for Vant

One of several templates for styling individual table cells with standard contents and colors.

Malparametre[Rediger maldata]

Denne malen foretrekker at parametrene formateres på én linje.

ParameterBeskrivelseTypeStatus
text1

text to be displayed instead of the default; if this doesn't work put the text after the template, possibly with a vertical bar | in between

Standard
(template dependent)
Innholdvalgfri
horizontal alignalign

text alignment inside the cell, either 'left', 'right', 'center' or 'justified'

Foreslåtte verdier
left center right justified
Standard
center
Strengvalgfri
stylestyle

a semicolon-separated list of additional CSS rules to be applied to the table cell

Standard
(template dependent)
Strengvalgfri
background colorcolor

a valid CSS color value or name to override the standard cell background, only available with some templates

Standard
(template dependent)
tekstlinjevalgfri

See also

[rediger kilde]
  • {{Change}} – calculates, displays and color-codes changes between two values
  • {{Cell color}} - Shaded cell based on value in a range with automatic text visibility
  • {{BSD-lic}} – specialized redirect for {{free}}
  • {{GPL-lic}} – specialized redirect for {{free}}
  • {{LGPL-lic}} – specialized redirect for {{free}}
  • {{Active}} / {{No result}} / {{Eliminated}} for Mal:C
  1. ^ The HTML class of table cell templates may be referenced in a user stylesheet to change appearance.
  2. ^ a b Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.
  3. ^ This template is related to Mal:WikiProject link.
  4. ^ This template is related to Mal:WikiProject link.
  5. ^ This group of templates is related to Mal:WikiProject link.
  6. ^ This group of templates is related to Mal:WikiProject link.