打开/关闭菜单
打开/关闭个人菜单
未登录
如果您进行任何编辑,您的IP地址会公开展示。

Template:链接按钮:修订间差异

模板页面
添加的内容 删除的内容
(添加类别)
无编辑摘要
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
{{#if:{{{external|}}}
{{#if:{{{disabled|}}}
|<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>
|<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|}}}
|[[{{{link|首页}}}|<span class="mw-ui-button mw-ui-progressive mw-ui-small" {{#if:{{{color|}}}|style="border-color: {{{color|}}}; background-color: {{{color|}}}"|}}>{{{text|首页}}}</span>]]
|<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>
}}<noinclude>
|[[{{{link|首页}}}|<span class="mw-ui-button mw-ui-{{{mode|progressive}}} mw-ui-small" {{#if:{{{color|}}}|style="border-color: {{{color|}}}; background-color: {{{color|}}}"|}}>{{{text|首页}}}</span>]]
}}}}<noinclude>
{{doc}}
{{doc}}
<templatedata>
<templatedata>
第9行: 第11行:
"external": {
"external": {
"description": "决定按钮指向的是内链还是外链。留空为内链,填1为外链。",
"description": "决定按钮指向的是内链还是外链。留空为内链,填1为外链。",
"type": "number",
"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": "line",
"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",
"color"
"mode",
"color",
]
"disabled"
],
"format": "inline"
}
}
</templatedata>
</templatedata>

2023年12月1日 (五) 23:55的最新版本

首页

模板文档[查看] [编辑] [历史] [清除缓存]

本模板会在页面上添加一个按钮,指向一个内部或外部链接。

参数列表[编辑源代码]

参数名 说明 支持内容
external 指定链接是内部链接还是外部链接。可选。 数字1,或者留空。
link 指定链接目标。必填。 若external变量为空,填写本站点页面的完整标题(即包括命名空间)。
若external变量不为空,填写外部页面的URL。
默认内链为首页,默认外链为DL·RS同人群官网。
text 指定显示在按钮上的文本。必填。 恰当描述目标页面内容的标题。
mode 调用OOUI按钮的默认模式。可选。 progressivedefault、或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同人作品下载页面}}

效果:DL·RS同人作品下载页面


{{链接按钮|external=1|link=https://chinadlrs.com/app/|text=DL·RS同人作品下载页面|color=#ef5351}}

效果:DL·RS同人作品下载页面


{{链接按钮|link=跳舞的线|text=原作页面|disabled=1}}

效果:原作页面


{{链接按钮|link=跳舞的线|text=原作页面|mode=default}}

效果:原作页面


{{链接按钮|link=跳舞的线|text=原作页面|mode=destructive}}

效果:原作页面

上述文档嵌入自Template:链接按钮/doc(编辑 | 历史)

添加一个链接到指定页面的按钮。

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

此模板首选参数不换行的行内格式。

参数描述类型状态
外链external

决定按钮指向的是内链还是外链。留空为内链,填1为外链。

推荐值
1
布尔可选
目标链接link

指定按钮所链接到的页面。external参数为空时填写页面的’‘’完整名称‘’‘(包括命名空间),参数不为空时填写外部URL。

内容必需
按钮文本text

指定按钮上显示的文本。

wikitext片段必需
模式mode

使用OOUI按钮的默认模式。

推荐值
progressive default destructive
字符串可选
颜色color

指定按钮的颜色。

示例值
#C00000
单行文本可选
禁用disabled

填入数据以禁用按钮。

推荐值
1
布尔可选
我们提供服务需要使用Cookie。您使用我们的服务,即表示您同意我们使用Cookie。