Шаблон:Clickable button: различия между версиями

Материал из Ведопедии
Перейти к навигации Перейти к поиску
(| green = mw-ui-constructive)
Метка: Выполнено через Tor
м (.)
Метка: Выполнено через Tor
 
(не показано 8 промежуточных версий этого же участника)
Строка 1: Строка 1:
 
<span class="mw-ui-button {{#switch: {{{color|white}}}
<pre>
 
 
| red = mw-ui-destructive
Usage:
 
 
| blue = mw-ui-progressive
 
| white =
  +
| big-red = mw-ui-destructive mw-ui-big
  +
| big-blue = mw-ui-progressive mw-ui-big
  +
| big-white = mw-ui-big
 
}}">
 
{{{1|Button text}}}</span>
  +
<noinclude>
  +
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
  +
{{documentation}}
   
 
==Usage==
</pre>
 
  +
Unnamed parameters:
  +
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''TEXT'' <nowiki>}}</nowiki></code>
  +
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | ''TEXT'' | ''COLOR'' <nowiki>}}</nowiki></code>
   
  +
Named parameters:
<span class="mw-ui-button
 
  +
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 1= ''TEXT'' <nowiki>}}</nowiki></code>
{{#switch: {{{color|white}}}
 
  +
* <code><nowiki>{{</nowiki>{{BASEPAGENAME}} | 1= ''TEXT'' | color= ''COLOR'' <nowiki>}}</nowiki></code>
| red = mw-ui-destructive
 
  +
| green = mw-ui-constructive
 
  +
Button with wikilink:
| white =
 
  +
* <code><nowiki>[[ WIKILINK | {{</nowiki>{{BASEPAGENAME}} | ''TEXT'' <nowiki>}} ]]</nowiki></code>
| blue = mw-ui-progressive
 
  +
* <code><nowiki>[[ WIKILINK | {{</nowiki>{{BASEPAGENAME}} | ''TEXT'' | color= ''COLOR'' <nowiki>}} ]]</nowiki></code>
}}
 
  +
" role="button" aria-disabled="false">
 
  +
== Examples ==
{{{1|Button text}}}
 
  +
</span>
 
  +
=== Parameter: 1 (1) ===
  +
  +
Example: <code><nowiki>{{Clickable button|This looks like a button}}</nowiki></code>
  +
: Result: {{Clickable button|This looks like a button}}
  +
  +
Example: <code><nowiki>[[Talk:Main Page|{{Clickable button|Main page talk page}}]]</nowiki></code>
  +
: Result: [[Talk:Main Page|{{Clickable button|Main page talk page}}]]
  +
  +
=== Parameter: color= ===
  +
You can select three colors: white (default), blue (progressive) and red (destructive):
  +
  +
Red (Destructive) example: <code><nowiki>{{Clickable button|Button text|color=red}}</nowiki></code>
  +
: Result: {{Clickable button|Button text|color=red}}
  +
  +
Blue (Progressive) example: <code><nowiki>{{Clickable button|Button text|color=blue}}</nowiki></code>
  +
: Result: {{Clickable button|Button text|color=blue}}
  +
  +
White (Default) example: <code><nowiki>{{Clickable button|Button text|color=white}}</nowiki></code>
  +
: Result: {{Clickable button|Button text|color=white}}
  +
  +
  +
Big button in Red (Destructive) example: <code><nowiki>{{Clickable button|Button test|color=big-red}}</nowiki></code>
  +
: Result: {{Clickable button|Button test|color=big-red}}
  +
  +
Big button in Blue (Progressive) example: <code><nowiki>{{Clickable button|Button test|color=big-blue}}</nowiki></code>
  +
: Result: {{Clickable button|Button test|color=big-blue}}
  +
  +
Big button in White example: <code><nowiki>{{Clickable button|Button test|color=big-white}}</nowiki></code>
  +
: Result: {{Clickable button|Button test|color=big-white}}
  +
  +
  +
'''Note:''' After the changes outlined in Phabricator task {{Phab|T110555}} were implemented, <code><nowiki>{{Clickable button|color=green}}</nowiki></code> produces the same output as <code><nowiki>{{Clickable button|color=blue}}</nowiki></code>.
  +
</noinclude>

Текущая версия от 23:05, 8 декабря 2020

Button text

Шаблон:documentation

Usage

Unnamed parameters:

  • {{Clickable button | TEXT }}
  • {{Clickable button | TEXT | COLOR }}

Named parameters:

  • {{Clickable button | 1= TEXT }}
  • {{Clickable button | 1= TEXT | color= COLOR }}

Button with wikilink:

  • [[ WIKILINK | {{Clickable button | TEXT }} ]]
  • [[ WIKILINK | {{Clickable button | TEXT | color= COLOR }} ]]

Examples

Parameter: 1 (1)

Example: {{Clickable button|This looks like a button}}

Result:

This looks like a button


Example: [[Talk:Main Page|{{Clickable button|Main page talk page}}]]

Result: Main page talk page

Parameter: color=

You can select three colors: white (default), blue (progressive) and red (destructive):

Red (Destructive) example: {{Clickable button|Button text|color=red}}

Result:

Button text


Blue (Progressive) example: {{Clickable button|Button text|color=blue}}

Result:

Button text


White (Default) example: {{Clickable button|Button text|color=white}}

Result:

Button text


Big button in Red (Destructive) example: {{Clickable button|Button test|color=big-red}}

Result:

Button test


Big button in Blue (Progressive) example: {{Clickable button|Button test|color=big-blue}}

Result:

Button test


Big button in White example: {{Clickable button|Button test|color=big-white}}

Result:

Button test


Note: After the changes outlined in Phabricator task Шаблон:Phab were implemented, {{Clickable button|color=green}} produces the same output as {{Clickable button|color=blue}}.