Difference between revisions of "Template:Button"

From LFS Manual
Jump to navigationJump to search
m
m
Line 2: Line 2:
 
--><span class="nowrap" style="color: {{#ifeq:{{{2|}}}|light|black|white}}; padding: 3px 6px; border: 0; background-color: {{#ifeq:{{{2|}}}|light|rgb(200,200,200,0.4)|{{#ifeq:{{{2|}}}|green|rgb(117 180 76)|rgb(5,0,0,0.3)}}}}; border-radius: 4px; font-weight: bold;">{{{text|{{{1}}}}}}</span><!--
 
--><span class="nowrap" style="color: {{#ifeq:{{{2|}}}|light|black|white}}; padding: 3px 6px; border: 0; background-color: {{#ifeq:{{{2|}}}|light|rgb(200,200,200,0.4)|{{#ifeq:{{{2|}}}|green|rgb(117 180 76)|rgb(5,0,0,0.3)}}}}; border-radius: 4px; font-weight: bold;">{{{text|{{{1}}}}}}</span><!--
 
--><noinclude>
 
--><noinclude>
== Template documentation ==
+
{{documentation|
 
This template allows you to illustrate LFS buttons in the current style. For the old-styled buttons, see template: [[Template:Old button|Old button]].
 
This template allows you to illustrate LFS buttons in the current style. For the old-styled buttons, see template: [[Template:Old button|Old button]].
<div>
+
 
Variants:
 
{{button|default}}
 
{{button|light|light}}
 
</div>
 
 
=== Parameters ===
 
=== Parameters ===
 +
 
* first (required): shown text
 
* first (required): shown text
 
* second (optional): variant; set to "light" for the light variant
 
* second (optional): variant; set to "light" for the light variant
 +
 
=== Examples ===
 
=== Examples ===
<pre>
+
 
{{button|Display}}
+
{{markup|
</pre>
+
<nowiki>{{button|Display}}</nowiki>|{{button|Display}}}}<!-- Template:Mra -->
Renders as: {{button|Display}}
+
{{markup|
<pre>
+
<nowiki>{{button|in car|light}}</nowiki>|{{button|in car|light}}}}<!-- Template:Mra -->
{{button|in car|light}}
+
{{markup|
</pre>
+
<nowiki>{{button|in car|green}}</nowiki>|{{button|in car|green}}}}<!-- Template:Mra -->
Renders as: {{button|in car|light}}
+
}}
<pre>
 
{{button|in car|green}}
 
</pre>
 
Renders as: {{button|in car|green}}
 
 
[[Category:LFS button templates]]
 
[[Category:LFS button templates]]
 
</noinclude>
 
</noinclude>

Revision as of 01:40, 3 December 2023

{{{1}}}

Template Info-Icon.png

Template documentation

[[ This template allows you to illustrate LFS buttons in the current style. For the old-styled buttons, see template: Old button.

Parameters

  • first (required): shown text
  • second (optional): variant; set to "light" for the light variant

Examples

Markup Renders as
{{button|Display}}

Display

Markup Renders as
{{button|in car|light}}

in car

Markup Renders as
{{button|in car|green}}

in car

/doc|View]] - Edit

{{: This template allows you to illustrate LFS buttons in the current style. For the old-styled buttons, see template: Old button.

Parameters

  • first (required): shown text
  • second (optional): variant; set to "light" for the light variant

Examples

Markup Renders as
{{button|Display}}

Display

Markup Renders as
{{button|in car|light}}

in car

Markup Renders as
{{button|in car|green}}

in car

/doc}}