添加的内容 删除的内容
小 (添加类别) |
小无编辑摘要 |
||
(未显示同一用户的3个中间版本) | |||
第1行: | 第1行: | ||
{{#if:{{{ |
{{#if:{{{disabled|}}} |
||
|<span class="mw-ui-button mw-ui-{{{mode|progressive}}} mw-ui-small" style="background-color:#c8ccd1;color:#ffffff;border-color:#c8ccd1;cursor:default;pointer-events:none;">{{{text|首页}}}</span> |
|||
|{{#if:{{{external|}}} |
|||
⚫ | |||
|<span class="plainlinks">[{{{link|https://chinadlrs.com/}}} <span class="mw-ui-button mw-ui-progressive mw-ui-small" {{#if:{{{color|}}}|style="border-color: {{{color|}}}; background-color: {{{color|}}}"|}}>{{{text|DL·RS 同人群官方网站}}}</span>]</span> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
{{doc}} |
{{doc}} |
||
<templatedata> |
<templatedata> |
||
第9行: | 第11行: | ||
"external": { |
"external": { |
||
"description": "决定按钮指向的是内链还是外链。留空为内链,填1为外链。", |
"description": "决定按钮指向的是内链还是外链。留空为内链,填1为外链。", |
||
"type": " |
"type": "boolean", |
||
"suggestedvalues": [ |
"suggestedvalues": [ |
||
"1" |
"1" |
||
] |
], |
||
"label": "外链" |
|||
}, |
}, |
||
"link": { |
"link": { |
||
"description": "指定按钮所链接到的页面。external参数为空时填写页面的’‘’完整名称‘’‘(包括命名空间),参数不为空时填写外部URL。", |
"description": "指定按钮所链接到的页面。external参数为空时填写页面的’‘’完整名称‘’‘(包括命名空间),参数不为空时填写外部URL。", |
||
"type": "content", |
"type": "content", |
||
"required": true |
"required": true, |
||
"label": "目标链接" |
|||
}, |
}, |
||
"color": { |
"color": { |
||
"description": "指定按钮的颜色。", |
"description": "指定按钮的颜色。", |
||
"type": "line" |
"type": "line", |
||
"label": "颜色", |
|||
"example": "#C00000" |
|||
}, |
}, |
||
"text": { |
"text": { |
||
"description": "指定按钮上显示的文本。", |
"description": "指定按钮上显示的文本。", |
||
"type": " |
"type": "unbalanced-wikitext", |
||
"required": true |
"required": true, |
||
"label": "按钮文本" |
|||
}, |
|||
"disabled": { |
|||
"description": "填入数据以禁用按钮。", |
|||
"type": "boolean", |
|||
"suggestedvalues": [ |
|||
"1" |
|||
], |
|||
"label": "禁用" |
|||
}, |
|||
"mode": { |
|||
"label": "模式", |
|||
"description": "使用OOUI按钮的默认模式。", |
|||
"type": "string", |
|||
"suggestedvalues": [ |
|||
"progressive", |
|||
"default", |
|||
"destructive" |
|||
] |
|||
} |
} |
||
}, |
}, |
||
第34行: | 第59行: | ||
"link", |
"link", |
||
"text", |
"text", |
||
" |
"mode", |
||
"color", |
|||
⚫ | |||
"disabled" |
|||
⚫ | |||
"format": "inline" |
|||
} |
} |
||
</templatedata> |
</templatedata> |
2023年12月1日 (五) 23:55的最新版本
本模板会在页面上添加一个按钮,指向一个内部或外部链接。
参数列表[编辑源代码]
参数名 | 说明 | 支持内容 |
---|---|---|
external | 指定链接是内部链接还是外部链接。可选。 | 数字1,或者留空。 |
link | 指定链接目标。必填。 | 若external变量为空,填写本站点页面的完整标题(即包括命名空间)。 若external变量不为空,填写外部页面的URL。 默认内链为首页,默认外链为DL·RS同人群官网。 |
text | 指定显示在按钮上的文本。必填。 | 恰当描述目标页面内容的标题。 |
mode | 调用OOUI按钮的默认模式。可选。 | progressive 、default 、或destructive 。
|
color | 指定按钮的颜色。可选。 受限于技术,指定颜色后鼠标悬浮在按钮后颜色不会变浅。 |
所有CSS支持的颜色格式,如HTML颜色名、HEX颜色码、RGB颜色码、RGBA颜色码、HSL颜色码等。不建议使用过浅的颜色。 默认使用 MediaWiki 预定义的按钮颜色 #3366cc。 |
disabled | 禁用按钮。可选。 禁用后按钮统一变为灰色,链接和动画失效。 |
数字1,或者留空。 |
示例[编辑源代码]
{{链接按钮|link=跳舞的线|text=原作页面}}
{{链接按钮|link=Project:社区公约|text=跳舞的线及其饭制作品社区公约}}
{{链接按钮|external=1|link=https://chinadlrs.com/app/|text=DL·RS同人作品下载页面}}
{{链接按钮|external=1|link=https://chinadlrs.com/app/|text=DL·RS同人作品下载页面|color=#ef5351}}
{{链接按钮|link=跳舞的线|text=原作页面|disabled=1}}
效果:
{{链接按钮|link=跳舞的线|text=原作页面|mode=default}}
{{链接按钮|link=跳舞的线|text=原作页面|mode=destructive}}
上述文档嵌入自Template:链接按钮/doc。(编辑 | 历史)
添加一个链接到指定页面的按钮。
参数 | 描述 | 类型 | 状态 | |
---|---|---|---|---|
外链 | external | 决定按钮指向的是内链还是外链。留空为内链,填1为外链。
| 布尔 | 可选 |
目标链接 | link | 指定按钮所链接到的页面。external参数为空时填写页面的’‘’完整名称‘’‘(包括命名空间),参数不为空时填写外部URL。 | 内容 | 必需 |
按钮文本 | text | 指定按钮上显示的文本。 | wikitext片段 | 必需 |
模式 | mode | 使用OOUI按钮的默认模式。
| 字符串 | 可选 |
颜色 | color | 指定按钮的颜色。
| 单行文本 | 可选 |
禁用 | disabled | 填入数据以禁用按钮。
| 布尔 | 可选 |