模板:QuoteBox:修订间差异

来自图琴维基
跳到导航 跳到搜索
无编辑摘要
无编辑摘要
标签已被回退
第1行: 第1行:
<table style="border-spacing: 0px; border: 0px solid lightgray;float:center;margin:auto;width:720px;">
<table style="border-spacing: 0px; border: 0px solid lightgray;float:center;margin:auto;width:720px;">
<tr><td style="width:5px;background:#d9dce3"></td><td style="text-align:left;width:510px;padding-left:20px;"><font size={{#if:{{{textsize|}}}|{{{textsize}}}|4}}>{{{text}}}</font></td>{{#if:{{{source|}}}|<tr><td style="width:5px;background:#d9dce3"></td><td style="text-align:right;">—{{{source}}}</td></td>||}}</tr>
<tr><td style="width:5px;background:#d9dce3"></td><td style="text-align:left;width:510px;padding-left:20px;"><font size={{#if:{{{textsize|}}}|{{{textsize}}}|4}}>{{{text}}}</font></td>{{#if:{{{source|}}}|<tr><td style="width:5px;background:#d9dce3"></td><td style="text-align:right;">—{{{source}}}</td></td>||}}</tr>
</table><br><noinclude>{{Documentation}}</noinclude>
</table><br><noinclude>
<templatedata>
{
  "description": "Displays a centered quote or highlighted text block with optional source attribution.",
  "params": {
    "text": {
      "label": "Text",
      "description": "Main text content to display inside the block.",
      "type": "string",
      "required": true
    },
    "textsize": {
      "label": "Text size",
      "description": "Font size for the main text. Defaults to 4 if not specified.",
      "type": "number",
      "default": "4",
      "suggested": true
    },
    "source": {
      "label": "Source",
      "description": "Optional source or attribution displayed below the text.",
      "type": "string"
    }
  }
}
</templatedata>
 
{{Documentation}}
</noinclude>

2025年12月24日 (三) 07:30的版本

{{{text}}}


Displays a centered quote or highlighted text block with optional source attribution.

模板参数

参数描述类型状态
Texttext

Main text content to display inside the block.

字符串必需
Text sizetextsize

Font size for the main text. Defaults to 4 if not specified.

默认值
4
数字推荐
Sourcesource

Optional source or attribution displayed below the text.

字符串可选
Template-info.png 模板说明文档  [查看] [编辑] [历史] [帮助] [刷新]

此模板用于引用一段文字。其参数为

{{QuoteBox|text=引用的文字|textsize(非必填)=引用文字的字体大小|source=(非必填)引用源}}

例如,输入:

{{QuoteBox|text=这是一段文字|textsize=4|source=这是引用源}}
则我们会得到:
这是一段文字
—这是引用源