Шаблон:Maybe

Материал из Викиновостей, свободного источника новостей
Maybe


Документация

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.

Шаблон:Warnsign If you want to use other attributes for the table cells, e.g. colspan or rowspan, they need to be put before the template call and there must be no vertical bar | in between them:

Эта новость редактируется.
Пожалуйста, отредактируйте её. Когда она будет готова,
замените пометку {{редактируется}} на {{рецензировать}},
чтобы статья была проверена редакторами и появилась на заглавной странице.
||rowspan=2 style="background: #ececec; color: grey; vertical-align: middle; text-align: center; " class="table-na" | н/д
colspan=2 Шаблон:Yes-No
...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 {{Yes-No}}
...

Templates

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] Шаблон:Rh2 | Row header {{rh2|align=right}} | Row header Шаблон:Rh2 | Row header
table-yes {{yes}} {{yes|customized [[plain text|text]]}}
{{yes C}} Шаблон:Yes C {{yes C|}} Шаблон:Yes C
{{yes O}} Шаблон:Yes O {{yes O|}} Шаблон:Yes O
table-maybe {{maybe}} Maybe {{maybe|customized [[plain text|text]]}} customized text
table-no {{no}}
Эта новость редактируется.
Пожалуйста, отредактируйте её. Когда она будет готова,
замените пометку {{редактируется}} на {{рецензировать}},
чтобы статья была проверена редакторами и появилась на заглавной странице.
|| {{no|customized [[plain text|text]]}} ||
Эта новость редактируется.
Пожалуйста, отредактируйте её. Когда она будет готова,
замените пометку {{редактируется}} на {{рецензировать}},
чтобы статья была проверена редакторами и появилась на заглавной странице.
{{no O}} Шаблон:No O {{no O|}} Шаблон:No O
{{no X}} Шаблон:No X {{no X|}} Шаблон:No X
{{eliminated}} Шаблон:Eliminated {{eliminated|dropped out}} Шаблон:Eliminated
{{active fire|12%}} Шаблон:Active fire
{{lost}} Шаблон:Lost {{lost|missing}} Шаблон:Lost
{{safe}} Шаблон:Safe {{safe|protected}} Шаблон:Safe
table-active {{active}} Шаблон:Active {{active|live}} Шаблон:Active
table-siteactive {{site active}} Шаблон:Site active {{site active|up}} Шаблон:Site active
{{coming soon}} Шаблон:Coming soon {{coming soon|second half of the year}} Шаблон:Coming soon
table-siteinactive {{site inactive}} Шаблон:Site inactive {{site inactive|down}} Шаблон:Site inactive
table-yes2 {{good}} Шаблон:Good {{good|A}} Шаблон:Good
{{yes2}} Шаблон:Yes2 {{yes2|text}} Шаблон:Yes2
{{ya}} Шаблон:Ya {{ya|text=ya}} Шаблон:Ya
{{ya|Ya}} Шаблон:Ya {{ya|text|link=WP:ALT}} Шаблон:Ya
{{won}} Шаблон:Won {{won|text=white|color=darkblue|winner}} Шаблон:Won
{{won|place=1}} Шаблон:Won {{won|place=gold}} Шаблон:Won
{{won|place=2}} Шаблон:Won {{won|place=silver}} Шаблон:Won
{{won|place=3}} Шаблон:Won {{won|place=bronze}} Шаблон:Won
{{WinDL}} Шаблон:WinDL {{WinDL|win}} Шаблон:WinDL
{{WinDL|res=D}} Шаблон:WinDL {{WinDL|res=draw}} Шаблон:WinDL
{{WinDL|res=L}} Шаблон:WinDL {{WinDL|res=loss}} Шаблон:WinDL
table-no2 {{no2}} Шаблон:No2 {{no2|text}} Шаблон:No2
{{na}} Шаблон:Na {{na|text=na}} Шаблон:Na
{{na|Na}} Шаблон:Na {{na|text|link=WP:ALT}} Шаблон:Na
{{nom}} Шаблон:Nom {{nom|5}} Шаблон:Nom
{{sho}} Шаблон:Sho {{sho|proposed}} Шаблон:Sho
{{longlisted}} Шаблон:Longlisted {{longlisted|rejected}} Шаблон:Longlisted
{{TBA}} Шаблон:TBA {{TBA|to be announced}} Шаблон:TBA
table-success {{success}} Шаблон:Success {{success|mission complete}} Шаблон:Success
{{operational}} Шаблон:Operational {{operational|returning data}} Шаблон:Operational
table-failure {{failure}} Шаблон:Failure {{failure|wrong orbit}} Шаблон:Failure
table-partial {{partial}} Шаблон:Partial {{partial|almost done}} Шаблон:Partial
{{Regional}} Шаблон:Regional {{Regional|Uyghur}} Шаблон:Regional
{{MaybeCheck}} Шаблон:MaybeCheck {{MaybeCheck|text=possibly}} Шаблон:MaybeCheck
{{MaybeCheck|possibly}} Шаблон:MaybeCheck {{MaybeCheck|text|link=WP:ALT}} Шаблон:MaybeCheck
{{partial success}} Шаблон:Partial success {{partial success|reached orbit and returned pictures}} Шаблон:Partial success
{{partial failure}} Шаблон:Partial failure {{partial failure|[[Cubesat]] not deployed}} Шаблон:Partial failure
{{okay}} Шаблон:Okay {{okay|C}} Шаблон:Okay
{{Yes-No}} Шаблон:Yes-No {{Yes-No|yes with an if; no with a but}} Шаблон:Yes-No
{{some}} Шаблон:Some {{some|many}} Шаблон:Some
{{nonpartisan}} Шаблон:Nonpartisan {{nonpartisan|impartial}} Шаблон:Nonpartisan
{{pending}} Шаблон:Pending {{pending|awaiting}} Шаблон:Pending
{{unofficial}} Шаблон:Unofficial {{unofficial|''de facto''}} Шаблон:Unofficial
{{unofficial2}} Шаблон:Unofficial2 {{unofficial2|''de facto''}} Шаблон:Unofficial2
{{usually}} Шаблон:Usually {{usually|commonly}} Шаблон:Usually
{{rarely}} Шаблон:Rarely {{rarely|seldom}} Шаблон:Rarely
{{sometimes}} Шаблон:Sometimes {{sometimes|occasionally}} Шаблон:Sometimes
table-noAttempt {{No attempt}} Шаблон:No attempt {{No attempt|No landing attempted}} Шаблон:No attempt
table-any {{any}} Шаблон:Any {{any|anyone}} Шаблон:Any
table-na {{n/a}} н/д {{n/a|unavailable}} unavailable
{{varies}} Шаблон:Varies {{varies|differs}} Шаблон:Varies
{{sdash}} Шаблон:Sdash {{sdash|[[File:Dash.svg|13px|link=|dash icon]]}} Шаблон:Sdash
{{BLACK}} Шаблон:BLACK {{BLACK|banned}} Шаблон:BLACK
{{non-album single}} Шаблон:Non-album single {{non-album single|EP}} Шаблон:Non-album single
{{unreleased}} Шаблон:Unreleased {{unreleased|shelved}} Шаблон:Unreleased
table-unknown {{unknown}} Шаблон:Unknown {{unknown|?}} Шаблон:Unknown
{{dunno}} Шаблон:Dunno {{dunno|not sure}} Шаблон:Dunno
table-automatic {{perhaps}} Шаблон:Perhaps {{perhaps|maybe}} Шаблон:Perhaps
table-depends {{depends}} Шаблон:Depends {{depends|vendor-defined}} Шаблон:Depends
table-included {{included}} Шаблон:Included {{included|incorporated}} Шаблон:Included
table-dropped {{dropped}} Шаблон:Dropped {{dropped|discontinued}} Шаблон:Dropped
{{terminated}} Шаблон:Terminated {{terminated|fired}} Шаблон:Terminated
table-beta {{beta}} Шаблон:Beta {{beta|preview}} Шаблон:Beta
table-experimental {{table-experimental}} Шаблон:Table-experimental {{table-experimental|lab}} Шаблон:Table-experimental
table-free {{free}} Шаблон:Free {{free|empty}} Шаблон:Free
table-proprietary {{proprietary}} Шаблон:Proprietary {{proprietary|custom extension}} Шаблон:Proprietary
table-nonfree {{nonfree}} Шаблон:Nonfree {{nonfree|paid}} Шаблон:Nonfree
table-needs {{needs}} Шаблон:Needs {{needs|req.}} Шаблон:Needs
table-nightly {{nightly}} Шаблон:Nightly {{nightly|dev}} Шаблон:Nightly
table-release-candidate {{release-candidate}} Шаблон:Release-candidate {{release-candidate|RC}} Шаблон:Release-candidate
table-draw {{draw}} Шаблон:Draw {{draw|1:1}} Шаблон:Draw
table-planned {{planned}} Шаблон:Planned {{planned|July 2028}} Шаблон:Planned
table-scheduled {{scheduled}} Шаблон:Scheduled {{scheduled|3 March 2027}} Шаблон:Scheduled
incorrect {{incorrect}} Шаблон:Incorrect {{incorrect|wrong}} Шаблон:Incorrect
noresult {{no result}} Шаблон:No result {{no result|NR}} Шаблон:No result
table-debate {{D-P}} Шаблон:D-P {{D-P|present}} Шаблон:D-P
{{D-A}} Шаблон:D-A {{D-A|absent}} Шаблон:D-A
{{D-I}} Шаблон:D-I {{D-I|invited}} Шаблон:D-I
{{D-O}} Шаблон:D-O {{D-O|invited to other debate}} Шаблон:D-O
{{D-N}} Шаблон:D-N {{D-N|not invited}} Шаблон:D-N
{{D-Nv}} Шаблон:D-Nv {{D-Nv|not voting}} Шаблон:D-Nv
{{D-W}} Шаблон:D-W {{D-W|withdrawn}} Шаблон:D-W
{{D-Out}} Шаблон:D-Out {{D-Out|out of race}} Шаблон:D-Out
table-cast {{CMain}} Основной персонаж {{CMain|text}} text
{{CAlso starring}} Со-главная роль {{CAlso starring|costar}} costar
{{CRecurring}} Повторяющийся {{CRecurring|regular guest}} regular guest
{{CGuest}} Гость {{CGuest|victim}} victim
{{COther}} Шаблон:COther {{COther|ensemble}} Шаблон:COther
{{CNone}} Шаблон:CNone {{CNone|cast}} Шаблон:CNone
{{CEmpty}} Шаблон:CEmpty
{{CRemoved}} Шаблон:CRemoved {{CRemoved|edited}} Шаблон:CRemoved
{{CFinalist}} Шаблон:CFinalist {{CFinalist|text=white|color=darkblue|contender}} Шаблон:CFinalist
{{CFinalist|place=3rd Place}} Шаблон:CFinalist {{CFinalist|place=third place}} Шаблон:CFinalist
{{exempt}} Шаблон:Exempt {{Black Exempt}} Шаблон:Black Exempt
{{nocontest}} Шаблон:Nocontest {{nocontest|rescheduled}} Шаблон:Nocontest
{{Runner-up}} Шаблон:Runner-up {{Runner-up|2nd place}} Шаблон:Runner-up
{{Quit}} Шаблон:Quit {{Quit|left}} Шаблон:Quit
table-enroute {{Enroute}} Шаблон:Enroute {{Enroute|via}} Шаблон:Enroute
no class {{not yet}} Шаблон:Not yet {{not yet|NY}} Шаблон:Not yet
{{optional}} Шаблон:Optional {{optional|non-mandatory}} Шаблон:Optional
{{shade|25}}% Шаблон:Shade% {{shade|75}}% Шаблон:Shade%

Code

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

Шаблон:Table cell templates

Code specific to this template:

style="background: #ffff90; color: black; vertical-align: middle; text-align: center; " class="table-maybe"|Maybe

Creating new templates

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

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

Шаблон:TemplateData header

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

Параметры шаблона[Править данные шаблона]

Шаблон использует строчное форматирование параметров.

ПараметрОписаниеТипСтатус
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

По умолчанию
(template dependent)
Содержимое (контент)необязательный
horizontal alignalign

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

По умолчанию
center
Строковый (без форматирования)необязательный
stylestyle

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

По умолчанию
(template dependent)
Строковый (без форматирования)необязательный
background colorcolor

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

По умолчанию
(template dependent)
Однострочныйнеобязательный

See also

Notes

  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.