Template:Clickable button 2/doc: Difference between revisions

From escforumwiki
Jump to navigation Jump to search
en>Bijugayuwiki
No edit summary
Santos (talk | contribs)
m 42 revisions imported
 
(8 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{High-risk|400,000+}}
{{template shortcut|CLB2|Click}}
{{Used in system}}
{{template shortcut|CLB2}}
{{lua|Module:Clickable button 2}}
{{lua|Module:Clickable button 2}}


Line 26: Line 24:
"1": {
"1": {
"required": true,
"required": true,
"label": "Link/Label"
"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": {
"2": {
"suggested": true,
"suggested": true,
"label": "Label"
"label": "Label",
"description": "Defines the text that appears on the button"
},
},
"url": {
"url": {
"type": "url",
"type": "url",
"label": "URL"
"label": "URL",
"description": "Defines a web address for the button to link to",
"example": "https://www.example.com"
},
},
"class": {
"class": {
"type": "string",
"type": "string",
"autovalue": ""
"description": "Defines the visual type of the button",
"example": "mw-ui-progressive, mw-ui-destructive"
},
},
"style": {
"style": {
Line 47: Line 52:
}
}
},
},
"description": "A writer, teacher, and blogger, Biju P. R, tracks the trinity of society, everyday technology and social change. Biju has authored the book Selfie Sex: How Internet Spoiled Our Intimacies, (Kalamos 2018); Political Internet: State and Politics in the Age of Social Media (Routledge 2017), Intimate Speakers: Why Introverted and Socially Ostracized Citizens Use Social Media (Fingerprint! 2017), has finished the typescript of two books—first, Digital Ghettos: Hate and Gossip Proliferates on Social Media (Under Peer Review in Routledge); and second, A Big Hug to Fara, a novel—and is presently working on a narrative non-fiction with the working title Lovescape: Why India is afraid of love (Under Peer review in Penguin, Sage, OUP and Rupa). His next work is Democracy and Social media. Biju is a peer reviewer for reputed impact factor journal- the Asian Journal of Communication (Routledge). He is a contributor to the South Asia Politics, Indian Journal of Political Science and various online outlets such as Merinews, India Opines, and countercurrents.org. He has written extensively on the interplay between every day technology and society, in popular web journals, academic outlets, and online news portals. \nHe currently works as an Assistant Professor at the Department of Political Science, Government Brennen College, in Thalassery, Kerala, India. \n\n\n",
"description": "Styles a link like a button, using the mediawiki.ui.button module",
"format": "inline"
"format": "inline"
}
}
Line 54: Line 59:
=== See also ===
=== See also ===
* [[commons:Template:Clickable button]], corresponding clickable button at Commons.
* [[commons:Template:Clickable button]], corresponding clickable button at Commons.
* [https://design.wikimedia.org/style-guide/components/buttons.html Wikimedia design style guide advice on buttons]


{{Button templates}}
{{Button templates}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<includeonly>{{Sandbox other||
<!-- Categories and interwikis go here: -->
<!-- Categories and interwikis go here: -->
[[Category:Wikipedia formatting and function templates]]
[[Category:Wikipedia formatting and function templates]]

Latest revision as of 19:32, 8 June 2022

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,

  • Code: {{Clickable button 2|Main Page}}
  • Code: {{Clickable button 2|Main Page|Cover page}}
  • Code: {{Clickable button 2|Main Page|url=http://en.wikipedia.org}}
  • Code: {{Clickable button 2|Main Page|class=mw-ui-destructive}}
  • Code: {{Clickable button 2|Main Page|class=mw-ui-progressive}}

Note: After the changes outlined in Phabricator task T110555 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

Styles a link like a button, using the mediawiki.ui.button module

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Link/Label1

Defines the page to link to, and uses that page's title as the text for the button

Example
Foobar
Page namerequired
Label2

Defines the text that appears on the button

Unknownsuggested
URLurl

Defines a web address for the button to link to

Example
https://www.example.com
URLoptional
classclass

Defines the visual type of the button

Example
mw-ui-progressive, mw-ui-destructive
Stringoptional
stylestyle

no description

Stringoptional
categorycategory

no description

Booleanoptional

See also