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

提供: Yourpedia
移動: 案内検索
(誤記の訂正)
 
(同じ利用者による、間の3版が非表示)
1行目: 1行目:
{{Ombox/core
+
<includeonly>{| class="plainlinks ombox ombox-{{{type|notice}}} {{{small|mbox-small}}}" style="background-color:{{{background|transparent}}}; {{{style|}}}"
  | type            = {{{type|}}}
+
| class="mbox-image" style="padding-left:0.5em; {{{label-style|}}}"{{!}}{{{image|[[File:{{{image-file|Imbox {{{type|notice}}}.png}}}{{!}}0{{{image-size|40}}}px{{!}}{{{type|notice}}}]]}}}
  | image          = {{{image|}}}
+
{{!}} class="mbox-text" style="padding:0.5em; {{{textstyle|}}}"{{!}}{{{text|}}}
  | image-file      = {{{image-file|}}}
+
{{!}} class="mbox-imageright" style="padding-right:0.5em; {{{rightstyle|}}}"{{!}}{{{imageright|[[画像:{{{imageright-file|}}}{{!}}0{{{imageright-size|40}}}px{{!}}image]]}}}
  | image-size      = {{{image-size|40x40}}}
+
{{!}}}</includeonly><noinclude>
  | imageright      = {{{imageright|}}}
+
  | imageright-file = {{{imageright-file|}}}
+
  | imageright-size = {{{imageright-size|40x40}}}
+
  | style          = background-color:{{{background|}}}; {{{style|}}};
+
  | class           = {{{class|}}}
+
  | textstyle      = {{{textstyle|}}}
+
  | text            = {{{text|}}}
+
  | small =
+
}}<noinclude>
+
 
{{Documentation}}
 
{{Documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
 
</noinclude>
 
</noinclude>

2019年6月12日 (水) 01:29時点における最新版

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を指定する設定が消える。条件文が書けないので代わりに作り付けたもの。

関連テンプレート[編集]