コンテンツにスキップ

「テンプレート:Mbox/doc」の版間の差分

提供:信号機Wiki
羽井出 (トーク | 投稿記録)
テンプレートデータを設定
羽井出 (トーク | 投稿記録)
テンプレートデータを修正
 
(同じ利用者による、間の1版が非表示)
73行目: 73行目:
<templatedata>
<templatedata>
{
{
    "description": "Mboxのテンプレートデータ",
"description": "Mboxのテンプレートデータ",
    "params": {
"params": {
        "type": {
"type": {
            "label": "type",
"label": "type",
            "type": "string",
"type": "string",
            "description": "色と既定アイコンの選択。 protection / speedy / delete / content / style / move / notice"
"description": "色と既定アイコンの選択。 ",
        },
"suggested": true,
        "type": {
"suggestedvalues": [
            "label": "type",
"protection",
            "type": "string",
"speedy",
            "description": "色と既定アイコンの選択。 protection / speedy / delete / content / style / move / notice"
"delete",
        },
"content",
        "image": {
"style",
            "label": "image",
"move",
            "type": "string",
"notice"
            "description": "画像表示の記述。例: [[ファイル:Some image.svg|40px]] / none / blank"
]
        },
},
        "imageright": {
"image": {
            "label": "imageright",
"label": "image",
            "type": "string",
"type": "string",
            "description": "Wiki構文による右側への画像指定。 left / no"
"description": "画像表示の記述。例: [[ファイル:Some image.svg|40px]] / none / blank",
        },
"suggested": true,
        "small": {
"suggestedvalues": [
            "label": "small",
"[[ファイル:Some image.svg|40px]]",
            "type": "string",
"none",
            "description": "小型タイプへのスタイル切り替え。 left / no"
"blank"
        },
]
        "printable": {
},
            "label": "printable"
"imageright": {
        },
"label": "imageright",
        "style": {
"type": "string",
            "label": "style",
"description": "Wiki構文による右側への画像指定。"
            "type": "string",
},
            "description": "CSS による外観の細かい設定。"
"small": {
        },
"label": "small",
        "background": {
"type": "string",
            "label": "background",
"description": "小型タイプへのスタイル切り替え。",
            "type": "string",
"suggestedvalues": [
            "description": "背景色の設定。 #rrggbb / #rgb / 色の名前 / transparent"
"left",
        },
"no"
        "text": {
]
            "label": "text",
},
            "type": "string",
"printable": {
            "required": true,
"label": "printable"
            "description": "メッセージ本文。任意の文章"
},
        },
"style": {
        "smalltext": {
"label": "style",
            "label": "smalltext",
"type": "string",
            "type": "string",
"description": "CSS による外観の細かい設定。"
            "description": "小型タイプの場合に表示するメッセージ本文。任意の文章"
},
        }
"background": {
    }
"label": "background",
"type": "string",
"description": "背景色の設定。 #rrggbb / #rgb / 色の名前 / transparent"
},
"text": {
"label": "text",
"type": "string",
"required": true,
"description": "メッセージ本文。任意の文章"
},
"smalltext": {
"label": "smalltext",
"type": "string",
"description": "小型タイプの場合に表示するメッセージ本文。任意の文章"
}
}
}
}
</templatedata>
</templatedata>

2025年1月7日 (火) 09:34時点における最新版

メッセージボックス
メタテンプレート
テンプレート 対象
{{Ambox}} 記事
{{Cmbox}} カテゴリ
{{Imbox}} ファイル
{{Tmbox}} ノート
{{Fmbox}} フッタ / ヘッダ
{{Ombox}} その他
{{Mbox}} 自動判別
{{Asbox}} 記事スタブ
{{Dmbox}} 曖昧さ回避

Mbox は名前空間を自動判定して動作を変える、メッセージボックス用メタテンプレートです。

このメタテンプレートは、埋め込まれている名前空間を自動判定して {{ambox}}、{{tmbox}}、 {{imbox}}、{{cmbox}}、あるいは {{ombox}}、のうちのいずれかを呼び出します。

使い方[ソースを編集]

{{mbox
| demospace =
| type  =
| image = 
| imageright = 
| style = 
| textstyle  = 
| text  = 
| small = 
| smallimage = 
| smallimageright = 
| smalltext  = 
}}

詳細は{{ambox}}を参照。

Mboxのテンプレートデータ

テンプレートパラメーター

パラメーター説明状態
typetype

色と既定アイコンの選択。

値の候補
protection speedy delete content style move notice
文字列推奨
imageimage

画像表示の記述。例: [[ファイル:Some image.svg|40px]] / none / blank

値の候補
[[ファイル:Some image.svg|40px]] none blank
文字列推奨
imagerightimageright

Wiki構文による右側への画像指定。

文字列省略可能
smallsmall

小型タイプへのスタイル切り替え。

値の候補
left no
文字列省略可能
printableprintable

説明なし

不明省略可能
stylestyle

CSS による外観の細かい設定。

文字列省略可能
backgroundbackground

背景色の設定。 #rrggbb / #rgb / 色の名前 / transparent

文字列省略可能
texttext

メッセージ本文。任意の文章

文字列必須
smalltextsmalltext

小型タイプの場合に表示するメッセージ本文。任意の文章

文字列省略可能

関連項目[ソースを編集]

  • {{ambox}} - 記事用
  • {{tmbox}} - ノートページ用
  • {{cmbox}} - カテゴリ用
  • {{ombox}} - その他のページ用
  • {{mbox}} - 名前空間を自動判定して表示形式を変えるメッセージボックス
  • {{fmbox}} - ヘッダ/フッタ用
  • {{dmbox}} - 曖昧さ回避用
  • {{asbox}} - 記事スタブ用