Template:Fmbox/doc:修订间差异

删除的内容 添加的内容
创建 Template:Fmbox/doc 文档
 
从 zhwiki 适配完整文档,追加 Uses TemplateStyles 声明
 
(未显示同一用户的3个中间版本)
第1行:
{{Mbox templates}}
{{Documentation subpage}}
{{Uses Lua|Module:Message box}}
{{Uses TemplateStyles|Module:Message box/fmbox.css}}
 
'''{{tlx|Fmbox}}'''(Footer & header message box)box,页首与页尾信息框)用于系统界面消息界面和编辑提示。它也可用于用户页的页脚/页眉框和编辑提示。本模板 100% 显示,与 {{tlx|Ambox}} 参数基本相同
 
== 常用参数 ==
第10行 ⟶ 第12行:
| <code>type</code> || <code>warning</code> / <code>editnotice</code> / <code>system</code>
|-
| <code>image</code> || 自定义图标(<code>none</code> 则不显示图片)
|-
| <code>textimageright</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=systemwarning|text=这是一个系统消息。type=<u>warning</u> 警告通知}}
{{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|Ambox}} — 条目消息框
{{Mbox templates}}
* {{tlx|MboxTmbox}} — 自动检测命名空间的讨论页消息框
* {{tlx|Imbox}} — 文件页消息框
* {{tlx|Cmbox}} — 分类消息框
* {{tlx|Ombox}} — 其他页面消息框
* {{tlx|Mbox}} — 自动检测命名空间
 
<includeonly>