Template:Clickable button 2: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
|{{{url}}} | |{{{url}}} | ||
|[{{{1|}}}{{!}} | |[{{{1|}}}{{!}} | ||
}}<span class="submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only {{{class|}}}" role="button" aria-disabled="false" {{#ifeq:{{{1}}}|{{FULLPAGENAME}}| | }}<span class="{{#switch:{{lc:{{{class|}}}}}|ui-button-green|ui-button-blue|ui-button-red=submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-button-text|#default=mw-ui-button}} {{{class|}}}" role="button" aria-disabled="false" style="{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME}}|cursor: default; | ||
{{#switch:{{{class|}}} | |||
|ui-button-blue= | | ui-button-blue | mw-ui-progressive = background-color: #2962CB; | ||
|ui-button-green= | | ui-button-green | mw-ui-constructive = background-color: #008B6D; | ||
|ui-button-red= | | ui-button-red | mw-ui-destructive = background-color: #A6170F; | ||
|#default= | | #default = background-color: #CCC; color: #666; | ||
}} | }}}} {{{style|}}}">{{#if:{{{url|}}} | ||
}}>{{#if:{{{url|}}} | |||
|{{#if:{{{1|}}} | |{{#if:{{{1|}}} | ||
|{{{1}}} | |{{{1}}} | ||
|{{{url}}} | |{{{url}}} | ||
}} | }}</span>|{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}</span>] | ||
}}]</span><noinclude> | }}]</span>{{#switch:{{lc:{{{class}}}}}|ui-button-green|ui-button-blue|ui-button-red=[[Category:Pages using old style ui-button-color]]|#default=}}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 14:33, 25 April 2014
[[|]]
This template generates a clickable button that is styled using the mediawiki.ui.button module. It can be used in the following ways,
- Code:
{{Clickable button 2|Main Page}}
- Code:
{{Clickable button 2|Main Page|Cover page}}
- Code:
{{Clickable button 2|Home|url=http://en.wikipedia.org}}
- Code:
{{Clickable button 2|Main Page|class=mw-ui-constructive}}
- Code:
{{Clickable button 2|Main Page|class=mw-ui-destructive}}
- Code:
{{Clickable button 2|Main Page|class=mw-ui-progressive}}
Note that if a browser does not have JavaScript enabled then no button is displayed but the text will still be displayed.
See also
- commons:Template:Clickable button, corresponding clickable button at Commons.
|
The above documentation is transcluded from Template:Clickable button 2/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |