メニューを切り替える
Toggle preferences menu
個人設定を切り替える
ログインしていません
編集を行うと、IPアドレスが公開されます。

テンプレート:Note/doc

提供:Sleeping Cocoon-wiki

This template formats an input text in a standardized "note" style.

Usage[編集]

All parameters are optional, except the first.

{{ note | <note text> | small = y/yes | paren = y/yes | block = y/yes | before = <text in front of the note> }}

First unnamed parameter

Text to format.

small

Reduces the size of the text, useful where space is an issue, e.g. in infobox templates.

paren

Encloses the text in parentheses. The same result can be achieved by simply adding the parentheses to the first unnamed parameter, but this is to be avoided, as some languages may use different characters for parenthesis, and the template will automatically pick the correct ones.

block

Displays the text in a <div> instead of in a <span>, so the text will be in its own paragraph rather than inline.

before

Text to display directly in front of the note text. It will be formatted as well, but will not be included in the parentheses from <syntaxhighlight lang="text" class="code" id="" style="" inline="y">$paren</syntaxhighlight>.

Notes[編集]

  • The template supports localizing commonly used note texts (<syntaxhighlight lang="text" class="code" id="" style="" inline="y">$1</syntaxhighlight>s); these can be added to the localization database. To prevent this automatic translation, add something like <nowiki/> in the text (see below for examples).
    • This also works for texts that are enclosed in parentheses.

Examples[編集]

Code Result
{{note|some note}} some note
{{note|some note|paren=y}} (some note)
item {{note|note|paren=y|before=some&#32;}} item some (note)
some {{note|some block note|paren=y|block=y}} text some
(some block note)
text
some {{note|some small note|paren=y|small=y}} text some (some small note) text
{{note|(really hidden content)}} (really hidden content)
Automatic translation
{{note|some note}} some note
{{note|ranged attack}} ranged attack
^#(\s*(\w+?)\s*)(:(.*)$|$)|#[[[:テンプレート:Tl/parser function links]]##$2 $1]:$4|lang/set}}|fr}} set language to French
{{note|some note}} some note
{{note|ranged attack}} ranged attack
{{note|<nowiki/>ranged attack}} ranged attack
{{note|ranged attack|tr=no}} ranged attack
{{note|(ranged attack)}} (ranged attack)

Options[編集]

{{#arraydefine:optionsKeys:note|small,paren,block,tr,|,|unique}}{{#arrayprint:optionsKeys:note||@@@@|}}{{#arrayprint:optionsKeys:note||@@@@|}}{{#arrayprint:optionsKeys:note||@@@@|}}This template supports options through {{{{#rmatch:options|^#(\s*(\w+?)\s*)(:(.*)$|$)|#[[[:テンプレート:Tl/parser function links]]##$2 $1]:$4|options}}}} template. All valid options are listed below, see {{{{#rmatch:options|^#(\s*(\w+?)\s*)(:(.*)$|$)|#[[[:テンプレート:Tl/parser function links]]##$2 $1]:$4|options}}}} for usage and other infomation.

See Template:note/initOptions for the initial options setting of this template.

{{#arrayprint:optionsKeys:note||@@@@|}}
NameAliasInitial ValueValue Mapping[1]Note
@@@@(empty)
  1. Values with mapping will be stored and loaded as mapped value. Other values without mapping will be stored and loaded as-is.


[[Category:Lua エラー: 内部エラー: インタープリターは終了コード 2 で終了しました。Template documentation ]]Lua エラー: 内部エラー: インタープリターは終了コード 2 で終了しました。