Template:Clickable button 2: Difference between revisions

From Sarkarverse
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<span class="plainlinks">[{{#if:{{{url|}}}
{{#invoke:Clickable button 2|main}}<noinclude>
|{{{url}}}
{{documentation}}
|[{{{1|}}}{{!}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
}}<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 | mw-ui-progressive = background-color: #2962CB;
  | ui-button-green | mw-ui-constructive = background-color: #008B6D;
  | ui-button-red | mw-ui-destructive = background-color: #A6170F;
  | #default = background-color: #CCC; color: #666;
}}}} {{{style|}}}">{{#if:{{{url|}}}
|{{#if:{{{1|}}}
  |{{{1}}}
  |{{{url}}}
}}</span>|{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}</span>]
}}]</span>{{#switch:{{lc:{{{class}}}}}|ui-button-green|ui-button-blue|ui-button-red=[[Category:Pages using old style ui-button-color]]|#default=}}<noinclude>
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 12:29, 5 August 2014

Documentation icon Template documentation[view] [edit] [history] [purge]

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