n/a – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Use CSS class)
m (Fix <tt> usage)
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>class="na-cell" style="{{{style|}}}" <!--
<includeonly>class="na-cell"{{#if:{{{style|}}}|<nowiki/> style="{{{style}}}"}} | {{{1|N/A}}}</includeonly><noinclude>
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small></includeonly><noinclude>
Fills ''a table '''cell''''' in grey, with N/A text by default.
Fills ''a table '''cell''''' in grey, with N/A text by default.
{{Important | This template has to be ''inside'' a table cell, e.g:
{{Feature | important | This template has to be ''inside'' a table cell, e.g:


{{{!}}
{{{!}}
Line 20: Line 19:
{{!}}}
{{!}}}


If put in a text paragraph, it results in <tt style{{=}}"font-size: 0.75em">{{n/a}}</tt>.}}
If put in a text paragraph, it results in {{hl|{{n/a}}}}.}}


== Usage ==
== Usage ==
<code>{{<nowiki/>n/a|'''''text'''''|'''''align'''''|'''''style'''''}}</code>
<code>{{<nowiki/>n/a|'''''text'''''|'''''style'''''}}</code>
* text: (Optional, default "N/A")
* text: (Optional, default "N/A")
* align: (Optional, default "center". Named parameter only) text alignment. can be left, center or right
* style: (Optional, default "". Named parameter only) additional CSS (e.g {{hl|font-weight: bold}})
* style: (Optional, default "". Named parameter only) additional CSS (e.g <tt>font-weight: bold</tt>)


{|class="wikitable"
{| class="wikitable"
|+ Examples
|+ Examples
! Code
! Code
Line 39: Line 37:
| {{n/a|abc}}
| {{n/a|abc}}
|-
|-
| <nowiki>{{n/a|align=right|style=font-size: 2em; font-weight: bold|wabbit}}</nowiki>
| <nowiki>{{n/a|style=font-size: 2em; font-weight: bold;text-align: right|wabbit}}</nowiki>
| {{n/a|align=right|style=font-size: 2em; font-weight: bold|wabbit}}
| {{n/a|align=right|style=font-size: 2em; font-weight: bold; text-align: right|wabbit}}
|}
|}


== Source ==
== Source ==
<syntaxhighlight lang="html">
<syntaxhighlight lang="html">
class="na-cell" style="{{{style|}}}" <!--
class="na-cell"{{#if:{{{style|}}}|<nowiki/> style="{{{style}}}"}} | {{{1|N/A}}}
-->| <small>{{#if:{{{sort|}}}|{{hs|{{{sort}}}}}}}{{{1|N/A}}}</small>
</syntaxhighlight>
</syntaxhighlight>



Revision as of 17:52, 27 May 2022

Fills a table cell in grey, with N/A text by default.

This template has to be inside a table cell, e.g:

{| class="wikitable" ! First Name !! Last Name |- | {{n/a}} || Miller |}

First Name Last Name
N/A Miller
If put in a text paragraph, it results in class="na-cell" | N/A.

Usage

{{n/a|text|style}}

  • text: (Optional, default "N/A")
  • style: (Optional, default "". Named parameter only) additional CSS (e.g font-weight: bold)
Examples
Code Result
{{n/a}} N/A
{{n/a|abc}} abc
{{n/a|style=font-size: 2em; font-weight: bold;text-align: right|wabbit}} wabbit

Source

class="na-cell"{{#if:{{{style|}}}|<nowiki/> style="{{{style}}}"}} | {{{1|N/A}}}