跳到正文
编写
登录

模板:警告卡片:修订间差异

更多
Musicraft​(留言 | 贡献)
无编辑摘要
迷雾样式迁移​(留言 | 贡献)
按新大纲重组编写指南、三类标准页与全模板说明;修复可选信息行结构
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
<div style="background:#161b22; border:1px solid #30363d; border-left:4px solid #f85149; border-radius:10px; padding:20px 24px; margin:16px 0; box-shadow:0 4px 20px rgba(248,81,73,0.08); overflow:hidden;">
<includeonly>{{信息提示|类型=警告|标题={{{title|注意}}}|内容={{{content|}}}}}</includeonly><noinclude>
<div style="display:flex; align-items:center; gap:10px; margin-bottom:14px; padding-bottom:12px; border-bottom:1px solid #21262d;">
突出一项注意事项;参数名使用英文 title 和 content。
<span style="color:#f85149; font-size:1.25rem; line-height:1; flex-shrink:0;">⚠</span>
 
<span style="color:#e6edf3; font-size:1rem; font-weight:700; letter-spacing:0.3px; font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;">{{{title|System Warning}}}</span>
在可视化编辑器中选择“插入 → 模板”,搜索 <code>警告卡片</code>。源代码编辑器中复制下方调用,按参数名填写;不需要写“模板:”前缀。
 
== 效果 ==
<div class="mc-example-preview">
{{警告卡片|title=材料提醒|content=填写需要读者注意的具体情况。}}
</div>
</div>
<div style="color:#8b949e; font-size:0.875rem; line-height:1.75; font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; word-break:break-word;">
 
{{{content}}}
== 源代码 ==
</div>
<div class="mc-example-source"><pre>{{警告卡片|title=材料提醒|content=填写需要读者注意的具体情况。}}</pre></div>
</div>
 
<noinclude>
== 参数 ==
{| class="wikitable"
! 参数名 !! 用法
|-
| <code>title</code> || 区块标题。
|-
| <code>content</code> || 正文内容,支持 Wikitext。
|}
 
[[模板说明#警告卡片|全部模板说明]] · [[编写指南]]
<templatedata>
<templatedata>
{
{
    "params": {
  "description": "突出一项注意事项;参数名使用英文 title 和 content。",
        "title": {
  "format": "block",
            "label": "标题",
  "params": {
            "description": "警告框的标题",
    "title": {
            "type": "string",
      "label": "title",
            "required": true
      "type": "content",
        },
      "description": "区块标题。"
        "content": {
            "label": "内容",
            "description": "具体的警告内容,支持多行文本",
            "type": "content",
            "required": true
        }
     },
     },
     "description": "迷雾Wiki风格的警告/提示卡片"
     "content": {
      "label": "content",
      "type": "content",
      "description": "正文内容,支持 Wikitext。"
    }
  },
  "paramOrder": [
    "title",
    "content"
  ]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

2026年10月13日 (二) 15:57的最新版本

突出一项注意事项;参数名使用英文 title 和 content。

在可视化编辑器中选择“插入 → 模板”,搜索 警告卡片。源代码编辑器中复制下方调用,按参数名填写;不需要写“模板:”前缀。

效果

警告
材料提醒

填写需要读者注意的具体情况。

源代码

{{警告卡片|title=材料提醒|content=填写需要读者注意的具体情况。}}

参数

参数名 用法
title 区块标题。
content 正文内容,支持 Wikitext。

全部模板说明 · 编写指南

突出一项注意事项;参数名使用英文 title 和 content。

模板参数[编辑模板数据]

此模板首选参数换行的代码块格式。

参数描述类型状态
titletitle

区块标题。

内容可选
contentcontent

正文内容,支持 Wikitext。

内容可选
迷雾 Wiki
搜索迷雾 Wiki
阅读设置