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

Материал из Ведопедии
Перейти к навигации Перейти к поиску
(documentation)
Метка: Выполнено через Tor
(add colors)
Метка: Выполнено через Tor
Строка 1: Строка 1:
<span class="mw-ui-button {{#switch: {{{color|white}}} | red = mw-ui-destructive | green = mw-ui-constructive | white = | blue = mw-ui-progressive}}">{{{1|Button text}}}</span>
+
<span class="mw-ui-button {{#switch: {{{color|white}}}
  +
| red = mw-ui-destructive
  +
| green = mw-ui-constructive
  +
| blue = mw-ui-progressive
  +
| white =
  +
| yellow = #FFFCCC
  +
| violet = #CC66FF
  +
}}"
  +
>{{{1|Button text}}}</span>
 
<noinclude>
 
<noinclude>
 
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
 
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->

Версия от 21:27, 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):

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

Result: Button text


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

Result: Button text


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

Result: Button text


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