模板:通用卡片:修订间差异
更多
创建页面,内容为“<div style="background: #1a1a1a; padding: 20px; border: 1px solid #2a2a2a; border-radius: 4px; height: 100%; box-sizing: border-box; margin-bottom: 20px;"> <h3 style="margin-top:0; color: #ddd; font-family: monospace; font-size: 1.1rem; border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 15px;"> {{{icon|}}} {{{title|标题}}} </h3> <div style="font-size: 0.95rem; color: #999; line-height: 1.6;"> {{{content}}} </di…” |
按新大纲重组编写指南、三类标准页与全模板说明;修复可选信息行结构 |
||
| (未显示2个用户的3个中间版本) | |||
| 第1行: | 第1行: | ||
<div | <includeonly><div class="mc-panel"><div class="mc-component-title">{{{title|标题}}}</div><div class="mc-prose"> | ||
{{{content|}}} | |||
</div></div></includeonly><noinclude> | |||
单个内容卡片;参数名使用英文 title 和 content。 | |||
在可视化编辑器中选择“插入 → 模板”,搜索 <code>通用卡片</code>。源代码编辑器中复制下方调用,按参数名填写;不需要写“模板:”前缀。 | |||
== 效果 == | |||
<div class="mc-example-preview"> | |||
{{通用卡片|title=资料概述|content=填写具体内容。}} | |||
</div> | </div> | ||
== 源代码 == | |||
<div class="mc-example-source"><pre>{{通用卡片|title=资料概述|content=填写具体内容。}}</pre></div> | |||
== 参数 == | |||
{| class="wikitable" | |||
! 参数名 !! 用法 | |||
|- | |||
| <code>title</code> || 区块标题。 | |||
|- | |||
| <code>content</code> || 正文内容,支持 Wikitext。 | |||
|} | |||
[[模板说明#通用卡片|全部模板说明]] · [[编写指南]] | |||
<templatedata> | |||
{ | |||
"description": "单个内容卡片;参数名使用英文 title 和 content。", | |||
"format": "block", | |||
"params": { | |||
"title": { | |||
"label": "title", | |||
"type": "content", | |||
"description": "区块标题。" | |||
}, | |||
"content": { | |||
"label": "content", | |||
"type": "content", | |||
"description": "正文内容,支持 Wikitext。" | |||
} | |||
}, | |||
"paramOrder": [ | |||
"title", | |||
"content" | |||
] | |||
} | |||
</templatedata> | |||
</noinclude> | |||
2026年10月13日 (二) 15:57的最新版本
单个内容卡片;参数名使用英文 title 和 content。
在可视化编辑器中选择“插入 → 模板”,搜索 通用卡片。源代码编辑器中复制下方调用,按参数名填写;不需要写“模板:”前缀。
效果
资料概述
填写具体内容。
源代码
{{通用卡片|title=资料概述|content=填写具体内容。}}参数
| 参数名 | 用法 |
|---|---|
title |
区块标题。 |
content |
正文内容,支持 Wikitext。 |
单个内容卡片;参数名使用英文 title 和 content。
| 参数 | 描述 | 类型 | 状态 | |
|---|---|---|---|---|
| title | title | 区块标题。 | 内容 | 可选 |
| content | content | 正文内容,支持 Wikitext。 | 内容 | 可选 |