模板:Encourage/doc

維基百科,自由的百科全書
跳至導覽 跳至搜尋

語法[編輯]

{{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
}}

可以得到如下樣式:

維基執行主編

模板數據[編輯]

以下是該模板的模板資料,適用於視覺化編輯器等工具。

Encourage模板資料

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