Jump to content

साचा:Table cell templates/doc

विकिपीडिया, मुक्‍त ज्ञानकोशातून


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:

होय नाही
Yes/No
...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 {{Yes-No}}
...
Table cell templates
Class[] Default syntax Preview (default) Customized syntax Preview (customized)
table-rh {{rh}} | Row header[] Row header {{rh|align=right}} | Row header Row header
{{rh2}} | Row header[] Row header {{rh2|align=right}} | Row header Row header
table-yes {{yes}} होय {{yes|customized [[plain text|text]]}} customized text
{{yes C}} होय {{yes C|}}
{{yes O}} होय {{yes O|}}
table-maybe {{maybe}} Maybe {{maybe|customized [[plain text|text]]}} customized text
table-no {{no}} नाही {{no|customized [[plain text|text]]}} customized 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|missing}} missing
{{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|text}} text
{{ya}} Yes {{ya|text=ya}} ya
{{ya|Ya}} Ya {{ya|text|link=WP:ALT}} text
{{won}} विजयी {{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}} साचा:WinDL {{WinDL|win}} साचा:WinDL
{{WinDL|res=D}} साचा:WinDL {{WinDL|res=draw}} साचा:WinDL
{{WinDL|res=L}} साचा:WinDL {{WinDL|res=loss}} साचा:WinDL
table-no2 {{no2}} {{no2|text}} text
{{na}} No {{na|text=na}} na
{{na|Na}} Na {{na|text|link=WP:ALT}} text
{{nom}} नामांकन {{nom|5}} 5
{{sho}} साचा:Sho {{sho|proposed}} साचा:Sho
{{longlisted}} साचा:Longlisted {{longlisted|rejected}} साचा:Longlisted
{{TBA}} TBA {{TBA|to be announced}} to be announced
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}} almost done
{{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 with an if; no with a but
{{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-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}} Un­known {{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|NR}} NR
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 {{CMain|text}} साचा:CMain
{{CAlso starring}} साचा:CAlso starring {{CAlso starring|costar}} साचा:CAlso starring
{{CRecurring}} साचा:CRecurring {{CRecurring|regular guest}} साचा:CRecurring
{{CGuest}} साचा:CGuest {{CGuest|victim}} साचा:CGuest
{{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
{{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

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

This template documentation is transcluded from Template:Table cell templates [edit]
style="background: #abcdef; color: black; vertical-align: middle; text-align: {{{align|center}}}; {{{style|text-transform: capitalize;}}}" class="automatic table-automatic"| {{{1|text}}}


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: center; " class="automatic table-automatic"| 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

[संपादन]
यथादृश्यसंपादक व इतर साधनांसाठी वापरण्यात येणारे हे टेम्प्लेटडाटा दस्तावेजीकरण आहे.

Table cell templates साठी टेम्प्लेटडाटा

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)
ओळऐच्छिक
  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.