Template:Button: Difference between revisions

From A KoL Wiki
imported>Quietust
add a bottom margin to buttons can be placed back to back without running into each other\
imported>Flargen
add ability to NOT center the button
Line 1: Line 1:
<includeonly>{| cellspacing="0" style="margin-left: auto; margin-right: auto; border: 2px black solid; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; background-color: #FFFFFF; padding-right: 8px; padding-left: 8px; margin-bottom: 8px" id="{{{1}}}"
<includeonly>{| cellspacing="0" style="{{#ifeq:{{{center|y}}}|y|margin-left: auto; margin-right: auto;|}} border: 2px black solid; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; background-color: #FFFFFF; padding-right: 8px; padding-left: 8px; margin-bottom: 8px" id="{{{1}}}"
|-
|-
| {{{1}}}
| {{{1}}}
Line 5: Line 5:


{{Code2}}
{{Code2}}
Creates a button in the style typically seen in the game.


==Usage==
==Usage==
<nowiki>{</nowiki>{button|''text''}}
*To create a centered button:
*:<nowiki>{{button|Text}}</nowiki>
*To create an un-centered button (with no left/right margins), use
*:<nowiki>{{button|Text|center=n}}</nowiki>
 
In either version, "Text" can be anything, including wiki links to other pages.


==Examples==
==Examples==
:<code><nowiki>{{button|Log In}}</nowiki></code> yields:
*<code><nowiki>{{button|Log In}}</nowiki></code> yields:
{{button|Log In}}
{{button|Log In}}
:<code><nowiki>{{button|Buy Item}}</nowiki></code> yields:
*<code><nowiki>{{button|Buy Item}}</nowiki></code> yields:
{{button|Buy Item}}
{{button|Buy Item}}
:<code><nowiki>{{button|Sail Away! (3)}}</nowiki></code> yields:
*<code><nowiki>{{button|Sail Away! (3)}}</nowiki></code> yields:
{{button|Sail Away! (3)}}
{{button|Sail Away! (3)}}
*<code><nowiki>{{button|[[Loathing Legion hammer]]|center=n}}</nowiki></code> yields
{{button|[[Loathing Legion hammer]]|center=n}}


[[Category:Standardization Templates|{{PAGENAME}}]]</noinclude>
[[Category:Standardization Templates|{{PAGENAME}}]]</noinclude>

Revision as of 23:01, 1 January 2011


{{Button}}
{| cellspacing="0" style="{{#ifeq:{{{center|y}}}|y|margin-left: auto; margin-right: auto;|}} border: 2px black solid; font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-weight: bold; background-color: #FFFFFF; padding-right: 8px; padding-left: 8px; margin-bottom: 8px" id="{{{1}}}"

|- | {{{1}}}

|}

Creates a button in the style typically seen in the game.

Usage

  • To create a centered button:
    {{button|Text}}
  • To create an un-centered button (with no left/right margins), use
    {{button|Text|center=n}}

In either version, "Text" can be anything, including wiki links to other pages.

Examples

  • {{button|Log In}} yields:
Log In
  • {{button|Buy Item}} yields:
Buy Item
  • {{button|Sail Away! (3)}} yields:
Sail Away! (3)
  • {{button|[[Loathing Legion hammer]]|center=n}} yields
Loathing Legion hammer