Template:ImageButton: Difference between revisions

From Echopedia
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="image_button" style="display:inline-block; width:160px; margin:6px; border:1px solid #aaa; border-radius:6px; text-align:center; vertical-align:top; overflow:hidden; background-color:#f9f9f9;">
<div class="image_button" style="display:inline-block; width:10em; padding:1em; text-align:center; vertical-align:top; overflow:hidden; background-color:#444; color:#eee; border:0.1em solid black; text-shadow:0 0 .5em #000; box-shadow:0 0 .5em #0003;">
[[{{{page}}}|{{#if:{{{image|}}}|[[File:{{{image}}}|160x100px|frameless]]<br>}}'''{{{text}}}''']]
{{#if:{{{image|}}}|[[File:{{{image}}}{{!}}160x100px{{!}}link={{{page}}}]]<br>}}[[:{{{page}}}|'''{{{text}}}''']]
</div><noinclude>
</div><noinclude>
<templatedata>
<templatedata>

Latest revision as of 01:06, 12 July 2026

[[:{{{page}}}|{{{text}}}]]

<templatedata> { "params": { "text": { "description": "Content of the button", "type": "string", "required": true }, "image": { "description": "Filename of an uploaded wiki image (not a URL). Omit for a text-only button.", "type": "string", "suggested": true }, "page": { "description": "Name of the page to link to", "type": "wiki-page-name", "required": true } }, "description": "A card-style link button, optionally with an image", "format": "block", "paramOrder": [ "text", "page", "image" ] } </templatedata>