模板:Encourage
| File:Ambox warning yellow.svg | 本模板含有复杂而精密的扩展语法。 编辑本模板前,建议您先熟悉解析器函数与本模板的设计思路、运作原理等。若您的编辑引发了意外的问题,请尽快撤销编辑,因为本模板可能被大量页面使用。 您所作的编辑可先在模板沙盒或您的个人页面中进行测试。 |
语法[编辑]
{{Encourage
|title =
|stripe =
|bgcolor =
|stripecolor =
|fontcolor =
|align =
|link =
}}
|
荣誉名称(必须填写) 直条数量(0或1或2) 背景颜色(默认为金色) 直条颜色(默认为红色) 字体颜色(默认为黑色) 对齐方式(默认为右侧) 分类链接(默认为荣誉名称) |
使用方法[编辑]
在荣誉模板中加入以下编码:
{{Encourage
|title = 維基執行編輯
|stripe = 1
}}
即可得出右面的样式:
| 维基执行编辑 |
{{Encourage
|title = 维基执行主编
|stripe = 2
|bgcolor = silver
|stripecolor = gold
|fontcolor = red
|align = left
}}
可以得到如下样式:
| 维基执行主编 |
模板数据[编辑]
<templatedata> { "description": "", "params": { "class": { "label": "class", "type": "string", "required": false, "description": "" }, "align": { "label": "对齐", "type": "string", "required": false, "description": "填写left(向左对齐)或right(向右对齐),默认为向右对齐" }, "bgcolor": { "label": "背景颜色", "type": "string", "required": false, "description": "填写颜色,默认为golden(金色)" }, "stripe": { "label": "绶带数量", "type": "string", "required": false, "description": "绶带数量,只能填写1、2、3,填写其余数字则视为0。默认为0。" }, "stripecolor": { "label": "绶带颜色", "type": "string", "required": false, "description": "绶带颜色,默认为红色。" }, "stripecolor1": { "label": "绶带颜色1", "type": "string", "required": false, "description": "从左到右第1条绶带颜色,默认为红色或stripecolor输入的颜色,优先级高于stripecolor。" }, "stripecolor2": { "label": "绶带颜色2", "type": "string", "required": false, "description": "从左到右第2条绶带颜色,默认为红色或stripecolor输入的颜色,优先级高于stripecolor。" }, "stripecolor3": { "label": "绶带颜色3", "type": "string", "required": false, "description": "从左到右第3条绶带颜色,默认为红色或stripecolor输入的颜色,优先级高于stripecolor。" }, "image": { "label": "图片", "type": "string", "required": false, "description": "在左端显示图片,仅stripe值为0时可用" }, "imagesize": { "label": "图片大小", "type": "string", "required": false, "description": "左端显示图片的大小,默认为15px" }, "link": { "label": "链接", "type": "string", "required": false, "description": "左端显示图片的大小,默认为title所填写对应的Category命名空间" }, "title": { "label": "文字", "type": "string", "required": true, "description": "显示的文字" }, "fontcolor": { "label": "文字颜色", "type": "string", "required": false, "description": "文字颜色,默认为黑色" }, "fontweight": { "label": "fontweight", "type": "string", "required": false, "description": "" } } } </templatedata>