Template:Clickable button 2: Difference between revisions

From Sarkarverse
Jump to navigation Jump to search
m (1 revision)
 
m (1 revision)
 
(3 intermediate revisions 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="submit ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only {{{class|}}}" role="button" aria-disabled="false" {{#ifeq:{{{1}}}|{{FULLPAGENAME}}|style{{=}}"cursor: default"}}><span class="ui-button-text" {{#ifeq:{{{1}}}|{{FULLPAGENAME}}
|{{#switch:{{{class}}}
  |ui-button-blue=style{{=}}"background-color:#008"
  |ui-button-green=style{{=}}"background-color:#060"
  |ui-button-red=style{{=}}"background-color:#802"
  |#default=style{{=}}"background-color:#dadada;color:black"
}}
}}>{{#if:{{{url|}}}
|{{#if:{{{1|}}}
  |{{{1}}}
  |{{{url}}}
}}</span></span>|{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}</span></span>]
}}]</span><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