Jump to content

Template:Clickable button: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
m improved readability
m support icon-only buttons
Line 3: Line 3:
|{{{4|{{{iconPrimary|}}}}}}
|{{{4|{{{iconPrimary|}}}}}}
|{{{5|{{{iconSecondary|}}}}}}
|{{{5|{{{iconSecondary|}}}}}}
|{{{2|{{{text|}}}}}}
|{{{2|{{{text|<noinclude>x</noinclude>}}}}}}
}} {{{class|}}}" role="button" aria-disabled="false"><!-- // -->{{#if:{{{4|{{{iconPrimary|}}}}}}
}} {{{class|}}}" role="button" aria-disabled="false"><!-- // -->{{#if:{{{4|{{{iconPrimary|}}}}}}
|<span class="ui-button-icon-primary ui-icon {{{4|{{{iconPrimary}}}}}}">&nbsp;</span>
|<span class="ui-button-icon-primary ui-icon {{{4|{{{iconPrimary}}}}}}">&nbsp;</span>
}}{{#if:{{{2|{{{text|<noinclude>Demo</noinclude>}}}}}}
}}<span class="ui-button-text">{{{2|{{{text|Parameter '''text''' is empty}}}}}}</span>{{#if:{{{5|{{{iconSecondary|}}}}}}
|<span class="ui-button-text">{{{2|{{{text|Parameter '''text''' is empty}}}}}}</span>
}}{{#if:{{{5|{{{iconSecondary|}}}}}}
|<span class="ui-button-icon-secondary ui-icon {{{5|{{{iconSecondary|}}}}}}">&nbsp;</span>
|<span class="ui-button-icon-secondary ui-icon {{{5|{{{iconSecondary|}}}}}}">&nbsp;</span>
}}</span>]</span><!--
}}</span>]</span><!--
Line 15: Line 13:
|{{{4|{{{iconPrimary|}}}}}}
|{{{4|{{{iconPrimary|}}}}}}
|{{{5|{{{iconSecondary|}}}}}}
|{{{5|{{{iconSecondary|}}}}}}
|{{{2|{{{text|}}}}}}
|{{{2|{{{text|<noinclude>x</noinclude>}}}}}}
}} {{{class|}}}" role="button" aria-disabled="false"><!-- // -->{{#if:{{{4|{{{iconPrimary|}}}}}}
}} {{{class|}}}" role="button" aria-disabled="false"><!-- // -->{{#if:{{{4|{{{iconPrimary|}}}}}}
|<span class="ui-button-icon-primary ui-icon {{{4|{{{iconPrimary}}}}}}">&nbsp;</span>
|<span class="ui-button-icon-primary ui-icon {{{4|{{{iconPrimary}}}}}}">&nbsp;</span>
}}{{#if:{{{2|{{{text|<noinclude>Demo</noinclude>}}}}}}
}}<span class="ui-button-text">{{{2|{{{text|Parameter '''text''' is empty}}}}}}</span>{{#if:{{{5|{{{iconSecondary|}}}}}}
|<span class="ui-button-text">{{{2|{{{text|Parameter '''text''' is empty}}}}}}</span>
}}{{#if:{{{5|{{{iconSecondary|}}}}}}
|<span class="ui-button-icon-secondary ui-icon {{{5|{{{iconSecondary|}}}}}}">&nbsp;</span>
|<span class="ui-button-icon-secondary ui-icon {{{5|{{{iconSecondary|}}}}}}">&nbsp;</span>
}}</span>]]
}}</span>]]

Revision as of 10:34, 14 September 2013

Parameter text is empty

Template documentation

This template is obsolete, you should use {{Clickable button 2}} instead.

Provides a button with hover effects.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
targettarget 1

The target page of the button. For external links, it is recommended using the named parameter target because they often contain “=” which would confuse the parser.

Linerequired
button texttext 2

Text (caption) the button should carry. Either you specify text or an icon.

Linerequired
external linkexternal 3

Is this an external link? If it is, set to yes or aye, or whatever you like, except nothing.

Lineoptional
primary iconiconPrimary 4

A jQuery UI icon class for the primary icon (in LTR languages on the left side of the button label/text)

Example
ui-icon-gear
Lineoptional
extra CSS classesclass

no description

Example
ui-button-green ui-button-large
Lineoptional
IDid

Unique id to be used as the button's ID-Attribute. Useful for JavaScript-binding and CSS-styling.

Lineoptional
secondary iconiconSecondary 5

A jQuery UI icon class for the secondary icon (in LTR languages on the right side of the button label/text)

Example
ui-icon-triangle-1-s
Lineoptional

See icon examples in the commons:Template:Clickable button 2/Icons.

See also