Template:Fmbox/doc:修订间差异
外观
删除的内容 添加的内容
移除参见段重复的 Mbox templates |
从 zhwiki 适配完整文档,追加 Uses TemplateStyles 声明 |
||
| (未显示同一用户的1个中间版本) | |||
| 第1行: | 第1行: | ||
| ⚫ | |||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
{{Uses Lua|Module:Message box}} |
{{Uses Lua|Module:Message box}} |
||
{{Uses TemplateStyles|Module:Message box/fmbox.css}} |
|||
| ⚫ | |||
'''{{tlx|Fmbox}}'''(Footer & header message |
'''{{tlx|Fmbox}}'''(Footer & header message box,页首与页尾信息框)用于系统消息界面和编辑提示。它也可用于用户页的页脚/页眉框和编辑提示。本模板 100% 宽度显示,与 {{tlx|Ambox}} 参数基本相同。 |
||
== 常用参数 == |
== 常用参数 == |
||
| 第11行: | 第12行: | ||
| <code>type</code> || <code>warning</code> / <code>editnotice</code> / <code>system</code> |
| <code>type</code> || <code>warning</code> / <code>editnotice</code> / <code>system</code> |
||
|- |
|- |
||
| <code>image</code> || 自定义图标 |
| <code>image</code> || 自定义图标(<code>none</code> 则不显示图片) |
||
|- |
|- |
||
| <code> |
| <code>imageright</code> || 右侧图片 |
||
|- |
|||
| <code>id</code> || CSS id,用于 JavaScript 检测 |
|||
|- |
|||
| <code>class</code> || CSS 类名,用于个性化皮肤 |
|||
|- |
|||
| <code>style</code> || 整个信息框的 CSS 样式 |
|||
|- |
|||
| <code>textstyle</code> || 文字单元格的 CSS 样式 |
|||
|- |
|||
| <code>text</code> || 消息正文 |
|||
|} |
|} |
||
== |
== type 类型 == |
||
{{Fmbox|type= |
{{Fmbox|type=warning|text=type=<u>warning</u> 警告通知}} |
||
{{Fmbox|type=editnotice|text=编辑 |
{{Fmbox|type=editnotice|text=type=<u>editnotice</u> 编辑提示(透明背景)}} |
||
{{Fmbox|type=system|text=type=<u>system</u> 系统消息(浅灰背景,默认)}} |
|||
未指定 type 时默认为 <code>system</code>。 |
|||
== 特殊设定 == |
|||
{{Fmbox|text=未指定 type 和 image(默认)}} |
|||
{{Fmbox|image=none|text=image=none — 不使用图片,text 占用整个区域}} |
|||
== 参数说明 == |
|||
<syntaxhighlight lang="wikitext"> |
|||
{{fmbox |
|||
| type = system / editnotice / warning |
|||
| image = none / [[File:Some image.svg|40px]] |
|||
| imageright = [[File:Some image.svg|40px]] |
|||
| id = CSS id |
|||
| class = CSS 类名 |
|||
| style = CSS 取值 |
|||
| textstyle = CSS 取值 |
|||
| text = 消息正文 |
|||
}} |
|||
</syntaxhighlight> |
|||
== 技术细节 == |
|||
如需在 text 参数中使用特殊字符: |
|||
<syntaxhighlight lang="wikitext"> |
|||
{{fmbox |
|||
| text = |
|||
等号 = 与前后大括号 { } 可以正常使用。 |
|||
但管道符 {{!}} 与两个后大括号 <nowiki>}}</nowiki> 不能直接使用。 |
|||
}} |
|||
</syntaxhighlight> |
|||
如果需要宽度不足 100% 的框,请使用 {{tlx|Ombox}}。 |
|||
== 参见 == |
== 参见 == |
||
* {{tlx| |
* {{tlx|Ambox}} — 条目消息框 |
||
* {{tlx|Tmbox}} — 讨论页消息框 |
|||
* {{tlx|Imbox}} — 文件页消息框 |
|||
* {{tlx|Cmbox}} — 分类消息框 |
|||
* {{tlx|Ombox}} — 其他页面消息框 |
|||
* {{tlx|Mbox}} — 自动检测命名空间 |
|||
<includeonly> |
<includeonly> |
||
2026年6月22日 (一) 10:49的最新版本
| 此页面是Template:Fmbox的文档子页面。 此页面可能包含了使用说明、分类和其他内容,这些内容不属于原始Template页面。 |
| 此模板使用Lua语言: |
| 本模板使用以下模板样式: |
{{Fmbox}}(Footer & header message box,页首与页尾信息框)用于系统消息界面和编辑提示。它也可用于用户页的页脚/页眉框和编辑提示。本模板 100% 宽度显示,与 {{Ambox}} 参数基本相同。
常用参数
| 参数 | 说明 |
|---|---|
type |
warning / editnotice / system
|
image |
自定义图标(none 则不显示图片)
|
imageright |
右侧图片 |
id |
CSS id,用于 JavaScript 检测 |
class |
CSS 类名,用于个性化皮肤 |
style |
整个信息框的 CSS 样式 |
textstyle |
文字单元格的 CSS 样式 |
text |
消息正文 |
type 类型
| type=warning 警告通知 |
| type=editnotice 编辑提示(透明背景) |
| type=system 系统消息(浅灰背景,默认) |
未指定 type 时默认为 system。
特殊设定
| 未指定 type 和 image(默认) |
| image=none — 不使用图片,text 占用整个区域 |
参数说明
{{fmbox
| type = system / editnotice / warning
| image = none / [[File:Some image.svg|40px]]
| imageright = [[File:Some image.svg|40px]]
| id = CSS id
| class = CSS 类名
| style = CSS 取值
| textstyle = CSS 取值
| text = 消息正文
}}
技术细节
如需在 text 参数中使用特殊字符:
{{fmbox
| text =
等号 = 与前后大括号 { } 可以正常使用。
但管道符 {{!}} 与两个后大括号 <nowiki>}}</nowiki> 不能直接使用。
}}
如果需要宽度不足 100% 的框,请使用 {{Ombox}}。
参见
{{Ambox}}— 条目消息框{{Tmbox}}— 讨论页消息框{{Imbox}}— 文件页消息框{{Cmbox}}— 分类消息框{{Ombox}}— 其他页面消息框{{Mbox}}— 自动检测命名空间