Template:Table cell templates/doc:修订间差异
无编辑摘要 |
无编辑摘要 |
||
第1行: | 第1行: | ||
<noinclude>{{Documentation subpage}}</noinclude> |
<noinclude>{{Documentation subpage}}</noinclude> |
||
{{#ifeq:{{FULLPAGENAME}}|Template:BLACK|{{For|the text color template|Template:Black}}}} |
{{#ifeq:{{FULLPAGENAME}}|Template:BLACK|{{For|the text color template|Template:Black}}|{{#ifeq:{{FULLPAGENAME}}|Template:Ya|{{For|the template with a smaller tick and no green background|Template:Aye}}|{{#ifeq:{{FULLPAGENAME}}|Template:Maybe|{{For|the yellow tick template|Template:Mby}}}}}}}} |
||
The templates in this series are designed to be used in a [[Help:Table|table]] to make a cell with text in that cell, with an appropriately colored background. They are commonly used in [[:Category:Comparisons|comparison tables]]. |
|||
⚫ | For example, {{Tlc|yes}} makes a cell with a green background. The text in the cell is taken from the [[Help:Template#Parameters|first parameter]]; <code><nowiki>{{</nowiki>yes|Sure}}</code> 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: <code><nowiki>{{</nowiki>''table cell template''}} ''text''</code> or <code><nowiki>{{</nowiki>''table cell template''}} | ''text''</code>. This information, the colors and default texts are found in the table below. |
||
本系列的模板是專門為在條目內容中使用[[Help:表格|表格]]而設計,使儲存格內可加入文字,並配以合適的顏色背景。這些模板通常在[[:Category:比較學|比較表格]]中使用。 |
|||
⚫ | |||
If you want to use other attributes for the table cells, ''e.g.'' <code>colspan</code> or <code>rowspan</code>, they need to be put before the template call and there must be no vertical bar <code>|</code> in between them: |
If you want to use other attributes for the table cells, ''e.g.'' <code>colspan</code> or <code>rowspan</code>, they need to be put before the template call and there must be no vertical bar <code>|</code> in between them: |
||
第20行: | 第19行: | ||
</pre> |
</pre> |
||
== 模板 |
== 模板 == |
||
<div style="overflow:auto;"> |
<div style="overflow:auto;"> |
||
{| class="wikitable" style="text-align: left; width: auto;" |
{| class="wikitable" style="text-align: left; width: auto;" |
||
|+ Table cell templates |
|+ Table cell templates |
||
! |
! Class<ref name="table-cell-templates-table-css">The HTML class of table cell templates may be referenced in a [[m:help:User style|user stylesheet]] to change appearance.</ref> !! Default syntax !! Preview (default) !! Customized syntax !! Preview (customized) |
||
|- |
|- |
||
|rowspan=2| <code>table-rh</code> || {{tl|rh}} {{!}} |
|rowspan=2| <code>table-rh</code> || {{tl|rh}} {{!}} Row header<ref name="table-cell-templates-table-after+pipe" /> || {{rh}} | Row header || {{tlp|rh|2=align=right}} {{!}} Row header || {{rh|align=right}} | Row header |
||
|- |
|- |
||
| {{tl|rh2}} {{!}} |
| {{tl|rh2}} {{!}} Row header<ref name="table-cell-templates-table-after+pipe">Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.</ref> || {{rh2}} {{!}} Row header || {{tlp|rh2|2=align=right}} | Row header || {{rh2|align=right}} | Row header |
||
|- |
|- |
||
| <code>table-yes</code> || {{tl|yes}} || {{yes}} || {{tlp|yes|<nowiki> |
| <code>table-yes</code> || {{tl|yes}} || {{yes}} || {{tlp|yes|<nowiki>Customized [[Plain text|text]]</nowiki>}} ||{{yes|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-maybe</code> || {{tl|maybe}} || {{maybe}} || {{tlp|maybe|<nowiki> |
| <code>table-maybe</code> || {{tl|maybe}} || {{maybe}} || {{tlp|maybe|<nowiki>Customized [[Plain text|text]]</nowiki>}} ||{{maybe|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
|rowspan=5| <code>table-no</code> || {{tl|no}} || {{no}} || {{tlp|no|<nowiki> |
|rowspan=5| <code>table-no</code> || {{tl|no}} || {{no}} || {{tlp|no|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{no|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| {{tl|eliminated}} || {{eliminated}} || {{tlp|eliminated| |
| {{tl|eliminated}} || {{eliminated}} || {{tlp|eliminated|Dropped out}} || {{eliminated|Dropped out}} |
||
|- |
|- |
||
| {{tlp|active fire|12%}} || {{active fire|12%}} || || |
| {{tlp|active fire|12%}} || {{active fire|12%}} || || |
||
第46行: | 第45行: | ||
| <code>table-active</code> || {{tl|active}} || {{active}} || {{tlp|active|Lively}} || {{active|Lively}} |
| <code>table-active</code> || {{tl|active}} || {{active}} || {{tlp|active|Lively}} || {{active|Lively}} |
||
|- |
|- |
||
|rowspan=2| <code>table-siteactive</code> || {{tl|site active}} || {{site active}} || {{tlp|site active| |
|rowspan=2| <code>table-siteactive</code> || {{tl|site active}} || {{site active}} || {{tlp|site active|Up}} || {{site active|Up}} |
||
|- |
|- |
||
| {{tl|coming soon}} || {{coming soon}} || {{tlp|coming soon| |
| {{tl|coming soon}} || {{coming soon}} || {{tlp|coming soon|Second half of the year}} || {{coming soon|Second half of the year}} |
||
|- |
|- |
||
| <code>table-siteinactive</code> || {{tl|site inactive}} || {{site inactive}} || {{tlp|site inactive| |
| <code>table-siteinactive</code> || {{tl|site inactive}} || {{site inactive}} || {{tlp|site inactive|Down}} || {{site inactive|Down}} |
||
|- |
|- |
||
|rowspan=8| <code>table-yes2</code> || {{tl|good}} || <s |
|rowspan=8| <code>table-yes2</code> || <s>{{tl|good}}</s> || <s>{{tlc|good}}</s> || <s>{{tlp|good|A}}</s> || <s>{{tlc|good|A}}</s> |
||
|- |
|- |
||
| {{tl|yes2}} || {{yes2}} || {{tlp|yes2| |
| {{tl|yes2}} || {{yes2}} || {{tlp|yes2|Text}} || {{yes2|Text}} |
||
|- |
|- |
||
| {{tl|ya}} || {{ya}} || {{tlp|ya|text{{=}}Ya}} || {{ya|text=Ya}} |
| {{tl|ya}} || {{ya}} || {{tlp|ya|text{{=}}Ya}} || {{ya|text=Ya}} |
||
|- |
|- |
||
| {{tlp|ya|Ya}} || {{ya|Ya}} || {{tlp|ya| |
| {{tlp|ya|Ya}} || {{ya|Ya}} || {{tlp|ya|text|link{{=}}WP:ALT}} || {{ya|text|link=WP:ALT}} |
||
|- |
|- |
||
| {{tl|won}} || {{won}} || {{tlp|won|text{{=}}white|color{{=}}darkblue}} || {{won|text=white|color=darkblue}} |
| {{tl|won}} || {{won}} || {{tlp|won|text{{=}}white|color{{=}}darkblue}} || {{won|text=white|color=darkblue}} |
||
|- |
|- |
||
| {{tlp|won|place{{=}}1}} || {{won|place=1}} || {{tlp|won|place{{=}} |
| {{tlp|won|place{{=}}1}} || {{won|place=1}} || {{tlp|won|place{{=}}Gold}} || {{won|place=Gold}} |
||
|- |
|- |
||
| {{tlp|won|place{{=}}2}} || {{won|place=2}} || {{tlp|won|place{{=}} |
| {{tlp|won|place{{=}}2}} || {{won|place=2}} || {{tlp|won|place{{=}}Silver}} || {{won|place=Silver}} |
||
|- |
|- |
||
| {{tlp|won|place{{=}}3}} || {{won|place=3}} || {{tlp|won|place{{=}} |
| {{tlp|won|place{{=}}3}} || {{won|place=3}} || {{tlp|won|place{{=}}Bronze}} || {{won|place=Bronze}} |
||
|- |
|- |
||
|rowspan=7| <code>table-no2</code> || {{tl|no2}} || {{no2}} || {{tlp|no2| |
|rowspan=7| <code>table-no2</code> || {{tl|no2}} || {{no2}} || {{tlp|no2|Text}} || {{no2|Text}} |
||
|- |
|- |
||
| {{tl|na}} || {{na}} || {{tlp|na|text{{=}}Na}} || {{na|text=Na}} |
| {{tl|na}} || {{na}} || {{tlp|na|text{{=}}Na}} || {{na|text=Na}} |
||
|- |
|- |
||
| {{tlp|na|Na}} || {{na|Na}} || {{tlp|na| |
| {{tlp|na|Na}} || {{na|Na}} || {{tlp|na|text|link{{=}}WP:ALT}} || {{na|text|link=WP:ALT}} |
||
|- |
|- |
||
| {{tl|nom}} || {{nom}} || {{tlp|nom|5}} || {{nom|5}} |
| {{tl|nom}} || {{nom}} || {{tlp|nom|5}} || {{nom|5}} |
||
第78行: | 第77行: | ||
| {{tl|sho}} || {{sho}} || {{tlp|sho|Proposed}} || {{sho|Proposed}} |
| {{tl|sho}} || {{sho}} || {{tlp|sho|Proposed}} || {{sho|Proposed}} |
||
|- |
|- |
||
| {{tl|longlisted}} || {{longlisted}} || {{tlp|longlisted| |
| {{tl|longlisted}} || {{longlisted}} || {{tlp|longlisted|Rejected}} || {{longlisted|Rejected}} |
||
|- |
|- |
||
| {{tl|TBA}} || {{TBA}} || {{tlp|TBA| |
| {{tl|TBA}} || {{TBA}} || {{tlp|TBA|To be announced}} || {{TBA|To be announced}} |
||
|- |
|- |
||
| rowspan=2 |<code>table-success</code> || {{tl|success}} || {{success}} || {{tlp|success| |
| rowspan=2 |<code>table-success</code> || {{tl|success}} || {{success}} || {{tlp|success|Mission complete}} || {{success|Mission complete}} |
||
|- |
|- |
||
| {{tl|operational}} || {{operational}} || {{tlp|operational| |
| {{tl|operational}} || {{operational}} || {{tlp|operational|Returning data}} || {{operational|Returning data}} |
||
|- |
|- |
||
| <code>table-failure</code> || {{tl|failure}} || {{failure}} || {{tlp|failure| |
| <code>table-failure</code> || {{tl|failure}} || {{failure}} || {{tlp|failure|Wrong orbit}} || {{failure|Wrong orbit}} |
||
|- |
|- |
||
| rowspan=16| <code>table-partial</code> || {{tl|partial}} || {{partial}} || {{tlp|partial| |
| rowspan=16| <code>table-partial</code> || {{tl|partial}} || {{partial}} || {{tlp|partial|Almost done}} ||{{partial|Almost done}} |
||
|- |
|- |
||
| {{tl|Regional}} || {{Regional}} || {{tlp|Regional| |
| {{tl|Regional}} || {{Regional}} || {{tlp|Regional|Uyghur}} || {{Regional|Uyghur}} |
||
|- |
|- |
||
| {{tl|MaybeCheck}} || {{MaybeCheck}} || {{tlp|MaybeCheck|text{{=}} |
| {{tl|MaybeCheck}} || {{MaybeCheck}} || {{tlp|MaybeCheck|text{{=}}Possibly}} || {{MaybeCheck|text=Possibly}} |
||
|- |
|- |
||
| {{tlp|MaybeCheck| |
| {{tlp|MaybeCheck|Possibly}} || {{MaybeCheck|Possibly}} || {{tlp|MaybeCheck|text|link{{=}}WP:ALT}} || {{MaybeCheck|text|link=WP:ALT}} |
||
|- |
|- |
||
| {{tl|partial success}} || {{partial success}} || {{tlp|partial success|<nowiki> |
| {{tl|partial success}} || {{partial success}} || {{tlp|partial success|<nowiki>Reached orbit and returned pictures</nowiki>}} || {{partial success|Reached orbit and returned pictures}} |
||
|- |
|- |
||
| {{tl|partial failure}} || {{partial failure}} || {{tlp|partial failure|<nowiki>[[Cubesat]] not deployed</nowiki>}} || {{partial failure|[[Cubesat]] not deployed}} |
| {{tl|partial failure}} || {{partial failure}} || {{tlp|partial failure|<nowiki>[[Cubesat]] not deployed</nowiki>}} || {{partial failure|[[Cubesat]] not deployed}} |
||
第110行: | 第109行: | ||
| {{tl|pending}} || {{pending}} || {{tlp|pending|Awaiting}} || {{pending|Awaiting}} |
| {{tl|pending}} || {{pending}} || {{tlp|pending|Awaiting}} || {{pending|Awaiting}} |
||
|- |
|- |
||
| {{tl|unofficial}} || {{unofficial}} || {{tlp|unofficial|<nowiki>'' |
| {{tl|unofficial}} || {{unofficial}} || {{tlp|unofficial|<nowiki>''De facto''</nowiki>}} || {{unofficial|''De facto''}} |
||
|- |
|- |
||
| {{tl|unofficial2}} || {{unofficial2}} || {{tlp|unofficial2|<nowiki>'' |
| {{tl|unofficial2}} || {{unofficial2}} || {{tlp|unofficial2|<nowiki>''De facto''</nowiki>}} || {{unofficial2|''De facto''}} |
||
|- |
|- |
||
| {{tl|usually}} || {{usually}} || {{tlp|usually| |
| {{tl|usually}} || {{usually}} || {{tlp|usually|Commonly}} || {{usually|Commonly}} |
||
|- |
|- |
||
| {{tl|rarely}} || {{rarely}} || {{tlp|rarely| |
| {{tl|rarely}} || {{rarely}} || {{tlp|rarely|Seldom}}|| {{rarely|Seldom}} |
||
|- |
|- |
||
| {{tl|sometimes}} || {{sometimes}} || {{tlp|sometimes| |
| {{tl|sometimes}} || {{sometimes}} || {{tlp|sometimes|Occasionally}} || {{sometimes|Occasionally}} |
||
|- |
|- |
||
| <code>table-any</code> || {{tl|any}} || {{any}} || {{tlp|any| |
| <code>table-any</code> || {{tl|any}} || {{any}} || {{tlp|any|Anyone}}|| {{any|Anyone}} |
||
|- |
|- |
||
|rowspan=6| <code>table-na</code> || {{tl|n/a}} || {{n/a}} || {{tlp|n/a| |
|rowspan=6| <code>table-na</code> || {{tl|n/a}} || {{n/a}} || {{tlp|n/a|Unavailable}}|| {{n/a|Unavailable}} |
||
|- |
|- |
||
| {{tl|varies}} || {{varies}} || {{tlp|varies|Differs}}|| {{varies|Differs}} |
| {{tl|varies}} || {{varies}} || {{tlp|varies|Differs}}|| {{varies|Differs}} |
||
第128行: | 第127行: | ||
| {{tl|sdash}} || {{sdash}} || {{tlp|sdash|<nowiki>[[File:Dash.svg|13px|link=|dash icon]]</nowiki>}}|| {{sdash|[[File:Dash.svg|13px|link=|dash]]}} |
| {{tl|sdash}} || {{sdash}} || {{tlp|sdash|<nowiki>[[File:Dash.svg|13px|link=|dash icon]]</nowiki>}}|| {{sdash|[[File:Dash.svg|13px|link=|dash]]}} |
||
|- |
|- |
||
| {{tl|BLACK}} || {{BLACK}} || {{tlp|BLACK| |
| {{tl|BLACK}} || {{BLACK}} || {{tlp|BLACK|Banned}} || {{BLACK|Banned}} |
||
|- |
|- |
||
| {{tl|non-album single}} || {{non-album single}} || {{tlp|non-album single|<nowiki> |
| {{tl|non-album single}} || {{non-album single}} || {{tlp|non-album single|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{non-album single|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| {{tl|unreleased}} || {{unreleased}} || {{tlp|unreleased|<nowiki> |
| {{tl|unreleased}} || {{unreleased}} || {{tlp|unreleased|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{unreleased|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
|rowspan=2| <code>table-unknown</code> || {{tl|unknown}} || {{Unknown}} || {{tlp|unknown|?}} || {{unknown|?}} |
|rowspan=2| <code>table-unknown</code> || {{tl|unknown}} || {{Unknown}} || {{tlp|unknown|?}} || {{unknown|?}} |
||
|- |
|- |
||
| {{tl|dunno}} || {{Dunno}} || {{tlp|dunno| |
| {{tl|dunno}} || {{Dunno}} || {{tlp|dunno|Not sure}} || {{dunno|Not sure}} |
||
|- |
|- |
||
| <code>table-automatic</code> || {{tl|perhaps}} || {{perhaps}} || {{tlp|perhaps|<nowiki> |
| <code>table-automatic</code> || {{tl|perhaps}} || {{perhaps}} || {{tlp|perhaps|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{perhaps|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-depends</code> || {{tl|depends}} || {{depends}} || {{tlp|depends|<nowiki> |
| <code>table-depends</code> || {{tl|depends}} || {{depends}} || {{tlp|depends|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{depends|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-included</code> || {{tl|included}} || {{included}} || {{tlp|included|Incorporated}} || {{included|Incorporated}} |
| <code>table-included</code> || {{tl|included}} || {{included}} || {{tlp|included|Incorporated}} || {{included|Incorporated}} |
||
|- |
|- |
||
|rowspan=2| <code>table-dropped</code> || {{tl|dropped}} || {{dropped}} || {{tlp|dropped| |
|rowspan=2| <code>table-dropped</code> || {{tl|dropped}} || {{dropped}} || {{tlp|dropped|Discontinued}} || {{dropped|Discontinued}} |
||
|- |
|- |
||
| {{tl|terminated}} || {{terminated}} || {{tlp|terminated| |
| {{tl|terminated}} || {{terminated}} || {{tlp|terminated|Fired}} || {{terminated|Fired}} |
||
|- |
|- |
||
| <code>table-beta</code> || {{tl|beta}} || {{beta}} || {{tlp|beta| |
| <code>table-beta</code> || {{tl|beta}} || {{beta}} || {{tlp|beta|Preview}} || {{beta|Preview}} |
||
|- |
|- |
||
| <code>table-experimental</code> || {{tl|table-experimental}} || {{table-experimental}} || {{tlp|table-experimental|<nowiki> |
| <code>table-experimental</code> || {{tl|table-experimental}} || {{table-experimental}} || {{tlp|table-experimental|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{table-experimental|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-free</code> || {{tl|free}} || {{free}} || {{tlp|free|<nowiki> |
| <code>table-free</code> || {{tl|free}} || {{free}} || {{tlp|free|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{free|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-proprietary</code> || {{tl|proprietary}} || {{proprietary}} || {{tlp|proprietary|<nowiki> |
| <code>table-proprietary</code> || {{tl|proprietary}} || {{proprietary}} || {{tlp|proprietary|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{proprietary|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-nonfree</code> || {{tl|nonfree}} || {{nonfree}} || {{tlp|nonfree|<nowiki> |
| <code>table-nonfree</code> || {{tl|nonfree}} || {{nonfree}} || {{tlp|nonfree|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{nonfree|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-needs</code> || {{tl|needs}} || {{needs}} || {{tlp|needs|<nowiki> |
| <code>table-needs</code> || {{tl|needs}} || {{needs}} || {{tlp|needs|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{needs|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-nightly</code> || {{tl|nightly}} || {{nightly}} || {{tlp|nightly|<nowiki> |
| <code>table-nightly</code> || {{tl|nightly}} || {{nightly}} || {{tlp|nightly|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{nightly|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-release-candidate</code> || {{tl|release-candidate}} || {{release-candidate}} || {{tlp|release-candidate|<nowiki> |
| <code>table-release-candidate</code> || {{tl|release-candidate}} || {{release-candidate}} || {{tlp|release-candidate|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{release-candidate|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>table-draw</code> || {{tl|draw}} || {{draw}} || {{tlp|draw| |
| <code>table-draw</code> || {{tl|draw}} || {{draw}} || {{tlp|draw|Text}} || {{draw|Text}} |
||
|- |
|- |
||
| <code>table-planned</code> || {{tl|planned}} || {{planned}} || {{tlp|planned|2018 |
| <code>table-planned</code> || {{tl|planned}} || {{planned}} || {{tlp|planned|July 2018}} || {{planned|July 2018}} |
||
|- |
|- |
||
| <code>table-scheduled</code> || {{tl|scheduled}} || {{scheduled}} || {{tlp|scheduled| |
| <code>table-scheduled</code> || {{tl|scheduled}} || {{scheduled}} || {{tlp|scheduled|3 March 2017}} || {{scheduled|3 March 2017}} |
||
|- |
|- |
||
| <code>incorrect</code> || {{tl|incorrect}} || {{incorrect}} || {{tlp|incorrect|<nowiki> |
| <code>incorrect</code> || {{tl|incorrect}} || {{incorrect}} || {{tlp|incorrect|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{incorrect|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| <code>noresult</code> || {{tl|no result}} || {{no result}} || {{tlp|no result|N.R.}} || {{no result|N.R.}} |
| <code>noresult</code> || {{tl|no result}} || {{no result}} || {{tlp|no result|N.R.}} || {{no result|N.R.}} |
||
|- |
|- |
||
|rowspan=8| ''no class'' || {{tl|CMain}} || {{CMain}} || {{tlp|CMain|<nowiki> |
|rowspan=8| ''no class'' || {{tl|CMain}} || {{CMain}} || {{tlp|CMain|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CMain|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| {{tl|CAlso starring}} || {{CAlso starring}} || {{tlp|CAlso starring|<nowiki> |
| {{tl|CAlso starring}} || {{CAlso starring}} || {{tlp|CAlso starring|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CAlso starring|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| {{tl|CRecurring}} || {{CRecurring}} || {{tlp|CRecurring|<nowiki> |
| {{tl|CRecurring}} || {{CRecurring}} || {{tlp|CRecurring|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CRecurring|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| {{tl|CGuest}} || {{CGuest}} || {{tlp|CGuest|<nowiki> |
| {{tl|CGuest}} || {{CGuest}} || {{tlp|CGuest|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CGuest|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| {{tl|CNone}} || {{CNone}} || {{tlp|CNone|<nowiki> |
| {{tl|CNone}} || {{CNone}} || {{tlp|CNone|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{CNone|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| {{tl|nocontest}} || {{nocontest}} || {{tlp|nocontest|<nowiki> |
| {{tl|nocontest}} || {{nocontest}} || {{tlp|nocontest|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{nocontest}}Customized [[Plain text|text]] |
||
|- |
|- |
||
| {{tl|not yet}} || |
| {{tl|not yet}} || {{not yet}} || {{tlp|not yet|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{not yet|Customized [[Plain text|text]]}} |
||
|- |
|- |
||
| {{tl|optional}} || {{optional}} || {{tlp|optional|<nowiki> |
| {{tl|optional}} || {{optional}} || {{tlp|optional|<nowiki>Customized [[Plain text|text]]</nowiki>}} || {{optional|Customized [[Plain text|text]]}} |
||
|}</div> |
|}</div> |
||
第212行: | 第211行: | ||
{{TemplateDataHeader}} |
{{TemplateDataHeader}} |
||
<templatedata>{ |
<templatedata>{ |
||
"description": "One of several templates for styling individual table cells with standard contents and colors.", |
|||
"description": "使用统一的内容和颜色,各种表格单元格模板之一。", |
|||
"params": { |
"params": { |
||
"1": { |
"1": { |
||
"label": "text", |
"label": "text", |
||
"description": "text to be displayed instead of the default, if this doesn't work put the text after the template, |
"description": "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", |
||
"type": "string/line", |
"type": "string/line", |
||
"default": " |
"default": "(template dependent)", |
||
"required": false |
"required": false |
||
}, |
}, |
||
第225行: | 第224行: | ||
"description": "text alignment inside the cell, either 'left', 'right', 'center' or 'justified'", |
"description": "text alignment inside the cell, either 'left', 'right', 'center' or 'justified'", |
||
"default": "center", |
"default": "center", |
||
"inherits": "1" |
"inherits": "1" |
||
}, |
}, |
||
"style": { |
"style": { |
||
第231行: | 第230行: | ||
"description": "a semicolon separated list of additional CSS rules to be applied to the table cell", |
"description": "a semicolon separated list of additional CSS rules to be applied to the table cell", |
||
"default": "", |
"default": "", |
||
"inherits": "1" |
"inherits": "1" |
||
}, |
}, |
||
"color": { |
"color": { |
||
"label": "background color", |
"label": "background color", |
||
"description": "a valid CSS color value or name to override the standard the cell background, only available with some templates", |
"description": "a valid CSS color value or name to override the standard the cell background, only available with some templates", |
||
"inherits": "1" |
"inherits": "1" |
||
} |
} |
||
}}</templatedata> |
}}</templatedata> |
||
== |
== See also == |
||
* {{tl| |
* {{tl|Change}} – calculates, displays and color-codes changes between two values |
||
* {{tl|BSD-lic}} |
* {{tl|BSD-lic}} – specialized redirect for {{tlf|free}} |
||
* {{tl|GPL-lic}} |
* {{tl|GPL-lic}} – specialized redirect for {{tlf|free}} |
||
* {{tl|LGPL-lic}} |
* {{tl|LGPL-lic}} – specialized redirect for {{tlf|free}} |
||
== |
== Notes == |
||
{{reflist}} |
{{reflist}} |
||
2018年7月14日 (六) 08:10的版本
此頁面是Template:Table cell templates的Template文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
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.
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:
是 | 否 | 不適用 |
---|---|---|
是/否 |
... !{{Yes}} ||{{No}} ||rowspan=2 {{n/a}} |- |colspan=2 {{Yes-No}} ...
模板
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] | Row header | {{rh2|align=right}} | Row header | Row header | |
table-yes |
{{yes}} | 是 | {{yes|Customized [[Plain text|text]]}} | Customized text |
table-maybe |
{{maybe}} | 可能 | {{maybe|Customized [[Plain text|text]]}} | Customized text |
table-no |
{{no}} | 否 | {{no|Customized [[Plain text|text]]}} | Customized text |
{{eliminated}} | 淘汰 | {{eliminated|Dropped out}} | Dropped out | |
{{active fire|12%}} | 活跃(12%) | |||
{{lost}} | 失败 | {{lost|Missing}} | Missing | |
{{safe}} | 安全 | {{safe|Protected}} | Protected | |
table-active |
{{active}} | 活跃 | {{active|Lively}} | Lively |
table-siteactive |
{{site active}} | 活跃 | {{site active|Up}} | Up |
{{coming soon}} | 即将到来 | {{coming soon|Second half of the year}} | Second half of the year | |
table-siteinactive |
{{site inactive}} | 不活跃 | {{site inactive|Down}} | Down |
table-yes2 |
{{good}} |
{{good|A}} | ||
{{yes2}} | {{yes2|Text}} | Text | ||
{{ya}} | {{ya|text=Ya}} | Ya | ||
{{ya|Ya}} | {{ya|text|link=WP:ALT}} | |||
{{won}} | 獲獎 | {{won|text=white|color=darkblue}} | 獲獎 | |
{{won|place=1}} | 1 | {{won|place=Gold}} | Gold | |
{{won|place=2}} | 2 | {{won|place=Silver}} | Silver | |
{{won|place=3}} | 3 | {{won|place=Bronze}} | Bronze | |
table-no2 |
{{no2}} | {{no2|Text}} | Text | |
{{na}} | {{na|text=Na}} | Na | ||
{{na|Na}} | {{na|text|link=WP:ALT}} | |||
{{nom}} | 提名 | {{nom|5}} | 5 | |
{{sho}} | 入圍短名單 | {{sho|Proposed}} | Proposed | |
{{longlisted}} | 入圍初选名单 | {{longlisted|Rejected}} | Rejected | |
{{TBA}} | 待公布 | {{TBA|To be announced}} | To be announced | |
table-success |
{{success}} | 成功 | {{success|Mission complete}} | Mission complete |
{{operational}} | 运作中 | {{operational|Returning data}} | Returning data | |
table-failure |
{{failure}} | 失败 | {{failure|Wrong orbit}} | Wrong orbit |
table-partial |
{{partial}} | 部份 | {{partial|Almost done}} | Almost done |
{{Regional}} | 区域 | {{Regional|Uyghur}} | Uyghur | |
{{MaybeCheck}} | {{MaybeCheck|text=Possibly}} | Possibly | ||
{{MaybeCheck|Possibly}} | {{MaybeCheck|text|link=WP:ALT}} | |||
{{partial success}} | 部分成功 | {{partial success|Reached orbit and returned pictures}} | Reached orbit and returned pictures | |
{{partial failure}} | 部分失败 | {{partial failure|[[Cubesat]] not deployed}} | Cubesat not deployed | |
{{okay}} | 中立 | {{okay|C}} | C | |
{{Yes-No}} | 是/否 | {{Yes-No|Yes with an if; no with a but}} | Yes with an if; no with a but | |
{{some}} | 某些 | {{some|Many}} | Many | |
{{nonpartisan}} | Nonpartisan | {{nonpartisan|Impartial}} | Impartial | |
{{pending}} | 待定 | {{pending|Awaiting}} | Awaiting | |
{{unofficial}} | 非官方 | {{unofficial|''De facto''}} | De facto | |
{{unofficial2}} | 非官方 | {{unofficial2|''De facto''}} | De facto | |
{{usually}} | 普遍 | {{usually|Commonly}} | Commonly | |
{{rarely}} | 罕见 | {{rarely|Seldom}} | Seldom | |
{{sometimes}} | 偶尔 | {{sometimes|Occasionally}} | Occasionally | |
table-any |
{{any}} | 任意 | {{any|Anyone}} | Anyone |
table-na |
{{n/a}} | 不適用 | {{n/a|Unavailable}} | Unavailable |
{{varies}} | 不定 | {{varies|Differs}} | Differs | |
{{sdash}} | — | {{sdash|[[File:Dash.svg|13px|link=|dash icon]]}} | ||
{{BLACK}} | 不适用 | {{BLACK|Banned}} | Banned | |
{{non-album single}} | 非专辑单曲 | {{non-album single|Customized [[Plain text|text]]}} | 非专辑单曲 | |
{{unreleased}} | 未发布 | {{unreleased|Customized [[Plain text|text]]}} | Customized text | |
table-unknown |
{{unknown}} | 未知 | {{unknown|?}} | ? |
{{dunno}} | ? | {{dunno|Not sure}} | Not sure | |
table-automatic |
{{perhaps}} | 也许 | {{perhaps|Customized [[Plain text|text]]}} | Customized text |
table-depends |
{{depends}} | 依情況 | {{depends|Customized [[Plain text|text]]}} | Customized text |
table-included |
{{included}} | 入选 | {{included|Incorporated}} | Incorporated |
table-dropped |
{{dropped}} | 抛弃 | {{dropped|Discontinued}} | Discontinued |
{{terminated}} | 终止 | {{terminated|Fired}} | Fired | |
table-beta |
{{beta}} | Beta | {{beta|Preview}} | Preview |
table-experimental |
{{table-experimental}} | 實驗性質 | {{table-experimental|Customized [[Plain text|text]]}} | Customized text |
table-free |
{{free}} | 免费 | {{free|Customized [[Plain text|text]]}} | Customized text |
table-proprietary |
{{proprietary}} | 专有 | {{proprietary|Customized [[Plain text|text]]}} | Customized text |
table-nonfree |
{{nonfree}} | 付费 | {{nonfree|Customized [[Plain text|text]]}} | Customized text |
table-needs |
{{needs}} | 需要 | {{needs|Customized [[Plain text|text]]}} | Customized text |
table-nightly |
{{nightly}} | 每日构建 | {{nightly|Customized [[Plain text|text]]}} | Customized text |
table-release-candidate |
{{release-candidate}} | 候选版本 | {{release-candidate|Customized [[Plain text|text]]}} | Customized text |
table-draw |
{{draw}} | {{draw|Text}} | Text | |
table-planned |
{{planned}} | 计划 | {{planned|July 2018}} | July 2018 |
table-scheduled |
{{scheduled}} | 排定日程 | {{scheduled|3 March 2017}} | 3 March 2017 |
incorrect |
{{incorrect}} | 不正確 | {{incorrect|Customized [[Plain text|text]]}} | Customized text |
noresult |
{{no result}} | 无结果 | {{no result|N.R.}} | N.R. |
no class | {{CMain}} | 主演 | {{CMain|Customized [[Plain text|text]]}} | Customized text |
{{CAlso starring}} | 群演 | {{CAlso starring|Customized [[Plain text|text]]}} | Customized text | |
{{CRecurring}} | 常設 | {{CRecurring|Customized [[Plain text|text]]}} | Customized text | |
{{CGuest}} | 客串 | {{CGuest|Customized [[Plain text|text]]}} | Customized text | |
{{CNone}} | {{CNone|Customized [[Plain text|text]]}} | Customized text | ||
{{nocontest}} | {{nocontest|Customized [[Plain text|text]]}} | Customized text | ||
{{not yet}} | 尚不可用 | {{not yet|Customized [[Plain text|text]]}} | Customized text | |
{{optional}} | 可选 | {{optional|Customized [[Plain text|text]]}} | Customized text |
Code
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 skin-invert"| {{{1|text}}}
Code specific to this template:
style="background: white; color: black; vertical-align: middle; text-align: {{{align|center}}}; {{{style|}}}" class="Table cell templates table-Table cell templates skin-invert"| {{{1|{{{text}}}}}}
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: center; " class="automatic table-automatic"| text
TemplateData
One of several templates for styling individual table cells with standard contents and colors.
参数 | 描述 | 类型 | 状态 | |
---|---|---|---|---|
text | 1 | 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
| 单行文本 | 可选 |
horizontal align | align | text alignment inside the cell, either 'left', 'right', 'center' or 'justified'
| 单行文本 | 可选 |
style | style | a semicolon separated list of additional CSS rules to be applied to the table cell
| 单行文本 | 可选 |
background color | color | a valid CSS color value or name to override the standard the cell background, only available with some templates
| 单行文本 | 可选 |
See also
- {{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}}
Notes
- ^ The HTML class of table cell templates may be referenced in a user stylesheet to change appearance.
- ^ 2.0 2.1 Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.