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 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}}|style{{=}}"cursor: default"}}><span class="ui-button-text" {{#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}}}
  {{#switch:{{{class|}}}
   |ui-button-blue=style{{=}}"background-color:#008"
   | ui-button-blue | mw-ui-progressive = background-color: #2962CB;
   |ui-button-green=style{{=}}"background-color:#060"
   | ui-button-green | mw-ui-constructive = background-color: #008B6D;
   |ui-button-red=style{{=}}"background-color:#802"
   | ui-button-red | mw-ui-destructive = background-color: #A6170F;
   |#default=style{{=}}"background-color:#dadada;color:black"
   | #default = background-color: #CCC; color: #666;
  }}
  }}}} {{{style|}}}">{{#if:{{{url|}}}
}}>{{#if:{{{url|}}}
  |{{#if:{{{1|}}}
  |{{#if:{{{1|}}}
   |{{{1}}}
   |{{{1}}}
   |{{{url}}}
   |{{{url}}}
  }}</span></span>|{{#if:{{{2|}}}|{{{2|}}}|{{{1|}}}}}</span></span>]
  }}</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

[[|]]

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