Template:Clickable button: Difference between revisions
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
Line 1: | Line 1: | ||
<span class="mw-ui-button {{#switch: {{{color|white}}} | red = mw-ui-destructive | green = mw-ui-progressive | white = | blue = mw-ui-progressive}}" role="button" aria-disabled="false" style=" | <span class="mw-ui-button {{#switch: {{{color|white}}} | ||
{{#if: {{{image|}}} | | | red = mw-ui-destructive | ||
<span style="color: #facc91;"> | | green = mw-ui-progressive | ||
| white = | |||
| blue = mw-ui-progressive}}" role="button" aria-disabled="false" style="font-size: 1.5em; padding: 100px 100px; position: relative; display: inline-block;"> | |||
<!-- Include Image if 'image' parameter is provided --> | |||
{{#if: {{{image|}}} | | |||
<img src="{{filepath:{{{image}}}}}" alt="{{{alt|}}}" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: {{{image_width|100px}}};" /> | |||
}} | |||
<!-- Button Text --> | |||
<span style="position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #facc91;"> | |||
{{{text|{{{1|Button text}}}}}} | {{{text|{{{1|Button text}}}}}} | ||
</span> | </span> | ||
</span> | </span> | ||
<noinclude>{{Documentation}}</noinclude> | <noinclude>{{Documentation}}</noinclude> |
Revision as of 20:46, 24 September 2024
{{#if: | <img src="" alt="" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100px;" /> }}
Button text