Template:Button: Difference between revisions

From Xen
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
<span class="btn {{{style}}}">{{{1}}}</span><noinclude>
<span class="btn {{{style}}}">[[{{{1}}}|{{{name|{{{1}}}]]</span><noinclude>
{{Documentation}}</noinclude>
{{Documentation}}</noinclude>

Revision as of 15:47, 22 June 2013

[[{{{1}}}|{{{name|{{{1}}}]]

[edit] [purge] Template documentation

Usage

Basic

Only use for mediwiki links : the CSS for external links does not (yet) work.

{{Button|[[Sandbox]]}}
{{Button|[[Sandbox|Another Link]]}}

These render as:
[[Sandbox|{{{name|Sandbox]] [[Another Link|{{{name|Another Link]]

Changing the Button Style

You can change the button style, by using the style argument. Note this must be the second argument: the first is always the button text (which should be a link).

{{Button|[[Sandbox]]|style=btn-success}}
{{Button|[[Sandbox|Another Link]]|style=btn-big}}
{{Button|[[Sandbox]]|style=btn-small btn-success}}

These render as:
[[Sandbox|{{{name|Sandbox]] [[Another Link|{{{name|Another Link]] [[Sandbox|{{{name|Sandbox]]

Available Styles

Button Sizes

Style Rendered Button
btn-small [[Sandbox|{{{name|Sandbox]]
(default) [[Sandbox|{{{name|Sandbox]]
btn-big [[Sandbox|{{{name|Sandbox]]

Button Colors

Style Rendered Button
(default) [[Sandbox|{{{name|Sandbox]]
btn-yellow [[Sandbox|{{{name|Sandbox]]
btn-green [[Sandbox|{{{name|Sandbox]]
btn-info [[Sandbox|{{{name|Sandbox]]
btn-success [[Sandbox|{{{name|Sandbox]]
btn-warning [[Sandbox|{{{name|Sandbox]]
btn-danger [[Sandbox|{{{name|Sandbox]]
btn-inverse [[Sandbox|{{{name|Sandbox]]
The above documentation is transcluded from Template:Button/doc. (edit | history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Please add categories and interwikis to the /doc subpage. Subpages of this template.
A print version of this template exists at /Print. If you make a change to this template, please update the print version as well.