「Template:Infobox」:修訂間差異
Iopk123451(對話 | 貢獻) 创建页面,内容为“<includeonly>{{tsl|Template:Infobox/styles.css}}{{#invoke: infobox | infobox }}</includeonly><noinclude>{{documentation}} <!-- 请将分类/语言链接放在文档页面 --></noinclude>” 標籤:流動版編輯 流動版網頁編輯 |
Iopk123451(對話 | 貢獻) 無編輯摘要 標籤:流動版編輯 流動版網頁編輯 |
||
第1行: | 第1行: | ||
<includeonly>{{tsl|Template:Infobox/styles.css}}{{#invoke: infobox | infobox }}</includeonly><noinclude>{{ | <includeonly>{{tsl|Template:Infobox/styles.css}}{{#invoke: infobox | infobox }}</includeonly> | ||
<!-- 请将分类/语言链接放在文档页面 --></noinclude> | <noinclude> | ||
<!-- 文档页面 --> | |||
此模板是信息框的雏形,也是其他信息框模板的基础。 | |||
== 用法 == | |||
{{infobox}} | |||
<pre width="22px">{{infobox | |||
| title = | |||
| imageN = | |||
| defaultimagesize = | |||
| imageNsize = | |||
| invimageN = | |||
| imagearea = | |||
| rows = | |||
| footer = | |||
}}</pre> | |||
{| class="wikitable" | |||
! 参数 | |||
! 功能 | |||
! 默认值 | |||
|- | |||
| {{Code|title}} | |||
| 信息框的标题。 | |||
| {{Code|<nowiki>{{BASEPAGENAME}}</nowiki>}} | |||
|- | |||
| {{Code|image''N''}} | |||
| 标题下显示的图片,其中N为从1开始的正整数(若为1可省略不写),对应图片从上到下的顺序。使用{{tl|Animate}}模板的格式。设置为{{Code|none}}将不显示图片。 | |||
| [[:File:No image.svg|No image.svg]] | |||
|- | |||
| {{Code|defaultimagesize}} | |||
| 设置上述图像的默认大小。 | |||
| 150px | |||
|- | |||
| {{Code|image''N''size}} | |||
| 设置相应图像的大小,其中N为从1开始的正整数,这将覆盖{{param|defaultimagesize}}的值。 | |||
| | |||
|- | |||
| {{Code|invimage''N''}} | |||
| 图像下方显示的物品栏图像,其中N为从1开始的正整数,对应物品从左到右、从上到下的顺序。使用{{tl|Inventory slot}}模板的格式。若设置为{{Code|----}},下一个将换行显示。 | |||
| | |||
|- | |||
| {{Code|imagearea}} | |||
| 用空白区域取代图像,可在其中写入任意其他内容。该参数会覆盖其他图像参数设置。 | |||
| | |||
|- | |||
| {{Code|rows}} | |||
| 用于添加额外的行,需配合{{tl|infobox row}}模板使用。 | |||
| | |||
|- | |||
| {{Code|footer}} | |||
| 用于在信息框最底部添加居中的文字脚注。 | |||
| | |||
|} | |||
== 模板数据 == | |||
<templatedata> | |||
{ | |||
"params": { | |||
"===Infobox": { | |||
"description": "Template:Infobox参数" | |||
}, | |||
"title": { | |||
"label": "标题", | |||
"description": "信息框的标题。", | |||
"type": "string", | |||
"default": "根頁面名(不含命名空間)" | |||
}, | |||
"imagearea": { | |||
"label": "图片区域内容", | |||
"description": "用空白区域取代图像,可在其中写入任意其他内容。该参数会覆盖其他图像参数设置。", | |||
"type": "content" | |||
}, | |||
"rows": { | |||
"label": { | |||
"zh-hans": "額外的行", | |||
"zh-hant": "額外的列" | |||
}, | |||
"description": { | |||
"zh": "用于添加额外的行,需配合{{[[Template:infobox row|infobox row]]}}模板使用。", | |||
"zh-hant": "用於加入額外的列,需配合{{[[Template:infobox row|infobox row]]}}模板使用。", | |||
"type": "content" | |||
} | |||
}, | |||
"footer": { | |||
"label": "脚注", | |||
"description": "用于在信息框最底部添加居中的文字脚注。", | |||
"type": "content" | |||
}, | |||
"===Image area": { | |||
"description": "[[Template:Image area]]参数" | |||
}, | |||
"image": { | |||
"label": "第1张图片", | |||
"description": "标题下显示的第1张图片。使用{{[[Template:Animate|Animate]]}}模板的格式(下同),设置为<code>none</code>将不显示图片。若未指定显示为[[:File:No image.svg|No image.svg]]。", | |||
"type": "wiki-file-name", | |||
"default": "No image.svg", | |||
"suggested": true | |||
}, | |||
"image2": { | |||
"label": "第2张图片", | |||
"description": "标题下显示的第n张图片。", | |||
"type": "wiki-file-name" | |||
}, | |||
"image3": { | |||
"label": "第3张图片", | |||
"inherits": "image2" | |||
}, | |||
"image4": { | |||
"label": "第4张图片", | |||
"inherits": "image2" | |||
}, | |||
"image5": { | |||
"label": "第5张图片", | |||
"inherits": "image2" | |||
}, | |||
"image6": { | |||
"label": "第6张图片", | |||
"inherits": "image2" | |||
}, | |||
"image7": { | |||
"label": "第7张图片", | |||
"inherits": "image2" | |||
}, | |||
"image8": { | |||
"label": "第8张图片", | |||
"inherits": "image2" | |||
}, | |||
"image9": { | |||
"label": "第9张图片", | |||
"inherits": "image2" | |||
}, | |||
"image10": { | |||
"label": "第10张图片", | |||
"description" :"标题下显示的第10张图片。如果需要更多图片,请自行添加参数。", | |||
"inherits": "image2" | |||
}, | |||
"defaultimagesize": { | |||
"label": "默认图片尺寸", | |||
"description": "设置上述图像的默认大小。", | |||
"example": "300px", | |||
"type": "string", | |||
"default": "150px" | |||
}, | |||
"imagesize": { | |||
"label": "第1张图片尺寸", | |||
"description": "设置标题下第1张图片的大小,这将覆盖{{{defaultimagesize}}}的值(下同)。", | |||
"type": "string" | |||
}, | |||
"image2size": { | |||
"label": "第2张图片尺寸", | |||
"description": "设置标题下第n张图片的大小。", | |||
"type": "string" | |||
}, | |||
"image3size": { | |||
"label": "第3张图片尺寸", | |||
"inherits": "image2size" | |||
}, | |||
"image4size": { | |||
"label": "第4张图片尺寸", | |||
"inherits": "image2size" | |||
}, | |||
"image5size": { | |||
"label": "第5张图片尺寸", | |||
"inherits": "image2size" | |||
}, | |||
"image6size": { | |||
"label": "第6张图片尺寸", | |||
"inherits": "image2size" | |||
}, | |||
"image7size": { | |||
"label": "第7张图片尺寸", | |||
"inherits": "image2size" | |||
}, | |||
"image8size": { | |||
"label": "第8张图片尺寸", | |||
"inherits": "image2size" | |||
}, | |||
"image9size": { | |||
"label": "第9张图片尺寸", | |||
"inherits": "image2size" | |||
}, | |||
"image10size": { | |||
"label": "第10张图片尺寸", | |||
"description": "设置标题下第10张图片的大小。如果需要设置更多图片的尺寸,请自行添加参数。", | |||
"inherits": "image2size" | |||
}, | |||
"invimage": { | |||
"label": "物品栏图片", | |||
"description": "第1张物品栏图片。使用{{[[Template:Inventory slot|Inventory slot]]}}模板的格式,若设置为“<code>----</code>”,下一个将换行显示(下同)。设置为<code>none</code>将不显示。", | |||
"type": "string" | |||
}, | |||
"invimage2": { | |||
"label": "第2张物品栏图片", | |||
"description": "第n张物品栏图片。", | |||
"type": "string" | |||
}, | |||
"invimage3": { | |||
"label": "第3张物品栏图片", | |||
"inherits": "invimage2" | |||
}, | |||
"invimage4": { | |||
"label": "第4张物品栏图片", | |||
"inherits": "invimage2" | |||
}, | |||
"invimage5": { | |||
"label": "第5张物品栏图片", | |||
"inherits": "invimage2" | |||
}, | |||
"invimage6": { | |||
"label": "第6张物品栏图片", | |||
"inherits": "invimage2" | |||
}, | |||
"invimage7": { | |||
"label": "第7张物品栏图片", | |||
"inherits": "invimage2" | |||
}, | |||
"invimage8": { | |||
"label": "第8张物品栏图片", | |||
"inherits": "invimage2" | |||
}, | |||
"invimage9": { | |||
"label": "第9张物品栏图片", | |||
"inherits": "invimage2" | |||
}, | |||
"invimage10": { | |||
"label": "第10张物品栏图片", | |||
"description": "第10张物品栏图片。如果需要更多物品栏图片,请自行添加参数。", | |||
"inherits": "invimage2" | |||
} | |||
}, | |||
"description": "此模板是信息框的雏形,也是其他信息框模板的基础。", | |||
"format": "block", | |||
"paramOrder": [ | |||
"title", | |||
"image", | |||
"image2", | |||
"image3", | |||
"image4", | |||
"image5", | |||
"image6", | |||
"image7", | |||
"image8", | |||
"image9", | |||
"image10", | |||
"defaultimagesize", | |||
"imagesize", | |||
"image2size", | |||
"image3size", | |||
"image4size", | |||
"image5size", | |||
"image6size", | |||
"image7size", | |||
"image8size", | |||
"image9size", | |||
"image10size", | |||
"invimage", | |||
"invimage2", | |||
"invimage3", | |||
"invimage4", | |||
"invimage5", | |||
"invimage6", | |||
"invimage7", | |||
"invimage8", | |||
"invimage9", | |||
"invimage10", | |||
"imagearea", | |||
"rows", | |||
"footer", | |||
"===Infobox", | |||
"===Image area" | |||
] | |||
}</templatedata> | |||
<!-- 请将分类/语言链接放在文档页面 --> | |||
</noinclude> |
於 2025年9月16日 (二) 08:01 的最新修訂
此模板是信息框的雛形,也是其他信息框模板的基礎。
用法[編輯原始碼]
{{infobox | title = | imageN = | defaultimagesize = | imageNsize = | invimageN = | imagearea = | rows = | footer = }}
參數 | 功能 | 默認值 |
---|---|---|
Template:Code | 信息框的標題。 | Template:Code |
Template:Code | 標題下顯示的圖片,其中N為從1開始的正整數(若為1可省略不寫),對應圖片從上到下的順序。使用Template:Tl模板的格式。設置為Template:Code將不顯示圖片。 | No image.svg |
Template:Code | 設置上述圖像的默認大小。 | 150px |
Template:Code | 設置相應圖像的大小,其中N為從1開始的正整數,這將覆蓋Template:Param的值。 | |
Template:Code | 圖像下方顯示的物品欄圖像,其中N為從1開始的正整數,對應物品從左到右、從上到下的順序。使用Template:Tl模板的格式。若設置為Template:Code,下一個將換行顯示。 | |
Template:Code | 用空白區域取代圖像,可在其中寫入任意其他內容。該參數會覆蓋其他圖像參數設置。 | |
Template:Code | 用於添加額外的行,需配合Template:Tl模板使用。 | |
Template:Code | 用於在信息框最底部添加居中的文字腳註。 |
模板數據[編輯原始碼]
此模板是信息框的雛形,也是其他信息框模板的基礎。
參數 | 描述 | 類型 | 狀態 | |
---|---|---|---|---|
標題 | title | 信息框的標題。
| 字串 | 非必填 |
第1張圖片 | image | 標題下顯示的第1張圖片。使用{{[[Template:Animate|Animate]]}}模板的格式(下同),設置為<code>none</code>將不顯示圖片。若未指定顯示為[[:File:No image.svg|No image.svg]]。
| 檔案 | 建議 |
第2張圖片 | image2 | 標題下顯示的第n張圖片。 | 檔案 | 非必填 |
第3張圖片 | image3 | 標題下顯示的第n張圖片。 | 檔案 | 非必填 |
第4張圖片 | image4 | 標題下顯示的第n張圖片。 | 檔案 | 非必填 |
第5張圖片 | image5 | 標題下顯示的第n張圖片。 | 檔案 | 非必填 |
第6張圖片 | image6 | 標題下顯示的第n張圖片。 | 檔案 | 非必填 |
第7張圖片 | image7 | 標題下顯示的第n張圖片。 | 檔案 | 非必填 |
第8張圖片 | image8 | 標題下顯示的第n張圖片。 | 檔案 | 非必填 |
第9張圖片 | image9 | 標題下顯示的第n張圖片。 | 檔案 | 非必填 |
第10張圖片 | image10 | 標題下顯示的第10張圖片。如果需要更多圖片,請自行添加參數。 | 檔案 | 非必填 |
默認圖片尺寸 | defaultimagesize | 設置上述圖像的默認大小。
| 字串 | 非必填 |
第1張圖片尺寸 | imagesize | 設置標題下第1張圖片的大小,這將覆蓋{{{defaultimagesize}}}的值(下同)。 | 字串 | 非必填 |
第2張圖片尺寸 | image2size | 設置標題下第n張圖片的大小。 | 字串 | 非必填 |
第3張圖片尺寸 | image3size | 設置標題下第n張圖片的大小。 | 字串 | 非必填 |
第4張圖片尺寸 | image4size | 設置標題下第n張圖片的大小。 | 字串 | 非必填 |
第5張圖片尺寸 | image5size | 設置標題下第n張圖片的大小。 | 字串 | 非必填 |
第6張圖片尺寸 | image6size | 設置標題下第n張圖片的大小。 | 字串 | 非必填 |
第7張圖片尺寸 | image7size | 設置標題下第n張圖片的大小。 | 字串 | 非必填 |
第8張圖片尺寸 | image8size | 設置標題下第n張圖片的大小。 | 字串 | 非必填 |
第9張圖片尺寸 | image9size | 設置標題下第n張圖片的大小。 | 字串 | 非必填 |
第10張圖片尺寸 | image10size | 設置標題下第10張圖片的大小。如果需要設置更多圖片的尺寸,請自行添加參數。 | 字串 | 非必填 |
物品欄圖片 | invimage | 第1張物品欄圖片。使用{{[[Template:Inventory slot|Inventory slot]]}}模板的格式,若設置為「<code>----</code>」,下一個將換行顯示(下同)。設置為<code>none</code>將不顯示。 | 字串 | 非必填 |
第2張物品欄圖片 | invimage2 | 第n張物品欄圖片。 | 字串 | 非必填 |
第3張物品欄圖片 | invimage3 | 第n張物品欄圖片。 | 字串 | 非必填 |
第4張物品欄圖片 | invimage4 | 第n張物品欄圖片。 | 字串 | 非必填 |
第5張物品欄圖片 | invimage5 | 第n張物品欄圖片。 | 字串 | 非必填 |
第6張物品欄圖片 | invimage6 | 第n張物品欄圖片。 | 字串 | 非必填 |
第7張物品欄圖片 | invimage7 | 第n張物品欄圖片。 | 字串 | 非必填 |
第8張物品欄圖片 | invimage8 | 第n張物品欄圖片。 | 字串 | 非必填 |
第9張物品欄圖片 | invimage9 | 第n張物品欄圖片。 | 字串 | 非必填 |
第10張物品欄圖片 | invimage10 | 第10張物品欄圖片。如果需要更多物品欄圖片,請自行添加參數。 | 字串 | 非必填 |
圖片區域內容 | imagearea | 用空白區域取代圖像,可在其中寫入任意其他內容。該參數會覆蓋其他圖像參數設置。 | 內容 | 非必填 |
額外的列 | rows | 用於加入額外的列,需配合{{[[Template:infobox row|infobox row]]}}模板使用。 | 不明 | 非必填 |
腳註 | footer | 用於在信息框最底部添加居中的文字腳註。 | 內容 | 非必填 |
===Infobox | ===Infobox | Template:Infobox參數 | 不明 | 非必填 |
===Image area | ===Image area | [[Template:Image area]]參數 | 不明 | 非必填 |