No
Dokumentacija za predlogo[poglej] [uredi] [zgodovina] [osveži]

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.

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.

Predloga: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:

Da Ne N/A
da/ne
...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 style="border:solid 3px Maroon" {{Yes-No}}
...

Predloge uredi

Table cell templates
Class[1] Default syntax Preview (default) Customized syntax Preview (customized)
table-rh {{rh}} | Row header[2] Row header {{rh|align=right}} | Row header Row header
{{rh2}} | Row header[2] Predloga:Rh2 | Row header {{rh2|align=right}} | Row header Predloga:Rh2 | Row header
table-yes {{yes}} Da {{yes|customized [[plain text|text]]}} customized text
{{yes C}} Predloga:Yes C {{yes C}} Predloga:Yes C
{{yes O}} Predloga:Yes O {{yes O}} Predloga:Yes O
table-maybe {{maybe}} Mogoče {{maybe|customized [[plain text|text]]}} customized text
table-no {{no}} Ne {{no|customized [[plain text|text]]}} customized text
{{no O}} Predloga:No O {{no O}} Predloga:No O
{{no X}} Predloga:No X {{no X}} Predloga:No X
{{eliminated}} Predloga:Eliminated {{eliminated|dropped out}} Predloga:Eliminated
{{active fire|12%}} Predloga:Active fire
{{lost}} Predloga:Lost {{lost|missing}} Predloga:Lost
{{safe}} Predloga:Safe {{safe|protected}} Predloga:Safe
table-active {{active}} Predloga:Active {{active|live}} Predloga:Active
table-siteactive {{site active}} Predloga:Site active {{site active|up}} Predloga:Site active
{{coming soon}} Predloga:Coming soon {{coming soon|second half of the year}} Predloga:Coming soon
table-siteinactive {{site inactive}} Predloga:Site inactive {{site inactive|down}} Predloga:Site inactive
table-yes2 {{good}} Dobro {{good|A}} A
{{yes2}} {{yes2|text}} text
{{ya}} Da {{ya|text=ya}} ya
{{ya|Ya}} Ya {{ya|text|link=WP:ALT}} text
{{won}} Osvojil/a {{won|text=white|color=darkblue|winner}} winner
{{won|place=1}} 1 {{won|place=gold}} gold
{{won|place=2}} 2 {{won|place=silver}} silver
{{won|place=3}} 3 {{won|place=bronze}} bronze
{{WinDL}} Predloga:WinDL {{WinDL|win}} Predloga:WinDL
{{WinDL|res=D}} Predloga:WinDL {{WinDL|res=draw}} Predloga:WinDL
{{WinDL|res=L}} Predloga:WinDL {{WinDL|res=loss}} Predloga:WinDL
table-no2 {{no2}} {{no2|text}} text
{{na}} No {{na|text=na}} na
{{na|Na}} Na {{na|text|link=WP:ALT}} text
{{nom}} Nominiran/a {{nom|5}} 5
{{sho}} Ožji izbor {{sho|proposed}} proposed
{{longlisted}} Predloga:Longlisted {{longlisted|rejected}} Predloga:Longlisted
{{TBA}} Predloga:TBA {{TBA|to be announced}} Predloga:TBA
table-success {{success}} Predloga:Success {{success|mission complete}} Predloga:Success
{{operational}} Predloga:Operational {{operational|returning data}} Predloga:Operational
table-failure {{failure}} Predloga:Failure {{failure|wrong orbit}} Predloga:Failure
table-partial {{partial}} deloma {{partial|almost done}} almost done
{{Regional}} Predloga:Regional {{Regional|Uyghur}} Predloga:Regional
{{MaybeCheck}} Predloga:MaybeCheck {{MaybeCheck|text=possibly}} Predloga:MaybeCheck
{{MaybeCheck|possibly}} Predloga:MaybeCheck {{MaybeCheck|text|link=WP:ALT}} Predloga:MaybeCheck
{{partial success}} Predloga:Partial success {{partial success|reached orbit and returned pictures}} Predloga:Partial success
{{partial failure}} Predloga:Partial failure {{partial failure|[[Cubesat]] not deployed}} Predloga:Partial failure
{{okay}} Predloga:Okay {{okay|C}} Predloga:Okay
{{Yes-No}} da/ne {{Yes-No|yes with an if; no with a but}} yes with an if; no with a but
{{some}} Predloga:Some {{some|many}} Predloga:Some
{{nonpartisan}} Predloga:Nonpartisan {{nonpartisan|impartial}} Predloga:Nonpartisan
{{pending}} Poteka {{pending|awaiting}} awaiting
{{unofficial}} Predloga:Unofficial {{unofficial|''de facto''}} Predloga:Unofficial
{{unofficial2}} Predloga:Unofficial2 {{unofficial2|''de facto''}} Predloga:Unofficial2
{{usually}} Predloga:Usually {{usually|commonly}} Predloga:Usually
{{rarely}} Predloga:Rarely {{rarely|seldom}} Predloga:Rarely
{{sometimes}} Predloga:Sometimes {{sometimes|occasionally}} Predloga:Sometimes
table-noAttempt {{No attempt}} Predloga:No attempt {{No attempt|No landing attempted}} Predloga:No attempt
table-any {{any}} Predloga:Any {{any|anyone}} Predloga:Any
table-na {{n/a}} N/A {{n/a|unavailable}} unavailable
{{varies}} Predloga:Varies {{varies|differs}} Predloga:Varies
{{sdash}} {{sdash|[[File:Dash.svg|13px|link=|dash icon]]}} dash
{{BLACK}} N/A {{BLACK|banned}} banned
{{non-album single}} Predloga:Non-album single {{non-album single|EP}} Predloga:Non-album single
{{unreleased}} Predloga:Unreleased {{unreleased|shelved}} Predloga:Unreleased
table-unknown {{unknown}} Neznano {{unknown|?}} ?
{{dunno}} ? {{dunno|not sure}} not sure
table-automatic {{perhaps}} Predloga:Perhaps {{perhaps|maybe}} Predloga:Perhaps
table-depends {{depends}} Predloga:Depends {{depends|vendor-defined}} Predloga:Depends
table-included {{included}} Predloga:Included {{included|incorporated}} Predloga:Included
table-dropped {{dropped}} Predloga:Dropped {{dropped|discontinued}} Predloga:Dropped
{{terminated}} Predloga:Terminated {{terminated|fired}} Predloga:Terminated
table-software {{beta}} Predloga:Beta {{beta|preview}} Predloga:Beta
{{table-experimental}} Predloga:Table-experimental {{table-experimental|lab}} Predloga:Table-experimental
{{open source}} Predloga:Open source {{open source|software libre}} Predloga:Open source
{{free}} Predloga:Free {{free|empty}} Predloga:Free
{{proprietary}} Predloga:Proprietary {{proprietary|custom extension}} Predloga:Proprietary
{{nonfree}} Predloga:Nonfree {{nonfree|paid}} Predloga:Nonfree
{{needs}} Predloga:Needs {{needs|req.}} Predloga:Needs
{{nightly}} Predloga:Nightly {{nightly|dev}} Predloga:Nightly
{{release-candidate}} Predloga:Release-candidate {{release-candidate|RC}} Predloga:Release-candidate
table-draw {{draw}} Predloga:Draw {{draw|1:1}} Predloga:Draw
table-planned {{planned}} Predloga:Planned {{planned|July 2028}} Predloga:Planned
table-scheduled {{scheduled}} Predloga:Scheduled {{scheduled|3 March 2027}} Predloga:Scheduled
incorrect {{incorrect}} Napačno {{incorrect|wrong}} wrong
noresult {{no result}} Ni rezultata {{no result|NR}} NR
table-debate {{D-P}} Predloga:D-P {{D-P|present}} Predloga:D-P
{{D-A}} Predloga:D-A {{D-A|absent}} Predloga:D-A
{{D-I}} Predloga:D-I {{D-I|invited}} Predloga:D-I
{{D-O}} Predloga:D-O {{D-O|invited to other debate}} Predloga:D-O
{{D-N}} Predloga:D-N {{D-N|not invited}} Predloga:D-N
{{D-Nv}} Predloga:D-Nv {{D-Nv|not voting}} Predloga:D-Nv
{{D-W}} Predloga:D-W {{D-W|withdrawn}} Predloga:D-W
{{D-Out}} Predloga:D-Out {{D-Out|out of race}} Predloga:D-Out
table-cast {{CMain}} Predloga:CMain {{CMain|text}} Predloga:CMain
{{CAlso starring}} Predloga:CAlso starring {{CAlso starring|costar}} Predloga:CAlso starring
{{CRecurring}} Predloga:CRecurring {{CRecurring|regular guest}} Predloga:CRecurring
{{CGuest}} Predloga:CGuest {{CGuest|victim}} Predloga:CGuest
{{COther}} Predloga:COther {{COther|ensemble}} Predloga:COther
{{CNone}} Predloga:CNone {{CNone|cast}} Predloga:CNone
{{CEmpty}} Predloga:CEmpty
{{CRemoved}} Predloga:CRemoved {{CRemoved|edited}} Predloga:CRemoved
{{CFinalist}} Predloga:CFinalist {{CFinalist|text=white|color=darkblue|contender}} Predloga:CFinalist
{{CFinalist|place=3rd Place}} Predloga:CFinalist {{CFinalist|place=third place}} Predloga:CFinalist
{{exempt}} Predloga:Exempt {{Black Exempt}} Predloga:Black Exempt
{{nocontest}} Predloga:Nocontest {{nocontest|rescheduled}} Predloga:Nocontest
{{Runner-up}} Predloga:Runner-up {{Runner-up|2nd place}} Predloga:Runner-up
{{Quit}} Predloga:Quit {{Quit|left}} Predloga:Quit
no class {{not yet}} Predloga:Not yet {{not yet|NY}} Predloga:Not yet
{{optional}} Neobvezno {{optional|non-mandatory}} non-mandatory
{{shade|100}}% Predloga:Shade% {{shade|r=0|g=100|b=255|100}}% Predloga:Shade%
{{shade|75}}% Predloga:Shade% {{shade|r=0|g=100|b=255|75}}% Predloga:Shade%
{{shade|25}}% Predloga:Shade% {{shade|r=0|g=100|b=255|25}}% Predloga:Shade%
{{shade|0}}% Predloga:Shade% {{shade|r=0|g=100|b=255|0}}% Predloga:Shade%

Koda uredi

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|}}}" class="automatic table-automatic"| {{{1|text}}}

Code specific to this template:

data-sort-value="No" style="background: #FFD2D2; color:black; vertical-align: middle; text-align: center; " class="table-no2" | No

Ustvarjanje novih predlog uredi

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}}}

Color subpage uredi

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 uredi

To je dokumentacija TemplateData za predlogo, ki jo uporabljajo Vizualni urejevalnik in druga orodja; glejte mesečno poročilo o uporabi parametrov za to predlogo.

TemplateData za Na

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

Parametri predloge[Urejanje podatkov predloge]

Za to predlogo se uporablja postavitev parametrov v eni vrstici.

ParameterOpisVrstaStanje
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

Privzeto
(template dependent)
Vsebinaneobvezno
horizontal alignalign

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

Privzeto
center
Nizneobvezno
stylestyle

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

Privzeto
(template dependent)
Nizneobvezno
background colorcolor

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

Privzeto
(template dependent)
Vrsticaneobvezno

Glej tudi uredi

  • {{Change}} – calculates, displays and color-codes changes between two values
  • {{BSD-lic}} – specialized redirect for {{free}}
  • {{GPL-lic}} – specialized redirect for {{free}}
  • {{LGPL-lic}} – specialized redirect for {{free}}

Opombe uredi

  1. The HTML class of table cell templates may be referenced in a user stylesheet to change appearance.
  2. 2,0 2,1 Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.