Template:Unknown: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
RogueScholar (talk | contribs)
Create template to complement the Yes and No templates for colored table cells when no verifiable information is available
 
RogueScholar (talk | contribs)
Fix display of example in documentation
Line 3: Line 3:
|</noinclude> style="background: {{{bgcolor|#d3d3d3;}}} color: black; vertical-align: middle; text-align: {{{align|center}}}; font-weight: 800; font-size: 108%;{{{style|}}}" class="table-unknown" {{!}} {{{1|&#8239;???&#8239;}}}<noinclude>
|</noinclude> style="background: {{{bgcolor|#d3d3d3;}}} color: black; vertical-align: middle; text-align: {{{align|center}}}; font-weight: 800; font-size: 108%;{{{style|}}}" class="table-unknown" {{!}} {{{1|&#8239;???&#8239;}}}<noinclude>
|}
|}
{{Documentation|content=
{{Documentation|content=__NOTOC__
=== Usage ===
=== Purpose ===
This template creates a table cell with a light grey background and black, larger heavy text which defaults to a triple question mark, as seen above. It is designed to generate a uniform appearance for common cell values in feature and comparison tables with minimal effort, alongside similar templates like:
This template creates a table cell with a light grey background and black, larger heavy text which defaults to a triple question mark, as seen above. It is designed to generate a uniform appearance for common cell values in feature and comparison tables with minimal effort, alongside similar templates like:
<table class="wikitable" style="display: inline-table;"><tr><td class="table-yes" style="background: #90ff90; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;">&#8239;[[Template:Yes|Yes]]&#8239;</td></tr></table>and&nbsp;&nbsp;&nbsp;&nbsp;<table class="wikitable" style="display: inline-table;"><tr><td class="table-no" style="background: #ff9090; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;">&#8239;[[Template:No|No]]&#8239;</td></tr></table>
<table class="wikitable" style="display: inline-table;"><tr><td class="table-yes" style="background: #90ff90; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;">&#8239;[[Template:Yes|Yes]]&#8239;</td></tr></table>and&nbsp;&nbsp;&nbsp;&nbsp;<table class="wikitable" style="display: inline-table;"><tr><td class="table-no" style="background: #ff9090; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;">&#8239;[[Template:No|No]]&#8239;</td></tr></table>


=== Usage ===
The template will only function properly when used inside of the standard wikicode for tables, following the <code>{{!}}</code> character(s) which indicate the table cell. In practice, it looks like this when editing and then when parsed:
<poem style="display: inline-block; margin: 0.5em 2em 0.5em 6em; width: 30%; padding:15px 15px 15px 15px; background: cornsilk; border: 1px solid #000;">
{| class="wikitable"
  |-
  | Template documented?
  | Template categorized?
  |-
  | '''<nowiki>{{Unknown}}</nowiki>'''
  | <nowiki>{{Yes}}</nowiki>
  |}
</poem><table class="wikitable" style="display: inline-block; margin: 2.5em 0 2.5em 2em;"><tr><td>Template documented?</td><td>Template categorized?</td></tr><tr><td style="background: #d3d3d3; color: black; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-unknown">&#8239;???&#8239;</td><td style="background: #90ff90; color: black; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-yes">&#8239;Yes&#8239;</td></tr></table>
==== Custom cell text ====
The question marks can be replaced with any text desired by assigning it to the value of the <code><nowiki>|1=</nowiki></code> parameter or passing it as the only unnamed parameter. For example, either '''<kbd><nowiki>{{Unknown|TBD}}</nowiki></kbd>''' or '''<kbd><nowiki>{{Unknown|1=TBD}}</nowiki></kbd>''', as both produce the following table cell when transcluded and parsed:
The question marks can be replaced with any text desired by assigning it to the value of the <code><nowiki>|1=</nowiki></code> parameter or passing it as the only unnamed parameter. For example, either '''<kbd><nowiki>{{Unknown|TBD}}</nowiki></kbd>''' or '''<kbd><nowiki>{{Unknown|1=TBD}}</nowiki></kbd>''', as both produce the following table cell when transcluded and parsed:


{{Unknown|TBD}}
<table class="wikitable" style="display: inline-table;"><tr><td style="background: {{{bgcolor|#d3d3d3;}}} color: black; vertical-align: middle; text-align: {{{align|center}}}; font-weight: 800; font-size: 108%;{{{style|}}}" class="table-unknown">&#8239;TBD&#8239;</td></tr></table>


=== Available named parameters ===
==== Available named parameters ====
It offers the following named parameters:
It offers the following named parameters:



Revision as of 13:30, 17 January 2020

 ??? 
Template documentation

Purpose

This template creates a table cell with a light grey background and black, larger heavy text which defaults to a triple question mark, as seen above. It is designed to generate a uniform appearance for common cell values in feature and comparison tables with minimal effort, alongside similar templates like:

Yes
and    
No

Usage

The template will only function properly when used inside of the standard wikicode for tables, following the | character(s) which indicate the table cell. In practice, it looks like this when editing and then when parsed:

 {| class="wikitable"
  |-
  | Template documented?
  | Template categorized?
  |-
  | {{Unknown}}
  | {{Yes}}
  |}

Template documented?Template categorized?
 ???  Yes 

Custom cell text

The question marks can be replaced with any text desired by assigning it to the value of the |1= parameter or passing it as the only unnamed parameter. For example, either {{Unknown|TBD}} or {{Unknown|1=TBD}}, as both produce the following table cell when transcluded and parsed:

 TBD 

Available named parameters

It offers the following named parameters:

|align= (values of left or right align the cell contents to that horizontal edge, overriding the default center alignment)
|bgcolor= (changes the background color and must be terminated with a semicolon — values may be named CSS colors like moccasin;, long or short RGB hexadecimals like #ccc; or a keyword like transparent to disable the background)
|style= (for any other CSS style elements desired beyond the standard formatting)

See also