Difference between revisions of "Template:B"

From ALttP Speedrunning Wiki
Jump to: navigation, search
(Replaced content with "{{#invoke:SNES button|main}}<noinclude>{{Documentation}}</noinclude>")
Line 1: Line 1:
{{#css:
+
{{#invoke:SNES button|main}}<noinclude>{{Documentation}}</noinclude>
.snes-button,
 
.snes-button-face,
 
.snes-button-mid,
 
.snes-button-bumper {
 
display: inline-block;
 
text-align: center;
 
color: white;
 
border: 2px solid;
 
border-left: none;
 
border-top: none;
 
border-radius: 20px;
 
text-transform: capitalize;
 
}
 
 
 
.snes-button-face,
 
.snes-button-A,
 
.snes-button-B,
 
.snes-button-X,
 
.snes-button-Y {
 
width: 22px;
 
height: 22px;
 
font-weight: bold;
 
}
 
 
 
.snes-button-A {
 
background: #DA3948;
 
border-color: #610102;
 
}
 
 
 
.snes-button-B {
 
background: #FEBB52;
 
border-color: #3E0A00;
 
}
 
 
 
.snes-button-X {
 
background: #00489F;
 
border-color: #000A35;
 
}
 
 
 
.snes-button-Y {
 
background: #00916A;
 
border-color: #00331B;
 
}
 
 
 
.snes-button-bumper {
 
width: 40px;
 
height: 16px;
 
padding-bottom: 2px;
 
font-weight: bold;
 
border-color: #8D8D8D;
 
background: #B8B8A8;
 
}
 
 
 
.snes-button-L {
 
border-radius: 15px 0 0 0;
 
}
 
 
 
.snes-button-R {
 
border-radius: 0 15px 0 0;
 
}
 
 
 
.snes-button-mid,
 
.snes-button-Start,
 
.snes-button-Select {
 
width: 60px;
 
height: 12px;
 
padding-bottom: 8px;
 
background: #4B545B;
 
border-color: #050704;
 
font-variant: small-caps;
 
}
 
 
 
}}<span class="{{#switch:{{uc:{{{1}}}}}
 
|A|B|X|Y=snes-button-face
 
|R|L=snes-button-bumper
 
|START|SELECT=snes-button-mid}} snes-button-{{ucfirst:{{lc:{{{1}}}}}}}">{{ucfirst:{{lc:{{{1}}}}}}}</span><noinclude>{{Documentation}}</noinclude>
 

Revision as of 19:46, 2 June 2018

Template documentation[view] [edit] [history] [purge]

Makes SNES buttons pretty.

{{B|A}} A
{{B|B}} B
{{B|X}} X
{{B|Y}} Y
{{B|L}} L
{{B|R}} R
{{B|Start}} Start
{{B|Select}} Select
{{B|Directional}} directional
{{B|D}} d
{{B|^}} ^
{{B|v}} v
{{B|<}} <
{{B|>}} >
{{B|^<}} ^<
{{B|^>}} ^>
{{B|^v}} ^v
{{B|v<}} v<
{{B|v>}} v>
{{B|^<}} ^<
{{B|^v<>}} ^v<>

Chaining

Multiple buttons can be displayed by a single template call, with several delimiters being recognized as special text.

{{B|A|B|<|>}} AB<>
{{B|A|+|B||+|<^}} A+B+<^
{{B|A|,|B|,|<|,|>}} A,B,<,>
{{B|A|;|B|;|<|;|>}} A;B;<;>