|
|
| 第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> |