跳到正文
编写
登录

模板:统计卡片:修订间差异

更多
Musicraft​(留言 | 贡献)
无编辑摘要
迷雾样式迁移​(留言 | 贡献)
统一编年史字体、正文组件与编辑模板;保留原始内容和历史
第1行: 第1行:
<div style="flex: 1 1 180px; min-width: 155px; background: #141414; border: 1px solid #262626; border-top: 3px solid {{{color|#66bb6a}}}; padding: 20px 16px; border-radius: 5px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,0.5);"><div style="font-size: 2.4rem; font-weight: 700; color: {{{color|#66bb6a}}}; font-family: Consolas, monospace; line-height: 1; letter-spacing: -1px;">{{PAGESINCATEGORY:{{{category|}}}|{{{type|pages}}}}}</div><div style="font-size: 0.72rem; color: #4e4e4e; margin-top: 10px; letter-spacing: 0.14em; text-transform: uppercase; font-family: Consolas, monospace;">{{{label|}}}</div></div><noinclude>
<includeonly>{{数据统计|数值={{PAGESINCATEGORY:{{{category|}}}|{{{type|pages}}}}}|标签={{{label|统计}}}}}</includeonly><noinclude>
== 使用说明 ==
[[编写模板|← 编辑组件手册]]
渲染单张分类计数卡片,须搭配 [[Template:统计栏头]] 与 [[Template:统计栏尾]] 使用。


=== 参数一览 ===
编年史统一编辑组件。用法和示例见 [[编写模板]]。
{| class="wikitable"
! 参数名 !! 是否必填 !! 说明 !! 默认值
|-
| <code>category</code> || '''必填''' || 要统计的分类名(不含 <code>Category:</code> 前缀) || —
|-
| <code>label</code> || 建议填写 || 卡片下方的说明文字 || 空
|-
| <code>color</code> || 可选 || 顶部色条的CSS 颜色值 || <code>#66bb6a</code>
|-
| <code>type</code> || 可选 || 统计类型:<code>pages</code> / <code>subcats</code> / <code>files</code> || <code>pages</code>
|}
 
=== 示例 ===
<pre>
{{统计卡片|category=ARG档案|label=已收录档案|color=#66bb6a}}
</pre>
<templatedata>
<templatedata>
{
{
"params": {
  "description": "编年史统一编辑组件。用法和示例见 [[编写模板]]。",
"color": {
  "format": "block",
"description": "顶部色条和下面数字的颜色值 ",
  "params": {
"suggestedvalues": [
    "category": {
"#66bb6a",
      "label": "category",
"#29b6f6",
      "type": "content"
"#5c6bc0",
    },
"#ffa726",
    "type": {
"#ef5350",
      "label": "type",
"#78909c",
      "type": "content"
"#ab47bc",
    },
"#26c6da"
    "label": {
]
      "label": "label",
},
      "type": "content"
"category": {
    }
"description": "要统计的分类名(不含 Category: 前缀)",
  }
"required": true
},
"type": {},
"label": {
"description": "卡片下方的说明文字",
"suggested": true
}
},
"description": "渲染单张分类计数卡片,须搭配 [[Template:统计栏头]] 与 [[Template:统计栏尾]] 使用。"
}
}
</templatedata></noinclude>
</templatedata>
</noinclude>

2026年10月13日 (二) 13:33的版本

← 编辑组件手册

编年史统一编辑组件。用法和示例见 编写模板。

编年史统一编辑组件。用法和示例见 [[编写模板]]。

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

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

参数描述类型状态
categorycategory

无描述

内容可选
typetype

无描述

内容可选
labellabel

无描述

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