Template:Clickable button 2/doc

From Corr-Proust Wiki
Jump to navigation Jump to search

{{#ifeq:doc |doc

    | 

{{#ifeq:show |show

         | Template:Mbox
        }}{{#if: |
         |   {{#ifexist:Template:Clickable button 2
                  | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  |
                 }}
        }}
    | 
   }}

{{#invoke:High-use|main|1= 586256 |2=|all-pages=|info=|demo=|form=|expiry=}} {{#invoke:Message box|ombox}}{{#if:{{#ifeq:{{#invoke:String|sublength|s=doc|i=0|len=7}}|sandbox|1}}{{#ifeq:doc|doc|1}}{{#invoke:String|match|Clickable button 2/doc|/sandbox/styles.css$|plain=false|nomatch=}}||{{#switch:{{#invoke:Effective protection level|{{#switch:Template|File=upload|#default=edit}}|Template:Clickable button 2/doc}}|sysop|templateeditor|interfaceadmin=|#default=Template:Category handler}}}}

{{#invoke:Lua banner|main}}

This template styles a link like a button, using the mediawiki.ui.button module. This expands the clickable area and tap target for the link. It can be used in the following ways,

Note: After the changes outlined in Phabricator task {{#if:|Phabricator: }}{{#ifeq:T|T |T110555{{#if:| ({{{label1}}})}} |TT110555}}{{#if:|Template:Nbsp• [[Phabricator:T{{{2}}}|T{{{2}}}]]}}{{#if:| ({{{label2}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{3}}}|T{{{3}}}]]}}{{#if:| ({{{label3}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{4}}}|T{{{4}}}]]}}{{#if:| ({{{label4}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{5}}}|T{{{5}}}]]}}{{#if:| ({{{label5}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{6}}}|T{{{6}}}]]}}{{#if:| ({{{label6}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{7}}}|T{{{7}}}]]}}{{#if:| ({{{label7}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{8}}}|T{{{8}}}]]}}{{#if:| ({{{label8}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{9}}}|T{{{9}}}]]}}{{#if:| ({{{label9}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{10}}}|T{{{10}}}]]}}{{#if:| ({{{label10}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{11}}}|T{{{11}}}]]}}{{#if:| ({{{label11}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{12}}}|T{{{12}}}]]}}{{#if:| ({{{label12}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{13}}}|T{{{13}}}]]}}{{#if:| ({{{label13}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{14}}}|T{{{14}}}]]}}{{#if:| ({{{label14}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{15}}}|T{{{15}}}]]}}{{#if:| ({{{label15}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{16}}}|T{{{16}}}]]}}{{#if:| ({{{label16}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{17}}}|T{{{17}}}]]}}{{#if:| ({{{label17}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{18}}}|T{{{18}}}]]}}{{#if:| ({{{label18}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{19}}}|T{{{19}}}]]}}{{#if:| ({{{label19}}})}}{{#if:|Template:Nbsp• [[Phabricator:T{{{20}}}|T{{{20}}}]]}}{{#if:| ({{{label20}}})}}{{#if:| ({{{label1}}})}} were implemented, {{Clickable button 2|Main Page|class=mw-ui-constructive}} produces the same output as {{Clickable button 2|Main Page|class=mw-ui-progressive}}.

Template data

<templatedata> { "params": { "1": { "required": true, "label": "Link/Label", "description": "Defines the page to link to, and uses that page's title as the text for the button", "example": "Foobar", "type": "wiki-page-name" }, "2": { "suggested": true, "label": "Label", "description": "Defines the text that appears on the button" }, "url": { "type": "url", "label": "URL", "description": "Defines a web address for the button to link to", "example": "https://www.example.com" }, "class": { "type": "string", "description": "Defines the visual type of the button", "example": "mw-ui-progressive, mw-ui-destructive" }, "style": { "type": "string" }, "category": { "type": "boolean" } }, "description": "Styles a link like a button, using the mediawiki.ui.button module", "format": "inline" } </templatedata>

See also

{{#invoke:Navbox|navbox}}