「テンプレート:Ombox」の版間の差分

提供: Yourpedia
移動: 案内検索
(ページの置換「{{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>」)
1行目: 1行目:
{{#ifeq:{{{small|}}}|yes
+
{{#invoke:Message box|ombox}}<noinclude>
| {{Ombox/core
+
{{documentation}}
  | small          = yes
+
  | type            = {{{type|}}}
+
  | image          = {{#if:{{{smallimage|}}} | {{{smallimage}}} | {{{image|}}} }}
+
  | image-file      = {{#if:{{{smallimage-file|}}} | {{{smallimage-file}}} | {{{image-file|}}} }}
+
  | image-size      = {{#if:{{{smallimage-size|}}} | {{{smallimage-size|}}} | 30x30 }}
+
  | imageright      = {{#if:{{{smallimageright|}}} | {{{smallimageright}}} | {{{imageright|}}} }}
+
  | imageright-file = {{#if:{{{smallimageright-file|}}} | {{{smallimageright-file}}} | {{{imageright-file|}}} }}
+
  | imageright-size = {{#if:{{{smallimageright-size|{{{smallimage-size|}}}}}}
+
                      | {{{smallimageright-size|{{{smallimage-size|}}}}}}
+
                      | 30x30
+
                      }}
+
  | style          = {{{style|}}}; {{#if:{{{background|}}}|background-color: {{{background|}}}}}
+
  | class          = {{{class|}}}
+
  | textstyle      = {{{textstyle|}}}
+
  | text            = {{#if:{{{smalltext|}}} | {{{smalltext|}}} | {{{text}}} }}
+
  }}
+
| {{Ombox/core
+
  | type            = {{{type|}}}
+
  | image          = {{{image|}}}
+
  | image-file      = {{{image-file|}}}
+
  | image-size      = {{#if:{{{image-size|}}} | {{{image-size|}}} | 40x40 }}
+
  | imageright      = {{{imageright|}}}
+
  | imageright-file = {{{imageright-file|}}}
+
  | imageright-size = {{#if:{{{imageright-size|}}} | {{{imageright-size|}}} | 40x40 }}
+
  | style          = {{{style|}}}; {{#if:{{{background|}}}|background-color: {{{background|}}}}}
+
  | class          = {{{class|}}}
+
  | textstyle      = {{{textstyle|}}}
+
  | text            = {{{text}}}
+
  }}
+
}}<noinclude>
+
{{Documentation}}
+
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

2015年4月28日 (火) 11:09時点における版

{{#invoke:Message box|ombox}}

Template Info このテンプレートの解説はテンプレート:Ombox/docから呼び出されています[編集] [履歴]

Omboxテンプレート

引数一覧

{{Ombox/core
 |type=
 |style=
 |background=
 |image=
 |image-file=
 |image-size=
 |textstyle=
 |text=
 |imageright=
 |imageright-file=
 |imageright-size=
 |small=
}}

引数の説明

type
下記から選択。例えば「speedy(即時削除)」を選択すると、画像を表示するtableのclass属性に「plainlinks ombox-speedy」が選択され、「Imbox speedy.png」という画像が表示される。省略時既定値は「notice」。
style
画像を表示するテーブルのスタイルを指定。
background
画像を表示するテーブルの背景色を指定。
image
例えば「type」の引数に「speedy」を指定したとき、表示される画像ファイル名は自動的に「Imbox speedy.png」と指定されるが、これを別の画像ファイルに変更したいときに指定する。サイズなども併せて指定する。
image-file
「image」と同じだが画像名だけ指定し、画像サイズは別途「image-size」で指定する。
image-size
「image-file」と併せて用い、画像サイズを指定する。既定値は40(px)。
textstyle
画像の右に表示するテキストのスタイル。
text
画像の右に表示するテキスト。
imageright
テキストの右側に表示する画像。画像名とサイズを含めて設定。右側に画像を表示しないときは、引数にNULL値を指定してください。
imageright-file
テキストの右側に表示する画像の画像名だけ設定。「imageright」に劣後。サイズは別途「imageright-size」で設定。
imageright-size
テキストの右側に表示する画像のサイズ設定。「imageright-file」と併せて使う。既定値は40(px)。
small
ブランク指定したときに、小さめのclassを指定する設定が消える。条件文が書けないので代わりに作り付けたもの。

関連テンプレート